# Spherical coordinate derivatives

1. Sep 24, 2010

### absci2010

1. Find the derivatives of the spherical coordinates in terms of df/dx, df/dy, and df/dz.

2. f(x,y,z)
x=rcos$$\theta$$sin$$\varphi$$
y=rsin$$\vartheta$$cos$$\varphi$$
z=rcos$$\varphi$$

3. The attempt at a solution[/b]
I took the derivatives of the three equations and I got:
df/dx=rcos$$\theta$$cos$$\varphi$$(df/d$$\theta$$)-rsin$$\varphi$$sin$$\theta$$(df/d$$\theta$$)+cos$$\theta$$sin$$\varphi$$(df/dr)
df/dy=rsin$$\theta$$cos$$\varphi$$(df/d$$\varphi$$)+rsin$$\varphi$$cos$$\theta$$(df/d$$\theta$$)+sin$$\theta$$sin$$\varphi$$(df/dr)
df/dz=-rsin$$\varphi$$(df/d$$\varphi$$)+cos$$\varphi$$(df/dr)

1) Am I taking the derivatives correctly?
2) Can my answer have x, y, and z in it, or does it have to be r, $$\theta$$, and $$\varphi$$?
3) I think the next step is just algebra. Is the algebra going to be really messy?

2. Sep 25, 2010

### fzero

First of all, your expression for x is wrong, it should be

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] x = r \sin\theta \sin\varphi [Broken]

to be consistent with the form of y and z.

That said, I'm confused by the statement of the question. Does it mean find the derivatives of a function f with respect to the spherical coordinates in terms of the derivatives with respect to the Cartesian coordinates? In any case, this question is dealing with applying the chain rule for partial derivatives, as you recognize. However, you seem to have incorrectly applied the chain rule.

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] \frac{\partial f}{\partial x} = \frac{\partial r}{\partial x} \frac{\partial f}{\partial r} + \frac{\partial \theta}{\partial x} \frac{\partial f}{\partial \theta} + \frac{\partial \varphi}{\partial x} \frac{\partial f}{\partial \varphi} [Broken]

I believe you have the reciprocals of the correct factors in your expressions above. However, I believe that the problem is asking for you to express the inverse relationships

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] \frac{\partial f}{\partial r} = \frac{\partial x}{\partial r} \frac{\partial f}{\partial x} + \frac{\partial y}{\partial r} \frac{\partial f}{\partial y} + \frac{\partial z}{\partial r} \frac{\partial f}{\partial z} [Broken]

and so on. In this case we want to express everything on the right-hand side in terms of x,y,z. The algebra is not too bad. Just derive the relationships

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] r = \sqrt{x^2+y^2+z^2}, [Broken]

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] \cos\varphi = \frac{z}{\sqrt{x^2+y^2+z^2}} [Broken]

[PLAIN][PLAIN][URL]http://latex.codecogs.com/gif.latex?[/URL][/URL][/URL] \sin\theta = \frac{y}{z} [Broken]

The other trig functions can be eliminated by using simple trig identities.

Last edited by a moderator: May 4, 2017
3. Sep 25, 2010

### Quinzio

There's something wrong here.
Shperical coordinates have one radious and two angles, you got 1 radious and 3 angles.
I usually write:

$$x=r sin \varphi cos \theta$$

$$y=r sin \varphi sin \theta$$

$$z=r cos \varphi$$

4. Sep 25, 2010

### absci2010

Sorry, it should be:
x=rcos$$\theta$$sin$$\varphi$$
y=rsin$$\theta$$sin$$\varphi$$
z=rcos$$\varphi$$