# How a Multivariable Function Changes with Respect to the Cartesian Coordinates

Suppose $F(x,y,z) \equiv f(x) g(y) h(z)$. This post shows how to calculate a partial derivative of a multivariable function $F(x,y,z)$ with respect to each Cartesian coordinates. The resulting expressions are in spherical coordinates.

In previous posts (see references [2], [3], and [4]), the following equations were written:

$\frac{\partial }{\partial r} F(x,y,z) = \bigg( ( \frac{\partial x}{\partial r} ) \frac{\partial }{\partial x} + ( \frac{\partial y}{\partial r} ) \frac{\partial }{\partial y} + ( \frac{\partial z}{\partial r} ) \frac{\partial }{\partial z} \bigg) F(x,y,z)$.

$\frac{\partial }{\partial \theta} F(x,y,z) = \bigg( ( \frac{\partial x}{\partial \theta} ) \frac{\partial }{\partial x} + (\frac{\partial y}{\partial \theta} ) \frac{\partial }{\partial y} + ( \frac{\partial z}{\partial \theta} ) \frac{\partial }{\partial z} \bigg) F(x,y,z)$.

$\frac{\partial }{\partial \phi} F(x,y,z) = \bigg( ( \frac{\partial x}{\partial \phi} ) \frac{\partial }{\partial x} + (\frac{\partial y}{\partial \phi} ) \frac{\partial }{\partial y} + ( \frac{\partial z}{\partial \phi} ) \frac{\partial }{\partial z} \bigg) F(x,y,z)$.

The partial derivatives of the Cartesian coordinates with respect to the Spherical coordinates were determined in previous posts. They are:

$\frac{dx(r)}{dr}\big|_{r^+}=\sin\theta\cos\phi$

$\frac{dy(r)}{dr}\big|_{r^+} = \sin\theta\sin\phi$

$\frac{dz(r)}{dr}\big|_{r^+} = \cos\theta$

$\frac{dx(\theta)}{d\theta} \big|_{\theta^+} = r\cos\theta \cos\phi$

$\frac{dy(\theta)}{d \theta} \big|_{\theta^+} = r \cos\theta \sin\phi$

$\frac{dz(\theta)}{d\theta} \big|_{\theta^+} = -r \sin\theta$

$\frac{dx(\phi)}{d\phi}\big|_{\phi^+} = -r\sin\theta\sin\phi$

$\frac{dy(\phi)}{d\phi}\big|_{\phi^+} = r \sin\theta \cos\phi$

$\frac{dz(\phi)}{d\phi}\big|_{\phi^+} = 0$

In what follows, the $\big|_{r^+}$, $\big|_{\theta^+}$, and $\big|_{\phi^+}$ symbols will be removed. In other words, it is now assumed that the derivatives apply regardless of the type of limit involved for each derivative.

Substituting, one has

$\frac{\partial }{\partial r} F(x,y,z) = \bigg( ( \sin\theta\cos\phi ) \frac{\partial }{\partial x} + ( \sin\theta\sin\phi ) \frac{\partial }{\partial y} + ( \cos\theta ) \frac{\partial }{\partial z} \bigg) F(x,y,z)$.

$\frac{\partial }{\partial \theta} F(x,y,z) = \bigg( ( r\cos\theta \cos\phi ) \frac{\partial }{\partial x} + ( r \cos\theta \sin\phi ) \frac{\partial }{\partial y} + ( -r \sin\theta ) \frac{\partial }{\partial z} \bigg) F(x,y,z)$.

$\frac{\partial }{\partial \phi} F(x,y,z) = \bigg( ( -r\sin\theta\sin\phi )\frac{\partial}{\partial x} + ( r \sin\theta \cos\phi )\frac{\partial}{\partial y} \bigg) F(x,y,z)$.

Next, reference [1] suggests multiplying the above equations by trigonometric functions, and adding.

### Here is the work for $\frac{\partial F(x,y,z)}{\partial x}$:

Therefore,

$\boxed{ \frac{\partial F(x,y,z)}{\partial x} = \cos\phi \sin\theta \frac{\partial F}{\partial r} + \frac{\cos \phi \cos\theta}{r} \frac{\partial F}{\partial \theta} – \frac{\sin\phi}{r \sin\theta}\frac{\partial F}{\partial \phi} }$.

The trigonometric identities of $\cos^2 \theta + \sin^2 \theta = 1$ and $\cos^2 \phi + \sin^2 \phi = 1$ were used for simplification.

### Here is the work for $\frac{\partial F(x,y,z)}{\partial y}$:

Therefore,

$\boxed{ \frac{\partial F(x,y,z)}{\partial y} = \sin\phi \sin\theta \frac{\partial F}{\partial r} + \frac{\sin\phi \cos\theta}{r} \frac{\partial F}{\partial \theta} + \frac{\cos \phi}{r \sin\theta} \frac{\partial F}{\partial \phi} }$.

The trigonometric identities of $\cos^2 \theta + \sin^2 \theta = 1$ and $\cos^2 \phi + \sin^2 \phi = 1$ were used for simplification.

### Here is the work for $\frac{\partial F(x,y,z)}{\partial z}$:

Therefore,

$\boxed{ \frac{\partial F(x,y,z)}{\partial z} = \cos\theta \frac{\partial F}{\partial r} – \frac{\sin\theta}{r} \frac{\partial F}{\partial \theta} }$.

The trigonometric identity of $\cos^2 \theta + \sin^2 \theta = 1$ was used for simplification.

### References

[1] http://www.thphys.nuim.ie/Notes/MP469/Laplace.pdf

[2] How a Multivariable Function Changes with Respect to a Radial Coordinate

[3] How a Multivariable Function Changes with Respect to a Polar Coordinate

[4] How a Multivariable Function Changes with Respect to an Azimuthal Coordinate

[5] Relating Unit Vectors to a Jacobian Matrix

## Writing Unit Vectors for a Cartesian Coordinate System in Terms of Unit Vectors for a Spherical Coordinate SystemWriting Unit Vectors for a Cartesian Coordinate System in Terms of Unit Vectors for a Spherical Coordinate System

Objective of this Post The

## The Jacobian MatrixThe Jacobian Matrix

Using conclusions from previous posts,

## Derivative No. 2Derivative No. 2

Using the methods in this