Question:
How do I expand the sum of complex conjugates in Mathematica?
Josh
2012-01-21 15:28:37 UTC
The equation I have is (a + b + c + d) * Conjugate[a - 3 * b + c + d]

The conjugated a, c, and d terms are always lumped together. How do I expand them out?

I have tried ExpandAll, Expand, Simplify, FullSimplify and ComplexExpand does not work for my purposes.
Three answers:
Andrej
2012-01-21 16:03:17 UTC
Yeah, Mathematica can seem stubborn like that. Use FunctionExpand. E.g.,



In[17]:= Expand[(a + b + c + d)*

FunctionExpand[Conjugate[a - 3*b + c + d]]]



Out[17]= a Conjugate[a] + b Conjugate[a] + c Conjugate[a] +

d Conjugate[a] - 3 a Conjugate[b] - 3 b Conjugate[b] -

3 c Conjugate[b] - 3 d Conjugate[b] + a Conjugate[c] +

b Conjugate[c] + c Conjugate[c] + d Conjugate[c] + a Conjugate[d] +

b Conjugate[d] + c Conjugate[d] + d Conjugate[d]





Note that ComplexExpand is a bit different, it will write everything in term of real variables! You have to explicitly give it the list of variables that are complex (in your case a,b,c,d should all be assumed complex in principle)



In[9]:= ComplexExpand[(a + b + c + d)*Conjugate[a - 3*b + c + d], {a,

b, c, d}]



Out[9]= Im[a]^2 - 2 Im[a] Im[b] - 3 Im[b]^2 + 2 Im[a] Im[c] -

2 Im[b] Im[c] + Im[c]^2 + 2 Im[a] Im[d] - 2 Im[b] Im[d] +

2 Im[c] Im[d] + Im[d]^2 + Re[a]^2 - 2 Re[a] Re[b] - 3 Re[b]^2 +

2 Re[a] Re[c] - 2 Re[b] Re[c] + Re[c]^2 + 2 Re[a] Re[d] -

2 Re[b] Re[d] + 2 Re[c] Re[d] + Re[d]^2 +

I (4 Im[b] Re[a] - 4 Im[a] Re[b] - 4 Im[c] Re[b] - 4 Im[d] Re[b] +

4 Im[b] Re[c] + 4 Im[b] Re[d])





Good luck!
ubence
2016-12-17 20:56:59 UTC
Sum Mathematica
lothrop
2016-10-06 03:50:32 UTC
Mathematica Sum


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...