7
$\begingroup$

How do I complex conjugate a vector?

E^(-((I β)/2)) p (Cos[α/2] (Cos[θ]^2 + Sin[θ]^2 Sin[ϕ] (-I Cos[ϕ] + Sin[ϕ]))
+ E^(I β)Sin[α/2] (Cos[θ]^2 + Sin[θ]^2 Sin[ϕ] (I Cos[ϕ] + Sin[ϕ])))

I tried doing Assuming[β ∈ Reals, c[[1]]^*, but that didn't work :\ ... I just want i's flipped, but I'm getting this:

enter image description here


Attempt at using ComplexExpand as suggested my LLiaMnYP. Still doesn't look as compact as c[[1]] if I just change all the i's by hand :(

enter image description here

$\endgroup$
  • $\begingroup$ You are getting this as there is no way for Mathematica to know, that all other variables are real. Check out the documentation for ComplexExpand IIRC. $\endgroup$ – LLlAMnYP Mar 17 '15 at 23:30
  • $\begingroup$ tried it... see pic above... naturally, Mathematica decided to expand exponentials and rearrange everything %\ and cc* product has changed to a really long string compared to what it was when I just changed i's manually $\endgroup$ – Raksha Mar 17 '15 at 23:39
  • $\begingroup$ Is p a factor or a function? $\endgroup$ – Mahdi Mar 17 '15 at 23:43
  • 1
    $\begingroup$ p is a factor here $\endgroup$ – Raksha Mar 17 '15 at 23:44
12
$\begingroup$

Is this what you wanted?

expr = E^(-((I β)/2)) p (Cos[α/2] (Cos[θ]^2 + Sin[θ]^2 Sin[ϕ] (-I Cos[ϕ] + Sin[ϕ])) + 
    E^(I β) Sin[α/2] (Cos[θ]^2 + Sin[θ]^2 Sin[ϕ] (I Cos[ϕ] + Sin[ϕ])))

Mathematica graphics

expr /. Complex[x_, y_] :> Complex[x, -y]

Mathematica graphics

$\endgroup$
  • $\begingroup$ YES! Thank you! Tho it also returned "Complex::argr: Complex called with 1 argument; 2 arguments are expected." for some reason. $\endgroup$ – Raksha Mar 17 '15 at 23:56
  • $\begingroup$ @Solarmew please try it now. $\endgroup$ – Nasser Mar 18 '15 at 0:00
  • $\begingroup$ Perfect :] Thanks so much! $\endgroup$ – Raksha Mar 18 '15 at 0:25
  • 1
    $\begingroup$ Cool trick. This does literally "flip the i's", as OP requested. Just be warned, if you have I represented as Sqrt[-1] anywhere, this will probably not work. $\endgroup$ – LLlAMnYP Mar 18 '15 at 0:44
  • 1
    $\begingroup$ Agreed, I was too lazy to extend to more elaborate constructs such as Sqrt[-a] (where a may be positive, but not have a value assigned to it and remain in symbolic form) and a large class of functions, although elementary, but for which the relation Conjufate[f[x]]==f[Conjugate[x]] does not hold. Of course, OP's expression does happen to be one of those where you just need to flip the Is, I just wanted to point out, that your trick may not work in some cases even if all variables are real. $\endgroup$ – LLlAMnYP Mar 18 '15 at 1:31
4
$\begingroup$

You might use:

  FullSimplify@ComplexExpand@Conjugate[(* expression *)]

in your case, it returns:

$$ e^{\frac{i \beta }{2}} p \left(\sin \left(\frac{\alpha }{2}\right) e^{-i (\beta -\phi )} \left(\cos ^2(\theta ) \cos (\phi )-i \sin (\phi )\right)+\cos \left(\frac{\alpha }{2}\right) \left(\cos ^2(\theta )+\sin ^2(\theta ) \sin (\phi ) (\sin (\phi )+i \cos (\phi ))\right)\right) $$

$\endgroup$
  • $\begingroup$ Mine still returned the same expression as in the first picture, but without Conjugate[ ] around beta. (how did you input such pretty text so fast?) I also typed {beta, p, alpha, theta, phi} instead of just beta. That got p outside of Conjugate[ ] but left all the trig functions in. Tried including trig function, but that also didn't do anything. $\endgroup$ – Raksha Mar 17 '15 at 23:43
  • 1
    $\begingroup$ @Solarmew such "pretty text" is input using $\LaTeX$. See a basic help page and an extended tutorial about what MathJax supports. $\endgroup$ – Ruslan Mar 18 '15 at 4:45
3
$\begingroup$

You can also do

Refine[Conjugate@c[[1]],
       Assumptions->(\[Alpha] | \[Beta] | \[Phi]) \[Element] Reals]

This also works in cases when you have additional manifestly complex variables in your expression (ComplexExpand assumes that all variables are real). Of course in that case you would not add those in your Assumptions. For example:

Refine[Conjugate[a b], Assumptions -> a \[Element] Reals]
(*
==> a Conjugate[b]
*)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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