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.

Naïvely this is what happens and it obviously is not helpful!

In[7]:= Conjugate[SphericalHarmonicY[1, 1, θ, ϕ]]

Out[7]= -(1/2) E^(-I Conjugate[ϕ]) Sqrt[3/(2 π)] Conjugate[Sin[θ]]

So I tried stating initially that $\theta$ and $\phi$ are reals - but still that doesn't seem to have helped any bit,

 In[8]:= θ ∈ Reals; ϕ ∈ Reals; 

  In[9]:= SphericalHarmonicY[1, 1, θ, ϕ]

  Out[9]= -(1/2) E^(I ϕ) Sqrt[3/(2 π)] Sin[θ]

  In[10]:= Conjugate[SphericalHarmonicY[1, 1, θ, ϕ]]

  Out[10]= -(1/2) E^(-I Conjugate[ϕ]) Sqrt[3/(2 π)] Conjugate[Sin[θ]]

Kindly tell me how to do this? (...I want to calculate sums like $\sum\limits_{m=-\ell}^{\ell}\vert Y_{l,m} (\theta,\phi)\vert^2$...)

share|improve this question
1  
Try Simplify[Conjugate[SphericalHarmonicY[1, 1, θ, ϕ]], θ ∈ Reals && ϕ ∈ Reals] –  J. M. Apr 22 '13 at 9:57
    
Simply writing θ ∈ Reals; ϕ ∈ Reals; is not the way to indicate to Mathematica that those variables are real. Try looking up $Assumptions and Assumptions. –  Sjoerd C. de Vries Apr 22 '13 at 15:46
add comment

2 Answers 2

Almost always in such situations, ComplexExpand is your friend:

   Conjugate[SphericalHarmonicY[1, 1, \[Theta], \[Phi]]] // ComplexExpand
   (* -(Sqrt[3/(2*Pi)]*Cos[\[Phi]]*Sin[\[Theta]])/2 + 
       (I/2)*Sqrt[3/(2*Pi)]*Sin[\[Theta]]*Sin[\[Phi]] *)
share|improve this answer
    
Thanks! But isn't there a way to just make Mathematica understand that theta and phi are reals? I mean, I want to do many calculations like this in one file and I would like to have it declared once and for all that \theta and \phi are reals. Isn't there a way for that? –  user6818 Apr 21 '13 at 23:09
    
This thing of "ComplexExpand" doesn't seem to work if I say have a coefficient like of $(1/a)Y_{l,m}(\theta,\phi)$. Then ComplexExpand doesn't understand that $a$ is real and is making an unnecessary mess of the expression. –  user6818 Apr 22 '13 at 0:07
    
ComplexExpand does an expansion making the assumption that all variables and symbolic constants involved are real. There are not really "assertions" like \[theta] \[Element] Reals that do anything. Sometimes setting values for the global $Assumptions will do what you want, but that's only for affecting subsequent uses of certain functions such as Simplify and Integrate. –  murray Apr 22 '13 at 3:18
add comment

This is the spherical harmonic:

SphericalHarmonicY[1, 1, \[Theta], \[Phi]]

It returns this:

-(1/2) E^(I \[Phi]) Sqrt[3/(2 \[Pi])] Sin[\[Theta]]

And this is its complex conjugate:

SphericalHarmonicY[1, 1, \[Theta], \[Phi]] /. I -> -I

returning this:

-(1/2) E^(-I \[Phi]) Sqrt[3/(2 \[Pi])] Sin[\[Theta]]

as it can be expected.

share|improve this answer
add comment

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.