Skip to main content
Made English clearer and more idiomatic. Fixed some formatting problems. Removed redundancies.
Source Link

How todo I simplify particular function while not affect othersan embedded sub-expression without affecting other sub-expressions?

I have an expression which is very large and there arewhich has several "Conjugate" in this large expressionsub-expressions with head Conjugate. What I want to do now is to Simplifysimplify the "Conjugate" only while not affect othersConjugate[...] sub-expressions without affecting other sub-expressions.

theThe first method I considered is to use "Transformationfunctions"was the Transformationfunctions option of Simplify. And write as followsI wrote:

Simplify[expr,Transformationfunctions->{Conjugate}] 

wellWell, the "Conjugate" isConjugate does indeed disappear, but the result is wrong. forFor example (with the $assumptions that$Assumptions set so all variables are considered real)

FullSimplify[Conjugate[  t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) +  I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])], Transformationfunctions->{Conjugate}] 

gives

t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky]) 

theThe second method I considered, is to replace "Conjugate" as "ComplexExpand//@Conjugate"use (AllComplexExpand //@ Conjugate. Since all the variable isvariables in my expression are declared real variables) So

Conjugate[expr] 

, Conjugate[expr] will become

ComplexExpand//@Conjugate[expr] 

in order to implement ComplexExpand //@ Conjugate[expr]. To make such method of cousethis substitution, I can ctrl+Fcould use search-and-replace and replace "Conjugate". Butevaluate-in-place, but as I have said, the expression is large, so I don't want to displaydo it on the screenthat way. SoInstead I write as followsdid the following:

largeexpr /. Conjugate ->ComplexExpand> ComplexExpand //@Conjugate@ Conjugate 

But this did not work. Here the largeexpr stand for expr that contains Conjugate. for example

Here (justlargeexpr is an expression containing sub-expressions with head Conjugate. For example),

Sqrt[t1^2]+Conjugate[  t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) +  I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])] 

So can anyone point out what isI did wrong? Or suggest a better solution?

How to simplify particular function while not affect others

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong. for example (with the $assumptions that all variables are real)

FullSimplify[Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])],Transformationfunctions->{Conjugate}] 

gives

t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky]) 

the second method I considered, is to replace "Conjugate" as "ComplexExpand//@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand//@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand//@Conjugate 

But this did not work. Here the largeexpr stand for expr that contains Conjugate. for example (just an example)

Sqrt[t1^2]+Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])] 

So can anyone point out what is wrong? Or suggest a better solution?

How do I simplify an embedded sub-expression without affecting other sub-expressions?

I have an expression which is very large and which has several sub-expressions with head Conjugate. What I want to do is simplify the Conjugate[...] sub-expressions without affecting other sub-expressions.

The first method I considered is was the Transformationfunctions option of Simplify. I wrote:

Simplify[expr,Transformationfunctions->{Conjugate}] 

Well, Conjugate does indeed disappear, but the result is wrong. For example (with $Assumptions set so all variables are considered real)

FullSimplify[Conjugate[  t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) +  I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])], Transformationfunctions->{Conjugate}] 

gives

t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky]) 

The second method I considered is to use ComplexExpand //@ Conjugate. Since all the variables in my expression are declared real variables, Conjugate[expr] will become ComplexExpand //@ Conjugate[expr]. To make such this substitution, I could use search-and-replace and evaluate-in-place, but as I have said, the expression is large, so I don't want to do it that way. Instead I did the following:

largeexpr /. Conjugate -> ComplexExpand //@ Conjugate 

But this did not work.

Here largeexpr is an expression containing sub-expressions with head Conjugate. For example,

Sqrt[t1^2]+Conjugate[  t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) +  I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])] 

So can anyone point out what I did wrong? Or suggest a better solution?

added 598 characters in body
Source Link
matheorem
  • 17.7k
  • 8
  • 53
  • 121

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong. for example (with the $assumptions that all variables are real)

FullSimplify[Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])],Transformationfunctions->{Conjugate}] 

gives

t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky]) 

the second method I considered, is to replace "Conjugate" as "ComplexExpand//@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand@Conjugate[expr]ComplexExpand//@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand@Conjugate>ComplexExpand//@Conjugate 

But this did not work. Here the largeexpr stand for expr that contains Conjugate. for example (just an example)

Sqrt[t1^2]+Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])] 

So can anyone point out what is wrong? Or suggest a better solution?

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong.

the second method I considered, is to replace "Conjugate" as "ComplexExpand/@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand@Conjugate 

But this did not work.

So can anyone point out what is wrong? Or suggest a better solution?

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong. for example (with the $assumptions that all variables are real)

FullSimplify[Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])],Transformationfunctions->{Conjugate}] 

gives

t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky]) 

the second method I considered, is to replace "Conjugate" as "ComplexExpand//@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand//@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand//@Conjugate 

But this did not work. Here the largeexpr stand for expr that contains Conjugate. for example (just an example)

Sqrt[t1^2]+Conjugate[ t1 (2 Cos[(Sqrt[3] kx)/2] Cos[ky/2] + Cos[ky]) + I t1 (-2 Cos[(Sqrt[3] kx)/2] Sin[ky/2] + Sin[ky])] 

So can anyone point out what is wrong? Or suggest a better solution?

deleted 2 characters in body
Source Link
matheorem
  • 17.7k
  • 8
  • 53
  • 121

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong.

the second method I considered, is to replace "Conjugate" as "ComplexExpand/@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand/@Conjugate[expr]ComplexExpand@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand/@Conjugate>ComplexExpand@Conjugate 

But this did not work.

So can anyone point out what is wrong? Or suggest a better solution?

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong.

the second method I considered, is to replace "Conjugate" as "ComplexExpand/@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand/@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand/@Conjugate 

But this did not work.

So can anyone point out what is wrong? Or suggest a better solution?

I have an expression which is very large and there are several "Conjugate" in this large expression. What I want to do now is to Simplify the "Conjugate" only while not affect others.

the first method I considered is to use "Transformationfunctions". And write as follows:

Simplify[expr,Transformationfunctions->{Conjugate}] 

well, the "Conjugate" is indeed disappear, but the result is wrong.

the second method I considered, is to replace "Conjugate" as "ComplexExpand/@Conjugate" (All the variable is in my expression are real variables) So

Conjugate[expr] 

will become

ComplexExpand@Conjugate[expr] 

in order to implement such method of couse I can ctrl+F and replace "Conjugate". But I have said the expression is large, so I don't want to display it on the screen. So I write as follows

largeexpr/.Conjugate->ComplexExpand@Conjugate 

But this did not work.

So can anyone point out what is wrong? Or suggest a better solution?

Source Link
matheorem
  • 17.7k
  • 8
  • 53
  • 121
Loading