Change of variables examples

Spherical coordinates example

\includegraphics[width=2.in]{spherical.eps}
For spherical coordinates, the change of variables function is

(x, y, z) = T($\displaystyle \rho$,$ \theta$,$\displaystyle \phi$)    

where the components of T are given by

x = $\displaystyle \rho$sin$\displaystyle \phi$cos$ \theta$    
y = $\displaystyle \rho$sin$\displaystyle \phi$sin$ \theta$    
z = $\displaystyle \rho$cos$\displaystyle \phi$.    

We can compute that

$\displaystyle {\frac{{\partial (x,y,z)}}{{\partial (\rho,{\textstyle \theta},\phi)}}}$ = $\displaystyle \left\vert\vphantom{ \begin{array}{ccc} \rule[-0.2in]{0in}{0in}\d...
...theta}} & \displaystyle \frac{\partial z}{\partial \phi} \end{array} }\right.$$\displaystyle \begin{array}{ccc} \rule[-0.2in]{0in}{0in}\displaystyle \frac{\pa...
...xtstyle \theta}} & \displaystyle \frac{\partial z}{\partial \phi} \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{ccc} \rule[-0.2in]{0in}{0in}\displ...
...a}} & \displaystyle \frac{\partial z}{\partial \phi} \end{array} }\right\vert$    
  = $\displaystyle \left\vert\vphantom{ \begin{array}{ccc} \sin\phi \cos{\textstyle ...
...phi\sin{\textstyle \theta} \cos\phi & 0 & -\rho \sin\phi \end{array} }\right.$$\displaystyle \begin{array}{ccc} \sin\phi \cos{\textstyle \theta}& - \rho\sin\p...
...\rho\cos\phi\sin{\textstyle \theta} \cos\phi & 0 & -\rho \sin\phi \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{ccc} \sin\phi \cos{\textstyle \the...
...sin{\textstyle \theta} \cos\phi & 0 & -\rho \sin\phi \end{array} }\right\vert$    
  = - $\displaystyle \rho^{2}_{}$sin$\displaystyle \phi$.    

The change of variable factor is the absolute value of the determinant

$\displaystyle \left\vert\vphantom{\frac{\partial (x,y,z)}{\partial (\rho,{\textstyle \theta},\phi)} }\right.$$\displaystyle {\frac{{\partial (x,y,z)}}{{\partial (\rho,{\textstyle \theta},\phi)}}}$$\displaystyle \left.\vphantom{\frac{\partial (x,y,z)}{\partial (\rho,{\textstyle \theta},\phi)} }\right\vert$ = $\displaystyle \rho^{2}_{}$sin$\displaystyle \phi$.    

This means that the map from spherical coordinates to rectangular coordinates changes volume by the factor $ \rho^{2}_{}$sin$ \phi$. For this reason, you need to do the above calculation only once. Now, you can just remember that the factor for spherical coordinates is $ \rho^{2}_{}$sin$ \phi$.

Now we're ready for the example: find the mass of a star that is a ball of radius 3 centered at the origin if the density of the star is g(x, y, z) = 10 - x2 - y2 - z2.

If we try to compute the integral directly in rectangular coordinates, it isn't so easy:

  $\displaystyle \iiint_{S}^{}$g(x, y, z)dx dy dz    
  = $\displaystyle \int_{{-3}}^{3}$$\displaystyle \int_{{-\sqrt{9-z^2}}}^{{\sqrt{9-z^2}}}$$\displaystyle \int_{{-\sqrt{9-z^2-y^2}}}^{{\sqrt{9-z^2-y^2}}}$(10 - x2 - y2 - z2)dx dy dz    

A mess.

We can find the mass of the star more easily in spherical coordinates.

The star density g(x, y, z) = 10 - x2 - y2 - z2 becomes g(T($ \rho$,$ \theta$,$ \phi$)) = 10 - $ \rho^{2}_{}$.

In spherical coordinates, the integral over ball of radius 3 is the integral over the region

0$\displaystyle \le$$\displaystyle \rho$$\displaystyle \le$3,    0$\displaystyle \le$$ \theta$$\displaystyle \le$2$ \pi$,    0$\displaystyle \le$$\displaystyle \phi$$\displaystyle \le$$ \pi$    

The volume element is $ \rho^{2}_{}$sin$ \phi$ d$ \rho$ d$ \theta$ d$ \phi$.

Therefore, the mass of the star is

  $\displaystyle \int_{0}^{3}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$$\displaystyle \int_{0}^{{{\textstyle \pi}}}$(1 - $\displaystyle \rho^{2}_{}$)$\displaystyle \rho^{2}_{}$sin$\displaystyle \phi$ d$\displaystyle \phi$ d$ \theta$ d$\displaystyle \rho$    
  = $\displaystyle \int_{0}^{3}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$(10 - $\displaystyle \rho^{2}_{}$)$\displaystyle \rho^{2}_{}$(- cos$\displaystyle \phi$)$\displaystyle \bigg\vert _{{\phi=0}}^{{\phi={\textstyle \pi}}}$d$ \theta$ d$\displaystyle \rho$    
  = $\displaystyle \int_{0}^{3}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$(10 - $\displaystyle \rho^{2}_{}$)$\displaystyle \rho^{2}_{}$2d$ \theta$ d$\displaystyle \rho$    
  = $\displaystyle \int_{0}^{3}$4$ \pi$(10 - $\displaystyle \rho^{2}_{}$)$\displaystyle \rho^{2}_{}$d$\displaystyle \rho$ = $\displaystyle {\frac{{828 {\textstyle \pi}}}{{5}}}$ $\displaystyle \approx$ 520    

Cylinderical coordinates example

\includegraphics[width=2.in]{cylindrical.eps}
For cylindrical coordinates, the change of variables function is

(x, y, z) = T(r,$ \theta$, w)    

where the components of T are given by

x = r cos$ \theta$    
y = r sin$ \theta$    
z = w.    

We can compute that

$\displaystyle {\frac{{\partial (x,y,z)}}{{\partial (\rho,{\textstyle \theta},\phi)}}}$ = $\displaystyle \left\vert\vphantom{ \begin{array}{ccc} \rule[-0.2in]{0in}{0in} \...
...e \theta}} & \displaystyle \frac{\partial z}{\partial w} \end{array} }\right.$$\displaystyle \begin{array}{ccc} \rule[-0.2in]{0in}{0in} \displaystyle \frac{\p...
...\textstyle \theta}} & \displaystyle \frac{\partial z}{\partial w} \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{ccc} \rule[-0.2in]{0in}{0in} \disp...
...heta}} & \displaystyle \frac{\partial z}{\partial w} \end{array} }\right\vert$    
  = $\displaystyle \left\vert\vphantom{ \begin{array}{ccc} \cos{\textstyle \theta}& ...
...textstyle \theta}& r \cos{\textstyle \theta}&0 0 & 0 & 1 \end{array} }\right.$$\displaystyle \begin{array}{ccc} \cos{\textstyle \theta}& -r\sin{\textstyle \th...
... \sin{\textstyle \theta}& r \cos{\textstyle \theta}&0 0 & 0 & 1 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{ccc} \cos{\textstyle \theta}& -r\s...
...style \theta}& r \cos{\textstyle \theta}&0 0 & 0 & 1 \end{array} }\right\vert$    
  = r cos2$ \theta$ + r sin2$ \theta$ = r    

Volume changes by | r| = r (just like area change for polar coordinates). Replace dx dy dz by r dr d$ \theta$ dw.

Example: Find the volume of cone of height 1 and radius one. Bounded by surface z = $ \sqrt{{x^2+y^2}}$ and plane z = 1.

Volume is

$\displaystyle \int_{{-1}}^{{1}}$$\displaystyle \int_{{-\sqrt{1-x^2}}}^{{\sqrt{1-x^2}}}$$\displaystyle \int_{{\sqrt{x^2+y^2}}}^{{1}}$dz dy dz    

Easier to compute in cylindrical coordinates.

Cone is

0$\displaystyle \le$$ \theta$$\displaystyle \le$2$ \pi$,    0$\displaystyle \le$r$\displaystyle \le$1    
r$\displaystyle \le$z$\displaystyle \le$1    

Volume of cone is

  $\displaystyle \int_{0}^{1}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$$\displaystyle \int_{r}^{{1}}$r dz d$ \theta$ dr    
  = $\displaystyle \int_{0}^{1}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$(1 - r)r d$ \theta$ dr    
  = $\displaystyle \int_{0}^{1}$2$ \pi$(1 - r)r dr = $\displaystyle {\frac{{{\textstyle \pi}}}{{3}}}$    

Ice cream cone revisited

Armed with the knowledge of how to change to spherical coordinates, we can now revisit the ice cream cone example.

Earlier we tried to find the volume of an ice cream cone

\includegraphics[width=2in]{icecream.eps}
and discovered volume was

$\displaystyle \iiint_{W}^{}$dV = $\displaystyle \int_{{-1/\sqrt{2}}}^{{1/\sqrt{2}}}$$\displaystyle \int_{{-\sqrt{1/2-x^2}}}^{{\sqrt{1/2-x^2}}}$$\displaystyle \int_{{\sqrt{x^2+y^2}}}^{{\sqrt{1-x^2-y^2}}}$dz dy dx    

We need to describe the bounds in terms of spherical coordinates. Since the cone is symmetrical around the z axis, $ \theta$ is easy. 0$ \le$$ \theta$$ \le$2$ \pi$ in the cone and the ranges of the other variables don't depend on $ \theta$. Also, we see that 0$ \le$r$ \le$1, since a given line from the origin extends until it hits the sphere z = $ \sqrt{{1-x^2-y^2}}$, which is a sphere of radius 1. Lastly, $ \phi$ is determined by requiring that we are in the cone z$ \ge$$ \sqrt{{x^2+y^2}}$. (To see this is exactly a condition on $ \phi$, look at the reading on spherical coordinates.) On the cone, z = $ \sqrt{{x^2+y^2}}$, $ \phi$ = $ \pi$/4. Consquently, the condition on $ \phi$ is 0$ \le$$ \phi$$ \le$$ \pi$/4.

In summary, the ice cream cone is described by

0$\displaystyle \le$$ \theta$$\displaystyle \le$2$ \pi$,    0$\displaystyle \le$r$\displaystyle \le$1,    0$\displaystyle \le$$\displaystyle \phi$$\displaystyle \le$$ \pi$/4    

Changing to spherical coordinates, we calculate that the volume of the ice cream cone is

$\displaystyle \int_{0}^{1}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$$\displaystyle \int_{0}^{{{\textstyle \pi}/4}}$$\displaystyle \rho^{2}_{}$sin$\displaystyle \phi$d$\displaystyle \phi$ d$ \theta$ d$\displaystyle \rho$ = $\displaystyle \int_{0}^{1}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$[cos(0) - cos($ \pi$/4)]$\displaystyle \rho^{2}_{}$d$ \theta$ d$\displaystyle \rho$    
  = $\displaystyle \int_{0}^{1}$$\displaystyle \int_{0}^{{2{\textstyle \pi}}}$$\displaystyle {\frac{{2-\sqrt{2}}}{{2}}}$$\displaystyle \rho^{2}_{}$d$ \theta$ d$\displaystyle \rho$    
  = $\displaystyle \int_{0}^{1}$$ \pi$(2 - $\displaystyle \sqrt{{2}}$)$\displaystyle \rho^{2}_{}$d$\displaystyle \rho$    
  = $ \pi$$\displaystyle {\frac{{2-\sqrt{2}}}{{3}}}$    



Duane Nykamp
nykamp@math.umn.edu
2006-03-28