I am working through a problem where the vector has a Cartesian term and want to convert it to spherical::
(Sorry, I couldn't figure out how to use the equation editor)
sqrt(x^2+y^2)/sqrt(X^2+y^2+z^2) (x component of vector)
I also know the answer is:
(rsin\phi )/r = sin\phi
I can't figure out how rsin\phi = sqrt(x^2=y^2) in the answer.
x= r cos(theta) sin(phi), y= r sin(theta) sin(phi) so x^2= r^2 cos^2(\theta) sin^2(phi) and y^2= r^2 sin^2(\theta) sin^2(\phi).
x^2+ y^2= r^2 cos^2(theta) sin^2(phi)+ r^2 sin^2(theta) cos^2(phi)= r^2 sin^2(phi)(cos^2(theta)+ sin^2(theta))
= r^2 sin^2(\phi). That's the numerator.
Thanks for the help.
Did you mean for the second term in the x^2+y^2 equation to be sin^2(phi) instead of cos^2(phi)?
Second term: r^2 sin^2(theta) cos^2(phi)
You used; x= r cos(theta) sin(phi)
My electromagnetics book uses; x= r cos(phi) sin(theta)
So I get sin(theta) as an answer, the correct answer is sin(phi). Am I missing something?
Theta is defined as the angle between the z-axis the position vector.
Phi is measured from the x-axis to the plane of the vector.