# Rotate vector in spherical coordinates

I have two arbitrary vectors $\vec{x}$ and $\vec{x}'$ given in spherical coordinates $(|\vec{x}|=x,\theta,\phi)$ (as convention I take the "physics notation" given on Wikipedia http://en.wikipedia.org/wiki/Spherical_coordinate_system). I now want to rotate the coordinate system so that it's $z$-direction points along $\vec{x}$. That means, $\vec{x}$ would have the values $(0, 0, x)$. I now need to compute the angles of $\vec{x}'$. The absolute value does not change, but the angles do. I need to figure out how the angles are in the new coordinate system. With the help of rotation matrices, one is able to get:

$\vec{x}' = x' (\sin(\theta')\cos(\phi'-\phi)\cos(\theta)-\sin(\theta)\cos(\theta'),\sin(\theta')\sin(\phi'-\phi),\sin(\theta')\cos(\phi'-\phi)\sin(\theta)+\cos(\theta)\cos(\theta')) \equiv x' (\sin(\alpha')\cos(\beta'),\sin(\alpha')\sin(\beta'),\cos(\beta'))$

Now $\alpha', \beta'$ are the angles in the normal sense but in the new coordinate system. I need a converting rule $\theta', \phi' \to \alpha', \beta'$. Anyone a hint?

Edit (some further explanations): I need this to compute an integral of the form $\int \mathrm{d}^3x' g(\theta',\phi')f(|\vec{x}-\vec{x}'|)$ and I converted $\mathrm{d}^3x'=x'^2\mathrm{d}x\mathrm{d}\phi' \sin(\theta')\mathrm{d}\theta'$ to spherical coordinates. The problem is that $|\vec{x}-\vec{x}'|=x^2+x'^2-2xx'[\sin(\theta')\cos(\phi'-\phi)\sin(\theta)+\cos(\theta)\cos(\theta')]$ contains angles of both vectors and I need to get rid of the unprimed angles (which is possible in transforming the coordinate system under the integral to point with it's z-direcion along $\vec{x}$).

• are you sure your transformation is right? One check I did was plug in $\theta' = \theta$, $\phi' = \phi$, $x' = x$, i.e. see how $\vec{x}$ itself is described in this new coordinate system in which $\vec{x}$ is in the z-direction. The answer should be $x(0,0,1)$. But I get $x(\sin(2\theta),0,1)$. – nervxxx Jan 17 '13 at 21:49
• Correct, I made two typos. Corrected it and then it fits. – DaP Jan 18 '13 at 8:25
• I think this should be migrated to math, it is not really a physics problem. – daaxix Jan 18 '13 at 20:16
• @daaxix, but it is a very frequent problen one finds in physics. I think it is best placed here. In math.se they are usually interested in questions of a more abstract nature. – Eduardo Guerras Valera Jan 18 '13 at 20:49
• This question appears to be off-topic because it is about mathematical manipulation with no direct connection to physics. – tpg2114 Nov 6 '13 at 2:49