Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

The TransformationFunctions used in Simplify should be functions that transform an expression without changing it. So things like Expand and Factor are fine, but Conjugate should not be used because Conjugate[z] is not the same as z.

I think what you are trying to do in your second method is to apply ComplexExpand on any subexpression with head Conjugate. Something like this:

expr = 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])];

expr /. c_Conjugate :> ComplexExpand[c]

(* Sqrt[t1^2] + 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]) *)
share|improve this answer
    
Thank you very much !! Your solution to my second method is perfect !! But about TransformationFunctions, I still have doubt. For example I want to simplify an expression only use Expand and Together. How should I write? I've tried write like Simplify[(1 + x)^6, TransformationFunctions -> {Expand}] (use only expand), but it didn't work. –  matheorem Dec 15 '12 at 1:21
    
@user15964, it did work, but remember that Simplify aims to reduce the complexity of the expression. In this case, Expand increases the complexity, and the so lowest complexity expression Simplify can find is the one you started with. –  Simon Woods Dec 15 '12 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.