Chapter 1: Curvilinear Coordinates


Section 4.1: Spherical Polar Coordinates

Cartesian to Spherical: \( x=r\cos{\phi}\sin{\theta}, y=r\sin{\phi}\sin{\theta}, z=r\cos{\theta}\)

\(\boldsymbol{\hat{r}}, \boldsymbol{\hat{\theta}}, \boldsymbol{\hat{\phi}}\) - basis set associated with a particular point P. They change direction as P moves.

\(\boldsymbol{\hat{r}} = \sin{\theta}\cos{\phi}\boldsymbol{\hat{x}} + \sin{\theta}\sin{\phi}\boldsymbol{\hat{y}} + \cos{\theta}\boldsymbol{\hat{z}} \\ \boldsymbol{\hat{\theta}} = \cos{\theta}\cos{\phi}\boldsymbol{\hat{x}} + \cos{\theta}\sin{\phi}\boldsymbol{\hat{y}} - \sin{\theta}\boldsymbol{\hat{z}} \\ \boldsymbol{\hat{\phi}} = -\sin{\phi}\boldsymbol{\hat{x}} + \cos{\phi}\boldsymbol{\hat{y}}\)
Beware of differentiating a vector expressed in spherical coordinates, since unit vectors themselves are functions of position \(\frac{\partial{\hat{r}}}{\partial{\theta}} = \hat{\theta}\) (try differentiating \(\boldsymbol{\hat{r}}\))

Infinitesimal displacement in \(\boldsymbol{\hat{r}}\) is simply \(dl_r = dr\)
On the other hand, in \(\boldsymbol{\hat{\theta}}\), its not just \(dl_\theta\) but \(dl_{\theta} = r\partial{\theta}\)
In \(\boldsymbol{\hat{\phi}}\) direction, \(dl_{\phi} = r\sin{\theta}\partial{\phi}\)
Thus: \(dl = dr\boldsymbol{\hat{r}} + r\partial{\theta}\boldsymbol{\hat{\theta}} + r\sin{\theta}\partial{\phi}\boldsymbol{\hat{\phi}}\)
Volume element: \( d\tau = dl_r dl_{\theta} dl_{\phi} = r^2 \sin{\theta} \partial{r}\partial{\theta}\partial{\phi}\)

There is no general expression for area element \(\partial{a}\)

\(V = \int \partial{\tau} =\int_0^R \int_{\theta=0}^{\pi} \int_{\phi=0}^{2\pi} r^2 \sin{\theta} \partial{r}\partial{\theta}\partial{\phi} = \int_0^R r^2 \partial{r} \int_{\theta=0}^{\pi} \sin{\theta} \partial{\theta} \int_{\phi=0}^{2\pi} \partial{\phi} = (\frac{R^3}{3}) * 2 * 2\pi = \frac{4}{3}\pi R^3\) (formula for sphere volume)

Transalte vector derivatives into \(\boldsymbol{\hat{r}}, \boldsymbol{\hat{\theta}}, \boldsymbol{\hat{\phi}}\)
\(\nabla{T} = \frac{\partial{T}}{\partial{x}}\boldsymbol{\hat{x}} + \frac{\partial{T}}{\partial{y}}\boldsymbol{\hat{y}} + \frac{\partial{T}}{\partial{z}}\boldsymbol{\hat{z}} \Rightarrow\) Use chain rule: \( \frac{\partial{T}}{\partial{x}} = \frac{\partial{T}}{\partial{r}}\frac{\partial{r}}{\partial{x}} + \frac{\partial{T}}{\partial{\theta}}\frac{\partial{\theta}}{\partial{x}} + \frac{\partial{T}}{\partial{\phi}}\frac{\partial{\phi}}{\partial{x}} \rightarrow \)
Gradient: \(\nabla{T} = \frac{\partial{T}}{\partial{r}}\boldsymbol{\hat{r}} + \frac{1}{r}\frac{\partial{T}}{\partial{\theta}}\boldsymbol{\hat{\theta}} + \frac{1}{r\sin{\theta}}\frac{\partial{T}}{\partial{\phi}}\boldsymbol{\hat{\phi}}\)
Divergence: \(\nabla \cdot \boldsymbol{v} = \frac{1}{r^2}\frac{\partial}{\partial{r}}(r^2 v_r) + \frac{1}{r \sin{\theta}}\frac{\partial}{\partial{\theta}}(\sin{\theta} v_{\theta}) + \frac{1}{r \sin{\theta}}\frac{\partial}{\partial{\phi}}(v_{\phi})\)
Curl: \(\nabla \times \boldsymbol{v} = \frac{1}{r \sin{\theta}}[\frac{\partial}{\partial{\theta}}(\sin{\theta} v_{\phi}) - \frac{\partial{v_{\theta}}}{\partial{\phi}}]\boldsymbol{\hat{r}} + \frac{1}{r}[\frac{1}{\sin{\theta}}\frac{\partial{v_r}}{\partial{\phi}} - \frac{\partial}{\partial{r}}(r v_{\phi})]\boldsymbol{\hat{\theta}} + \frac{1}{r}[\frac{\partial}{\partial{r}}(r v_{\theta}) - \frac{\partial{v_r}}{\partial{\phi}}]\boldsymbol{\hat{\phi}}\)
Laplacian: \( \nabla^2{T} = \frac{1}{r^2}\frac{\partial}{\partial{r}}(r^2 \frac{\partial{T}}{\partial{r}}) + \frac{1}{r^2 \sin{\theta}}\frac{\partial}{\partial{\theta}}(\sin{\theta} \frac{\partial{T}}{\partial{\theta}}) + \frac{1}{r^2 \sin^2{\theta}}\frac{\partial^2{T}}{\partial^2{\phi}}\)

Relevant problems:
1.39: Check the divergence theorem for the functions:
  1. \(v_1 = r^2 \boldsymbol{\hat{r}}\), using as your volume the sphere of radius R, centered at the origin.
  2. Do the same for \(v_2 = \frac{1}{r^2} \boldsymbol{\hat{r}}\).

Recall divergence theorem from previous lectures.

  1. \(\nabla \cdot v_1 = \frac{1}{r^2} \frac{\partial}{\partial{r}} (r^2 * r^2) = \frac{1}{r^2} * 4r^3 = 4r \\ \int \nabla \cdot v_1 \partial{\tau} = \int 4r * r^2 \sin{\theta} \partial{r}\partial{\theta}\partial{\phi} = 4 \int_0^R r^3 \partial{r} \int_{\theta=0}^{\pi} \sin{\theta} \partial{\theta} \int_{\phi=0}^{2\pi} \partial{\phi} = 4 * (\frac{R^4}{4}) * 2 *2\pi = 4 \pi R^4 \\ \int v_1 \cdot \partial{a} = \int r^2 \boldsymbol{\hat{r}} \cdot r^2 \sin{\theta}\partial{\theta}\partial{\phi}\boldsymbol{\hat{r}} = r^4 \int_0^{\pi} \sin{\theta} \partial{\theta} \int_0^{2 \pi} \partial{\phi} = R^4 *2 *2 * \pi = 4 \pi R^4\)
  2. \(\nabla \cdot v_2 = \frac{1}{r^2} \frac{\partial}{\partial{r}} (r^2 * \frac{1}{r^2}) = 0 \rightarrow \int \nabla \cdot v_2 \partial{\tau} = 0 \\ \int v_2 \cdot \partial{a} = \int (\frac{1}{r^2}\boldsymbol{\hat{r}}) \cdot (r^2 \sin{\theta}\partial{\theta}\partial{\phi}\boldsymbol{\hat{r}}) = \int \sin{\theta}\partial{\theta}\partial{\phi} = 4 \pi\)
In b) the results don't agree! The point is that this divergence is 0 except at the origin, where it blows up, so our calculation of \(\int \nabla \cdot v_2 \partial{\tau}\) is incorrect.
Correct answer \(4 \pi\)
1.40: Compute the divergence of the function \(v = (r\cos{\theta})\boldsymbol{\hat{r}} + (r\sin{\theta})\boldsymbol{\hat{\theta}} + (r\sin{\theta}\cos{\phi})\boldsymbol{\hat{\phi}}\). Check the divergence theorem for this function, using as your volume the inverted hemispherical bowl of radius R, resting on the xy plane and centered at the origin

Recall divergence theorem from previous lectures. Calculate volume and surface integrals separately and compare results.

Divergence theorem: \(\int_V (\nabla \cdot \boldsymbol{v})\partial{\tau} = \oint_S \boldsymbol{v} \cdot \partial{a} \)
\(\nabla \cdot \boldsymbol{v} = \frac{1}{r^2}\frac{\partial}{\partial{r}}(r^2 * r\cos{\theta}) + \frac{1}{r \sin{\theta}}\frac{\partial}{\partial{\theta}}(\sin{\theta} * r\sin{\theta}) + \frac{1}{r \sin{\theta}}\frac{\partial}{\partial{\phi}}(r\sin{\theta}\cos{\theta}) = \frac{1}{r^2}*3r^2*\cos{\theta} + \frac{1}{r\sin{\theta}}*2r\sin{\theta}\cos{\theta}+\frac{1}{r\sin{\theta}}*r\sin{\theta}*(-\sin{\phi}) = \\ = 3\cos{\theta} + 2\cos{\theta} - \sin{\phi} = 5\cos{\theta} - \sin{\phi}\)
Take volume integral in spherical coordinates:
\(\int_V (\nabla \cdot \boldsymbol{v})\partial{\tau} = \int (5\cos{\theta} - \sin{\phi}) r^2 \sin{\theta} \partial{r}\partial{\theta}\partial{\phi} = \int_0^R r^2 \partial{r} \int_0^{\pi/2}[ \int_0^{2\pi}(5\cos{\theta} - \sin{\phi}) \partial{\phi}] \sin{\theta}\partial{\theta} = \int_0^R r^2 \partial{r} \int_0^{\pi/2}[ \underbrace{\int_0^{2\pi}(5\cos{\theta}\partial{\phi})}_{10\pi\cos{\theta}\partial{\phi}} - \underbrace{\int_0^{2\pi}(\sin{\phi}\partial{\phi})}_{0} \partial{\phi}] \sin{\theta}\partial{\theta} = \\ = \frac{R^3}{3}*10\pi*\int_0^{\pi/2}\underbrace{\sin{\theta}}_{u}\underbrace{\cos{\theta}}_{du}\partial{\theta} = \frac{R^3}{3}*10\pi* \frac{\sin^2{\theta}}{2} \Bigr|_{0}^{\pi/2} = \frac{R^3}{3}*10\pi* \frac{1}{2} = \require{enclose}\enclose{box}[mathcolor="black"]{\frac{5\pi}{3}R^3}\)
Take surface integral of two surfaces = hemisphere + flat bottom
Hemisphere (radius does not change): \(\partial{a} = dl_{\theta} dl_{\phi}\boldsymbol{\hat{r}} = R^2\sin{\theta}\partial{\theta}\partial{\phi}\boldsymbol{\hat{r}} \text{(points outward)}\)
\( \int_{S\text{hemisphere}} v \cdot \partial{a} = \int r\cos{\theta}\boldsymbol{\hat{r}} \cdot R^2\sin{\theta}\partial{\theta}\partial{\phi}\boldsymbol{\hat{r}} = R^3 \int_0^{\pi/2} \sin{\theta}\cos{\theta}\partial{\theta} \int_0^{2\pi}\partial{\phi} = R^3 * \frac{1}{2} * 2\pi = \pi R^3\)
Flat bottom (theta does not change \(\theta = \frac{\pi}{2}\)): \(\partial{a} = dl_{r} dl_{\phi}\boldsymbol{\hat{\theta}} = r\underbrace{\sin{\theta}}_{\sin{\pi/2}=1}\partial{r}\partial{\phi}\boldsymbol{\hat{\theta}}=r\partial{r}\partial{\phi}\boldsymbol{\hat{\theta}}\)
\( \int_{S\text{bottom}} v \cdot \partial{a} = \int r\sin{\theta}\boldsymbol{\hat{\theta}} \cdot r\partial{r}\partial{\phi}\boldsymbol{\hat{\theta}} = \int_0^R r^2\partial{r}*1 \int_0^{2\pi} \partial{\phi} = 2\pi * \frac{R^3}{3} = \frac{2\pi R^3}{3}\)
Add two surface integrals: \( \int_S v \cdot \partial{a} = \pi R^3 + \frac{2\pi R^3}{3} = \require{enclose}\enclose{box}[mathcolor="black"]{\frac{5\pi}{3}R^3}\)
Divergence theorem works.

Section 4.2: Cylindrical Polar Coordinates

Cartesian to Cylindrical: \( x=r\cos{\phi}, y=r\sin{\phi}, z=z \)

Notes:

Path element: \(dl = ds\boldsymbol{\hat{s}} + s\partial{\phi}\boldsymbol{\hat{\phi}} + \partial{z}\boldsymbol{\hat{z}}\)
Volume element: \( d\tau = dl_s dl_{\phi} dl_{z}= r \partial{r}\partial{\phi}\partial{z}\)
Range: \(r: 0 \rightarrow \infty, \phi: 0 \rightarrow 2\pi, z: -\infty \rightarrow \infty \)

Gradient: \(\nabla{T} = \frac{\partial{T}}{\partial{s}}\boldsymbol{\hat{s}} + \frac{1}{r}\frac{\partial{T}}{\partial{\phi}}\boldsymbol{\hat{\phi}} + \frac{\partial{t}}{\partial{z}}\boldsymbol{\hat{z}}\)
Divergence: \(\nabla \cdot \boldsymbol{v} = \frac{1}{s}\frac{\partial}{\partial{s}}s v_s + \frac{1}{s}\frac{\partial{v_{\phi}}}{\partial{\phi}} + \frac{\partial{v_z}}{\partial{z}}\)
Curl: \(\nabla \times \boldsymbol{v} = (\frac{1}{s}\frac{\partial{v_z}}{\partial{\phi}} - \frac{\partial{v_{\phi}}}{\partial{z}})\boldsymbol{\hat{s}} + (\frac{\partial{v_{s}}}{\partial{z}} - \frac{\partial{v_{z}}}{\partial{s}})\boldsymbol{\hat{\phi}} + \frac{1}{s}( \frac{\partial}{\partial{s}}(s v_{\phi}) - \frac{\partial{s}}{\partial{\phi}} )\boldsymbol{\hat{z}}\)
Laplacian: \( \nabla^2{T} = \frac{1}{s}\frac{\partial}{\partial{s}}(s \frac{\partial{T}}{\partial{s}}) + \frac{1}{s^2}\frac{\partial^2{T}}{\partial^2{\phi}} + \frac{\partial^2{T}}{\partial^2{z}} \)