# Infinitesimal displacement in spherical coordinates

1. May 25, 2015

### PWiz

I'm trying to derive what $ds^2$ equals to in spherical coordinates.
In Euclidean space, $$ds^2= dx^2+dy^2+dz^2$$
Where $x=r \ cos\theta \ sin\phi$ , $y=r \ sin\theta \ sin\phi$ , $z=r \ cos\phi$ (I'm using $\phi$ for the polar angle)
For simplicity, let $cos \phi = A$ and $sin \phi = B$
Then $dx=r \ cos\theta \ dB + B(cos \theta \ dr - r \ sin \theta \ d \theta)$
$dy=r \ sin\theta \ dB + B(sin \theta \ dr + r \ cos \theta \ d \theta)$
$dz= r \ dA + A \ dr$
When I add up the squares of the 3 differential elements above, gather similar terms and replace $A$ and $B$, I get $ds^2 = dr^2 + r^2 \ sin^2 \phi \ d \theta^2$ , and you can see that one term is missing. Is something wrong with my approach?

2. May 25, 2015

### PWiz

I'm using $\phi$ as the polar angle and $\theta$ as the azimuthal angle over here. Either way, that won't add the missing term, but will only interchange the angle variables.

3. May 25, 2015

### theodoros.mihos

Sorry I see later.
$$x = rB\cos{theta} \,\Rightarrow\, dx = dr\,B\cos{\theta} + r\,dB\,\cos{theta} - rB\sin{\theta} = (B\,dr + r\,dB)\cos{\theta} - rB\sin{\theta}$$
$$dy = (B\,dr + r\,dB)\sin{\theta} +rB\cos{\theta} \,\text{and}\, dz = A\,dr-rB\,d\phi$$
because
$$A = cos{\phi} \Rightarrow dA = -\sin{\phi}\,d\phi = -B\,d\phi \,\text{and}\, dB = A\,d\phi$$
I think your problem is that A depends by B.

Last edited: May 25, 2015
4. May 28, 2015

### PWiz

I found an error in my steps. I'm getting the correct answer now. Anyways, thanks for helping :)