Phys115-Vector_Calculus

Prerequisites: vectors will be denoted as: \(\vec{v}\), and unit vectors: \(\hat{i}\). Furthermore, \(\phi\) will mostly be used to represent a scalar field, and \(\vec{a}\) will be used to represent a vector field.

Parametric Surfaces

A parametric representation of a surface is given as: \[ r(u,v)=x(u,v)\hat{i}+y(u,v)\hat{j}+z(u,v)\hat{k} \] Example: A paraboloid is given by \[ r(u,v)=u\cos(v)\hat{i}+u\sin(v)\hat{j}+u^2\hat{k},\qquad0\leq u\leq 1,\quad 0\leq v\leq 2\pi \]
Paraboloid.png

Infinitesimal displacement within a surface

The infinitesimal displacement \(d\vec{r}\) within the surface due to an infinitesimal change in \(u\) and an infinitesimal change in \(v\) is derived from the chain rule: \[ d\vec{r}=\frac{\partial\vec{r}}{\partial u}du+\frac{\partial\vec{r}}{\partial v}dv \] Some shorthand: The vectors \(\partial_u\vec{r}, \partial_v\vec{r}\), are tangent to the surface, where \(\partial_u\) is shorthand for \(\partial/\partial u\), and \(\partial_v\) for \(\partial/\partial v\).

Surface Area

The surface area is obtained by summing over the areas of a finite number of small surface elements and letting the number of elements tend to infinity. Thus \[ \textrm{surface area}=\lim_{N\to\infty}\sum_N\Delta S=\int ds \] where \(dS\) is the infinitesimal scalar area element given by \[ dS=|\partial_u\vec{r}\;du\times\partial_v\vec{r}\;dv|=|\partial_u\vec{r}\times\partial_v\vec{r}|\;du\;dv \] hence: \[ S=\int^{u_2}_{u_1}\int^{v_2}_{u_1}|\partial_u\vec{r}\times\partial_v\vec{r}|du\;dv \]

Volume of a 3D region

You can expand this idea to volumes: \[ \vec{r}(u,v,w)=x(u,v,w)\hat{i}+y(u,v,w)\hat{j}+z(u,v,w)\hat{k} \] The infinitesimal displacement \(d\vec{r}\) is \[ d\vec{r}=\frac{\partial \vec{r}}{\partial u}du+\frac{\partial\vec{r}}{\partial v}dv+\frac{\partial\vec{r}}{\partial w}dw \] the volume \(dV\) of the corresponding infinitesimal parallelepiped is \[ dV=|\partial_u\vec{r}\;du\cdot(\partial_v\vec{r}\;dv\times\partial_w\vec{r}\;dw)| \] Hence, the volume of the 3D region is \[ V=\int^{u_2}_{u_1}\int^{v_2}_{v_1}\int^{w_2}_{w_1}|\partial_u\vec{r}\cdot(\partial_v\vec{r}\times\partial_w\vec{r})|dw\;dv\;du \]

Grad, Div and Curl

Three important operations on scalar / vector fields

Mathematical Definitions

So what is Nabla (\(\nabla\))? Nabla is both a vector operator and a vector: \[ \nabla=\left(\frac{\partial}{\partial x},\frac{\partial}{\partial y},\frac{\partial}{\partial z}\right) \] Now, the complicated bits: \[\begin{align} \nabla\phi&=\frac{\partial\phi}{\partial x}\hat{i}+\frac{\partial\phi}{\partial y}\hat{j}+\frac{\partial\phi}{\partial z}\hat{k}:\;\;\textrm{The gradient of \(\phi\). (becomes vector field)}\\ \nabla\cdot\vec{a}&=\frac{\partial a_x}{\partial x}+\frac{\partial a_y}{\partial y}+\frac{\partial a_z}{\partial z}:\;\;\textrm{The divergence of \(\vec{a}\) (becomes scalar field)}\\ \nabla\times\vec{a}&=\left|\begin{matrix} \hat{i}&\hat{j}&\hat{k}\\ \partial_x&\partial_y&\partial_z\\ a_x&a_y&a_z\\ \end{matrix}\right|:\;\;\textrm{The curl of \(\vec{a}\) (stays vector field)}\\ \end{align}\] ...as you can see, the divergence is basically the dot product of \(\nabla\) and \(\vec{a}\), and the curl is basically the cross product of \(\nabla\) and \(\vec{a}\)

So what are they, and what do they do?

The gradient

...Creates a vector field from a scalar. Every point is a vector, whose direction and magnitude represents the gradients (of the scalar field) direction and magnitude. The direction corresponds to the MAXIMUM rate of change. For example: The gradient of this level surface of the scalar field: (\(\phi=y^2-x^2\))
ScalarFieldEx1.png
...looks like (\(\nabla\phi=-2x\hat{i}+2y\hat{j}\)):
GradOfEx1.png

Divergence

This tells you how much a vector field is "sourcing" or "sinking". You can imagine this like a tap or a drain in a sink. It is positive is the field is exiting a point more than it is entering, and negative if vice versa. I will only visualise the field here (in 2D) as I do not have time to do it in 3D. Example for the field \(\vec{a}=x\hat{i}+y\hat{j}\):
DivEx1.png
\[ \nabla\cdot\vec{a}=1+1=2>0 \] hence this field has a divergence of 2 everywhere, i.e. the field is exiting more than entering at all points. Note: A field is solenoidal over a region if the divergence at all point in that region is 0.

Curl

This tells you how much a vector field is rotating around a point. It is more of a 3D idea, but it is hard to plot so I will simplify to 2D. The curl (like the cross product) in 2D exists only in the \(\hat{k}\) direction. In 3D this is not true. Example for the field \(\vec{a}=-y\hat{i}+x\hat{j}\):
CurlEx1.png
\[ \nabla\times\vec{a}=1-(-1)=2>0 \] Note: A field is irrotational over a region if the curl at all point in that region is 0.

Identities Involving \(\nabla\)

Considering that the various operations involving \(\nabla\) are just specific cases of first-order partial differentiation with respect to \(x\), \(y\), \(z\), it is unsurprising that \(\nabla\) has similar properties to its 1D counterpart \(d/dx\) . \(\nabla\) is distributive: \[\begin{align} \nabla(\phi+\psi)&=\nabla\phi+\nabla\psi\\ \nabla\cdot(\vec{a}+\vec{b})&=\nabla\cdot\vec{a}+\nabla\cdot\vec{a}\\ \nabla\times(\vec{a}+\vec{b})&=\nabla\times\vec{a}+\nabla\times\vec{a}\\ \end{align}\] ...and satisfies the product rule: \[\begin{align} \nabla(\phi\psi)&=(\nabla\phi)\psi+\phi(\nabla\psi)\\ \nabla\cdot(\phi\vec{a})&=(\nabla\phi)\cdot\vec{a}+\phi(\nabla\cdot\vec{a})\\ \nabla\times(\phi\vec{a})&=(\nabla\phi)\times\vec{a}+\phi(\nabla\times\vec{a})\\ \end{align}\] A bit of thought also reveals that \(\nabla\) satisfies the chain rule when acting on a scalar field \(f(\psi)\) that has been expressed as a function of the scalar field \(\psi\): \[ \nabla\left[f(\psi)\right]=\frac{df}{d\psi}\nabla\psi \] Second Order Two very important identites: \[\begin{align} \nabla\times(\nabla\phi)&=0\\ \nabla\cdot(\nabla\times\vec{a})&=0\\ \end{align}\]

The Laplacian (\(\nabla^2\))

The Laplacian acts differently on scalar and vector fields. Its action on scalar fields is defined as: \[ \nabla^2\phi=\nabla\cdot(\nabla\phi) \] The action of the Laplacian on vector fields is more subtle. It is defined as follows: \[ \nabla^2\vec{a}=\nabla(\nabla\cdot\vec{a})-\nabla\times(\nabla\times\vec{a}) \]

Level Surfaces Of a Scalar Field

A level surface is where we set a scalar field to be constant. I.e.: \[ \phi(x,y,z)=c \] Geometrically, this surface sits within the field, and is just a collection of all of the points where the field is equal to \(c\). A normal to the level surface is obtained by working out \(\nabla\phi\) at the level surface \(\phi(x,y,z)=c\). We write this as \[ \left.\vec{n}=\nabla\phi\right|_{\phi=c} \] to remind us that \(\vec{n}\) lives on on the level surface

Important Note

If we express this level surface parametrically, (\(\vec{r}(u,v)\)), then we can say that the normal must be \(\partial_u\vec{r}\times\partial_v\vec{r}\). Hence the identity: \[ \partial_u\vec{r}\times\partial_v\vec{r}=\lambda\vec{n} \] where \(\lambda\) is some function of \(u\) and \(v\) and \(\left.\vec{n}=\nabla\phi\right|_{\phi=c}\).

Curvilinear Coordinate Systems

When you express \(x,\;y,\;z\) in terms of \(u_1,\;u_2,\;u_3\) such that:\[x=x(u_1,u_2,u_3),\quad y=y(u_1,u_2,u_3),\quad z=z(u_1,u_2,u_3)... \]

There are the two known examples of cylindrical and spherical polar coordinates. For cylindrical coordinates, you have: \[\begin{align} x=&r\cos(\phi)\\ y=&r\sin(\phi)\\ z=&z \end{align}\] and for spherical: \[\begin{align} x=&\rho\sin(\theta)\cos(\phi)\\ y=&\rho\sin(\theta)\sin(\phi)\\ z=&\rho\cos(\theta) \end{align}\] an easy way to remember spherical coordinates is to use cylindrical coordinates and the fact that \(\rho=r\sin(\theta)\)

Bases for Vector Fields

There are two methods to construct a vector basis from curvilinear coordinates (\(u_1,\;u_2,\;u_3\)). Tangents to coordinate curves, or normals to coordinate surfaces.

1: Tangents to coordinate curves

If you imagine fixing all but one of your parameters that make up your coordinate system, and plot a curve as you vary the unfixed parameter, the tangent to this curve will form a base for the vector field. Repeat this through your parameters and you have a basis: \[ \vec{e_1}=\frac{\partial\vec{r}}{\partial u_1},\quad\vec{e_2}=\frac{\partial\vec{r}}{\partial u_2},\quad\vec{e_3}=\frac{\partial\vec{r}}{\partial u_3} \] where \(\vec{r}=x\hat{i}+y\hat{j}+z\hat{k}\) It is sometimes important to normalise these, such that their lengths are 1. To find the normalised basis (\(\hat{e}_1\)), we simply compute: \[ \hat{e}_1=\frac{\vec{e}_1}{|\vec{e}_1|} \] Example: Cylindrical Polar Coordinates \[ \vec{r}(\rho,\phi,z)=\rho\cos(\phi)\hat{i}+\rho\sin(\phi)\hat{j}+z\hat{k} \] We can obtain: \[\begin{align} \vec{e}_\rho&=\partial_\rho\vec{r}=\cos(\phi)\hat{i}+\sin(\phi)\hat{j}\\ \vec{e}_\phi&=\partial_\phi\vec{r}=-\rho\sin(\phi)\hat{i}+\rho\cos(\phi)\hat{j}\\ \vec{e}_z&=\partial_z\vec{r}=\hat{k}\\ \end{align}\] then \[\begin{align} \hat{e}_\rho&=\cos(\phi)\hat{i}+\sin(\phi)\hat{j}\\ \hat{e}_\phi&=-\sin(\phi)\hat{i}+\cos(\phi)\hat{j}\\ \hat{e}_z&=\hat{k}\\ \end{align}\]

2: Normals To Coordinate Surfaces

First, consider the inverse transformation: \[ u_1=u_1(x,y,z),\quad u_2=u_2(x,y,z),\quad u_3=u_3(x,y,z) \] Setting \(u_1\), \(u_2\) or \(u_3\) to constants will yield three level surfaces. This leads to the basis \(\epsilon_1, \epsilon_2, \epsilon_3\) given by: \[ \epsilon_1=\nabla u_1,\quad \epsilon_1=\nabla u_2,\quad \epsilon_1=\nabla u_3,\quad \] It is sometimes important to normalise these, such that their lengths are 1. To find the normalised basis (\(\hat{\epsilon_1}\)), we simply compute: \[ \hat{\epsilon_1}=\frac{\epsilon_1}{|\epsilon_1|} \] The unit bases from both methods are not always the same. They are only equivalent when the coordinate curves intersect at right angles, i.e. the basis \(\vec{e}_1,\vec{e}_2,\vec{e}_3\) is orthogonal. We call such coordinate systems orthogonal and Cartesian coordinates, cylindrical polar coordinates and spherical polar coordinates are examples of orthogonal coordinate systems.

Gradient In Curvilinear Coordinates

Since \[ \frac{\partial\phi}{\partial u_1}=\frac{\partial\phi}{\partial x}\frac{\partial x}{\partial u_1}+\frac{\partial\phi}{\partial y}\frac{\partial y}{\partial u_1}+\frac{\partial\phi}{\partial z}\frac{\partial z}{\partial u_1} \] using the chain rule, it follows that \[ \frac{\partial\phi}{\partial u_1}=\frac{\partial\vec{r}}{\partial u_1}\cdot\nabla\phi \] with more manipulation (and an identity) \[ \nabla\phi=\frac{1}{h_1}\frac{\partial\phi}{\partial u_1}\hat{e}_1+\frac{1}{h_2}\frac{\partial\phi}{\partial u_2}\hat{e}_2+\frac{1}{h_3}\frac{\partial\phi}{\partial u_3}\hat{e}_3 \] where \(h_n\) is the scale factor \(|\vec{e_n}|\)

Divergence In Curvilinear Coordinates

We do not need to remember the derivation, so I shall just state them: Cylindrical Polar Coordinates: \[ \nabla\cdot\vec{a}=\frac{1}{\rho}\frac{\partial(\rho a_\rho)}{\partial\rho}+\frac{1}{\rho}\frac{\partial a_\phi}{\partial\phi}+\frac{\partial a_z}{\partial z} \] Spherical Polar Coordinates: \[ \nabla\cdot\vec{a}=\frac{1}{\rho^2}\frac{\partial(\rho^2 a_\rho)}{\partial\rho}+\frac{1}{\rho\sin(\phi)}\frac{\partial\sin(\phi)a_\theta}{\partial \theta}+\frac{1}{\rho\sin(\phi)}\frac{\partial a_\phi}{\partial\phi} \]

Curl In Curvilinear Coordinates

We do not need to remember the derivation, so I shall just state them: Cylindrical Polar Coordinates: \[ \nabla\times\vec{a}=\frac{1}{\rho}\left|\begin{matrix} \hat{e_\rho}&\rho\hat{e_\phi}&\hat{e_z}\\ \partial_\rho&\partial_\phi&\partial_z\\ a_\rho&\rho a_\phi&a_z \end{matrix}\right| \] Spherical Polar Coordinates: \[ \nabla\times\vec{a}=\frac{1}{\rho^2\sin(\theta)}\left|\begin{matrix} \hat{e_\rho}&\rho\hat{e_\theta}&\rho\sin(\theta)\hat{e_\phi}\\ \partial_\rho&\partial_\theta&\partial_\phi\\ a_\rho&\rho a_\theta&\rho\sin(\theta)a_\phi \end{matrix}\right| \]

Line Integrals

In practice, a good way to evaluate such integrals is to introduce a parametric form \(r=r(u)\) for \(C\): \[\begin{align} \int_C\phi\;d\vec{r}&=\int^{u_2}_{u_1}\phi(\vec{r}=\vec{r}(u))\frac{d\vec{r}}{du}du\\ \int_C\vec{a}\cdot d\vec{r}&=\int^{u_2}_{u_1}\vec{a}(\vec{r}=\vec{r}(u))\cdot\frac{d\vec{r}}{du}du\\ \int_C\vec{a}\times d\vec{r}&=\int^{u_2}_{u_1}\vec{a}(\vec{r}=\vec{r}(u))\times\frac{d\vec{r}}{du}du\\ \end{align}\] Example:
VectorCalcLineInts.png

Green's Theorem

Quick Note: we always traverse boundaries with the surface/volume/area to our left. Green's theorem is essentially a 2D stokes theorem. It tells us that the total amount of field in line with the boundary \(C\), is equal to the sum of the curl of the field over the entire area. \[ \boxed{\oint_C\left(P\;dx+Q\;dy\right)=\iint_R\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\;dxdy} \] where \(\vec{a}=P(x,y)\hat{i}+Q(x,y)\hat{j}\) ...or in more general form: \[ \oint_C\vec{a}\cdot d\vec{r}=\iint_R(\nabla\times\vec{a})\; dA \]

Surface Integral

Pretty much the same as line integrals. Remember that: \[ d\vec{S}=\hat{n}\;dS \] and \[ dS=|\partial_u\vec{r}\times\partial_v\vec{r}|du\;dv \] hence \[ d\vec{S}=\partial_u\vec{r}\times\partial_v\vec{r}\;du\;dv \]

Volume Integrals & Jacobian

The volume \(dV\) of the parallelepiped formed by the infinitesimal displacements \(\vec{e_1}du_1,\;\vec{e_2}du_2,\;\vec{e_3}du_3\) is \[ dV=|\vec{e_1}\cdot(\vec{e_2}\times\vec{e_3})|du_1\;du_2\;du_3 \] ...Which the elegant way of writing is: \[ dV=\left|\begin{matrix} \frac{\partial x}{\partial u_1}&\frac{\partial y}{\partial u_1}&\frac{\partial z}{\partial u_1}\\ \frac{\partial x}{\partial u_2}&\frac{\partial y}{\partial u_2}&\frac{\partial z}{\partial u_2}\\ \frac{\partial x}{\partial u_3}&\frac{\partial y}{\partial u_3}&\frac{\partial z}{\partial u_3}\\ \end{matrix}\right| du_1\;du_2\;du_3 \] for \(\vec{r}(u_1,u_2,u_3)=x(u_1,u_2,u_3)\hat{i}+y(u_1,u_2,u_3)\hat{j}+z(u_1,u_2,u_3)\hat{k}\)

The Jacobian

The Jacobian is part of that expression above. Specifically: \[ J=|\vec{e_1}\cdot(\vec{e_2}\times\vec{e_3})|=\left|\begin{matrix} \frac{\partial x}{\partial u_1}&\frac{\partial y}{\partial u_1}&\frac{\partial z}{\partial u_1}\\ \frac{\partial x}{\partial u_2}&\frac{\partial y}{\partial u_2}&\frac{\partial z}{\partial u_2}\\ \frac{\partial x}{\partial u_3}&\frac{\partial y}{\partial u_3}&\frac{\partial z}{\partial u_3}\\ \end{matrix}\right| \] Hence, in curvilinear coordinates: \[ \iiint_VdV=\iiint_VJ\;du_1du_2du_3 \] The Jacobian is commonly denoted: \[ J=\frac{\partial (x,y,z)}{\partial (u_1,u_2,u_3)} \] Note that the volume element \(dV\) has a particularly simple form when expressed in orthogonal curvilinear coordinates. The scale factors \(h_1,\;h_2,\;h_3\) satisfy: \[ \vec{e_1}=h_1\hat{e_1},\quad\vec{e_2}=h_2\hat{e_2},\quad\vec{e_3}=h_3\hat{e_3} \] therefore for orthogonal curvilinear coordinates ONLY: \[ J=h_1h_2h_3 \]

Gauss' Divergence Theorem

This theorem basically says: The flux of a field through a closed surface, is equal to the divergence of the field within the volume bound by the surface. More simply: Net flow out of region = Sum of sources in region. \[ \boxed{\iiint_V\nabla\cdot\vec{a}\;dV=\oint_S\vec{a}\cdot d\vec{S}} \]

Stokes Theorem

A more general form of Green's theorem. The total field in line with the boundary \(C\), is equal to the flux of the curl of the field through surface. \[ \boxed{\oint_C\vec{a}\cdot d\vec{r}=\iint_S(\nabla\times\vec{a})\cdot d\vec{S}} \] The direction of \(C\) is that the surface is on the left. The direction of \(dS\) is normal to the surface \(S\). Specifically, the direction of \(dS\) is the cross product of the direction of \(C\) and a tangent to \(S\).