5  Vector Calculus

5.1 Differentiation of Vectors

Lets consider the derivative of \(\mathbf{a}(u)\) with respect to \(u\). The derivative of a vector is defined in a similar way to the derivative of a scaler. \[ \begin{aligned} \Delta \mathbf{a} = \mathbf{a}(u+\Delta u)-\mathbf{a}(u)\\ \\ \frac{d\mathbf{a}}{du} = \lim _{\Delta u \rightarrow 0} \frac{\mathbf{a}(u+\Delta u) - \mathbf{a}(u)}{\Delta u} \end{aligned} \] \(\frac{d\mathbf{a}}{du}\) is a vector. In Cartesian coordinates \[ \begin{aligned} & \text { if } \mathbf{a}=a_{x} \hat{\imath}+a_{y} \hat{\jmath}+a_{z} \hat{k} \\ \\ & \frac{d \mathbf{a}}{d u}=\frac{d a_{x}}{d u} \hat{\imath}+\frac{d a_{y}}{d u} \hat{\jmath}+\frac{d a_{z}}{d u} \hat{k}. \end{aligned} \]

Lets find the velocity of a particle \[ \begin{aligned} & \mathbf{r}(t)=x(t) \hat{\imath}+y(t) \hat{\jmath}+z(t) \hat{k} \\ \\ & \mathbf{v}(t)=\frac{d \mathbf{r}}{d t}=\frac{d x}{d t} \hat{\imath}+\frac{d y}{d t} \hat{\jmath}+\frac{d z}{d t} \hat{k} \end{aligned} \]

The direction of \(\mathbf{v}(t)\) is tangent to the path \(\mathbf{r}(t)\) and \(|\mathbf{v}(t)|\) is the speed of the particle. \[ \mathbf{a}(t)=\frac{d \mathbf{v}}{d t}=\frac{d^{2} x}{d t^{2}} \hat{\imath}+\frac{d^{2} y}{d \hat{t}^{2}} \hat{j}+\frac{d^{2} z}{d t^{2}} \hat{k} \]

Question

\(\mathbf{r}(t) = 2 t^{2} \hat{\imath}+(3 t-2) \hat{\jmath}+\left(3 t^{2}-1\right) \hat{k}\) Find the speed of the particle at \(t=1\) and the component of its acceleration in the direction \(\mathbf{s} = \hat{\imath} + 2 \hat{j} + \hat{k}\).

\[ \begin{aligned} & \frac{d \mathbf{r}}{d t}=4 t \hat{\imath}+3 \hat{\jmath}+6 t \hat{k} \\ & v(1)=\sqrt{4^{2}+9+36} \\ & =\sqrt{61} \end{aligned} \]

Now lets find the acceleration: \(\mathbf{a}=4 \hat{\imath}+6 \hat{k}\) \(\mathbf{a}\) is independent of time.

To find the component of \(\mathbf{a}\) in the direction of \(\mathbf{s}\) we need to find the unit vector \(\hat{s}\) and project \(\mathbf{a}\) in that direction: \[ \mathbf{a} \cdot \hat{s}=(4 \hat{\imath}+6 \hat{k}) \cdot(\hat{\imath}+2 \hat{\imath}+\hat{k}) / \sqrt{6}=(4+0+6) / \sqrt{6} = 5\sqrt{6}/3 \]

5.1.1 Plane Polar Coordinates

What if another coordinate system is more appropriate? Most vector basis vectors are not fixed and time independent like Cartesian basis vectors. This means that when a vector is differentiated the basis vector must be differentiated as well.

Plane Polar Coordinates

Lets start by writing the polar coordinates in terms of Cartesian \(\hat{i}+\hat{\jmath}\) \[ \begin{aligned} & \hat{e}_{\rho}=\cos \phi \hat{\imath}+\sin \phi \hat{\jmath} \\ & \hat{e}_{\phi}=-\sin \phi \hat{\imath}+\cos \phi \hat{\jmath} \\ & \frac{d \hat{e}_{\rho}}{d t}=-\sin \phi \frac{d \phi}{d t} \hat{\imath}+\cos \phi \frac{d \phi}{d t} \hat{\jmath} \\ & =\dot{\phi} \hat{e}_{\phi} \\ & \frac{d \hat{e}_\phi}{d t}=-\cos \phi \frac{d \phi}{d t} \hat{\imath}-\sin \phi \frac{d \phi}{d t} \hat{\jmath} \\ & \frac{d \hat{e}_{\phi}}{d t}=-\dot{\phi} \hat{e}_{\rho} \end{aligned} \]

The overdot is standard notation for a time derivative.

Question

\(\mathbf{r}(t)=\rho(t) \hat{e}_\rho\). Find \(\mathbf{v}(t)\) and \(\mathbf{a}(t)\) in these coordinates.

\[ \begin{aligned} & \mathbf{v}(t)=\dot{\mathbf{r}}(t)=\dot{\rho} \hat{e}_{\rho}+\rho \dot{\hat{e}}_{\rho}=\dot{\rho} \hat{e}_{\rho}+\rho \dot{\phi} \hat{e}_{\phi} \\ & \mathbf{a}(t)=\frac{d}{d t}\left(\dot{\rho} \hat{e}_{\rho}+\rho \dot{\phi} {\hat{e}_\phi}\right) \\ & =\ddot{\rho} \hat{e}_{\rho}+\dot{\rho} \dot{\hat{e}}_{\rho}+\dot{\rho} \dot{\phi} \hat{e}_{\phi}+\rho \ddot{\phi} \hat{e}_{\phi}+\rho \dot{\phi} \dot{\hat{e}}_{\phi} \\ & =\ddot{\rho} \hat{e}_{\rho}+\dot{\rho} \dot{\phi} \hat{e}_{\phi}+\dot{\rho} \dot{\phi} \hat{e}_{\phi}+\rho \ddot{\phi} \hat{e}_{\phi}-\rho \dot{\phi}^{2} \hat{e}_\rho \\ & =\left(\ddot{\rho}-\rho \dot{\phi}^{2}\right) \hat{e}_{\rho}+(2 \dot{\rho} \dot{\phi}+\rho \ddot{\phi}) \hat{e}_{\phi} \end{aligned} \]

5.1.2 Differentiation of composite vector expressions

Lets consider a scalar \(\phi\) and a vectors \(\mathbf{a}\) and \(\mathbf{b}\). \[ \begin{aligned} & \frac{d}{d u}(\phi \mathbf{a})=\phi \frac{d \mathbf{a}}{d u}+\frac{d \phi}{d u} \mathbf{a} \\ & \frac{d}{d u}(\mathbf{a} \cdot \mathbf{b})=\mathbf{a} \cdot \frac{d \mathbf{b}}{d u}+\frac{d \mathbf{a}}{d u} \cdot \mathbf{b} \\ & \frac{d}{d u}(\mathbf{a} \times \mathbf{b})=\mathbf{a} \times \frac{d \mathbf{b}}{d u}+\frac{d \mathbf{a}}{d u} \times \frac{\mathbf{b}}{d u} \end{aligned} \]

Question

A particle of mass \(m\) with position vector \(\mathbf{r}\) relative to some origin \(O\) experiences a force \(\mathbf{F}\) which produces a torque (moment) \(\mathbf{T}=\mathbf{v} \times \mathbf{F}\) about \(O\). The angular momentum is given by \(\mathbf{L}=\mathbf{r} \times m \mathbf{v}\). Show that the time rate of change angular momentum \(\frac{d \mathbf{L}}{d t}=\mathbf{T}\)

5.2 Vector Operators

Suppose that we have a function of one variable \(f(x)\)

Question

Q. What does the derivative \(\frac{d f}{d x}\) tell us?

\(\frac{d f}{d x}\) increases as we move away from the origin.

So what happens when a function depends on more than one variable? Lets take temperature in a room - \(T(x, y, z)\) ? \[ d T=\left(\frac{\partial T}{\partial x}\right) d x+\left(\frac{\partial T}{\partial y}\right) d y+\left(\frac{\partial T}{\partial z}\right) d z \]

\(dT\) describes mathematically how T varies when we chance all variables \(x, y\), and \(z\) a little bit \(d x, d y, d z\).

5.2.1 Gradient

We can rewrite the above as a dot product: \[ d T=\left(\frac{\partial T}{\partial x} \hat{x}+\frac{\partial T}{\partial y} \hat{y}+\frac{\partial T}{\partial z} \hat{z}\right) \cdot(d x \hat{x}+d y \hat{y}+d z \hat{z}) \] \[ \begin{aligned} & d T=\nabla T \cdot d \underline{l} \\ & \nabla T=\frac{\partial T}{\partial x} \hat{x}+\frac{\partial T}{\partial y} \hat{y}+\frac{\partial T}{\partial z} \hat{z} \end{aligned} \] \(\nabla T\) is called the gradient of \(T\) and is a vector quantity. Like any other vector \(\nabla T\) has both magnitude and direction. \[ d T=\nabla T \cdot d \underline{l}=|\nabla T||d \underline{l}| \cos \theta \] where \(\theta\) is the angle between \(\nabla\) and \(d l\).

  • \(\nabla T\) points in the direction of maximum increase of the function \(T\).
  • The magnitude of \(\nabla T\) is the slope along the maximal increase.
Question

Find the gradient of \(r=\sqrt{x^{2}+y^{2}+z^{2}}\) (the magnitude of the position vector).

We call \(\nabla\) del and it is a vector operator. Del acts somewhat like a normal vector and can “act” in three ways

  • it can multiply a scalar. \(\Rightarrow\) gradient \(\nabla T\)
  • it can be dotted with a vector \(\nabla \cdot \underline A \Rightarrow\) we call this divergence
  • it can be “crossed” with a vector \(\nabla \times \underline A \Rightarrow\) this is called curl.

5.2.1.1 Directional Derivative

Lets say you are on a hillside and you want to know in what direction does the hill slope downward most steeply from this point? (This would be the direction you would slide if you lost your footing) - this would be the direction straight down.

Lets say we move a small distance \(\Delta s\) the vertical change will be \(\Delta z\) (positive, negative, or zero) meaning \(\frac{d z}{d s}\) depends upon duration (it is a directional derivative).

The direction of steepest slope is the direction in which \(\frac{d z}{d s}\) has its largest value.

Lets take a scalar field \(\phi(x, y, z)\). To find the directional derivative of \(\phi\) at a particular point in a particular direction we need to find \(\frac{d \phi}{d s}\) the rate of change of \(\phi\) with distance at a given point \(x_{0}, y_{0}, z_{0}\) and in a given direction (\(\mathbf{s}\)).

Lets define \(\mathbf{u}=\hat{\imath} a+\hat{j} b+\hat{k} c\) as a unit vector in a given direction (\(\mathbf{s}\) in this case).

\[ \begin{aligned} & (x, y, z)-\left(x_{0}, y_{0}, z_0\right)=\mathbf{u} s=(\hat{i} a+\hat{j} b+\hat{k}c) s \\ & x=x_{0}+a s \\ & y=y_{0}+b s \\ & z=z_{0}+c s \\ \end{aligned} \] parametric equations - \(x, y, z\) are equations of a single variable.

Lets write the full derivative: \[ \begin{aligned} & \frac{d \phi}{d s}=\frac{\partial \phi}{\partial x} \cdot \frac{d x}{d s}+\frac{\partial \phi}{\partial y} \cdot \frac{d y}{d s}+\frac{\partial \phi}{\partial z} \cdot \frac{d z}{d s} \\ & \frac{d \phi}{d s}=\frac{\partial \phi}{\partial x} \cdot a+\frac{\partial \phi}{\partial y} \cdot b+\frac{\partial \phi}{\partial z} \cdot c \\ & \nabla \phi=\frac{\partial \phi}{\partial x} \hat{i}+\frac{\partial \phi}{\partial y} \hat{j}+\frac{\partial \phi}{\partial z} \hat{k} \\ & \nabla \phi \cdot \mathbf{u}=\frac{\partial \phi}{\partial x} a+\frac{\partial \phi}{\partial y} b+\frac{\partial \phi}{\partial z} c \end{aligned} \] Thus the directional derivative is \(\frac{d \phi}{d s} = \nabla \phi \cdot \mathbf{u}\).

Question

Find the directional derivative of \(\phi=x^{2} y+x\) at \((1,2,-1)\) in the direction \(\mathbf{A}=2 \hat{i}+2 \hat{\jmath}+\hat{k}\)

\(\frac{d \phi}{d s}=|\nabla \phi||\underline{u}| \cos \theta=|\nabla \phi| \cos \theta\) where \(\theta\) is angle between \(\nabla \phi\) and \(\mathbf{u}\).

Maximum \(\frac{d \phi}{d s}\) or \(|\nabla \phi|\) is if \(\theta=0\) largest decrease occurs at \(\theta=180\) or \(-|\nabla \phi|\).

Question

Lets consider the temperature in a room. The temperature follows \(T=x^{2}-y^{2}+x y z+273\). In which direction is the temp increasing most rapidly at \((-1,2,3)\)?

5.2.1.2 Normal Derivative

Now say \(\phi\) is constant at a point \(P\left(x_{0}, y_{0}, z_{0}\right)\) and the direction vector \(\mathbf{u}\) is tangent to \(\frac{d \phi}{d s}\). If \(\phi\) is constant then \(\frac{d \phi}{d s}=0\). This also means \(\nabla \phi \cdot \mathbf{u}=0\). \[ \begin{aligned} & |\nabla \phi||\mathbf{u}|\cos \theta=0 \\ & |\nabla \phi| \cos \theta=0 \end{aligned} \] \[ \theta=90^{\circ} \] In this case, \(\nabla \phi\) is perpendicular to the surface. Since \(|\nabla \phi|\) is the value of the directional derivative in the direction normal often called the normal derivative \[ |\nabla \phi|=\frac{d \phi}{d n}. \]

5.3 Divergence

\[ \begin{aligned} \nabla \cdot \underline{v} & =\left(\frac{\partial}{\partial x} \hat{x}+\frac{\partial}{\partial y} \hat{y}+\frac{\partial}{\partial z} \hat{z}\right) \cdot\left(v_{x} \hat{x}+v_{y} \hat{y}+v_{z} \hat{z}\right) \\ & =\frac{\partial}{\partial x} v_{x}+\frac{\partial}{\partial y} v_{y}+\frac{\partial}{\partial z} v_{z} \end{aligned} \]

The divergence of a vector is a scalar. It represents the spreading out of a vector from the point in question.

Possitive Divergence

Zero divergence

What about this one?
Question

\[ v_{a}=x \hat{x}+y \hat{y}+z \hat{z}, v_{b}=\hat{z}, v_{c}=z \hat{z} \]

5.4 The Curl

\[ \begin{aligned} \underline{\nabla} \times \underline{v} & =\left|\begin{array}{ccc} \hat{x} & \hat{y} & \hat{z} \\ \partial / \partial x & \partial / \partial y & \partial / \partial z \\ v_{x} & v_{y} & v_{z} \end{array}\right| \\ & =\hat{x}\left[\frac{\partial v_{z}}{\partial y}-\frac{\partial v_{y}}{\partial z}\right]-\hat{y}\left[\frac{\partial v_{z}}{\partial x}-\frac{\partial v_{x}}{\partial z}\right] \\ & +\hat{z}\left[\frac{\partial v_{y}}{\partial x}-\frac{\partial v_{x}}{\partial y}\right] \end{aligned} \]

  • The curl of a vector is a vector

Geometric interpretation is how much a vector curls around the paint in question.

Previous figures \(\rightarrow\) have 0 curl above have non-zero curl.

Question

\(\quad \mathbf{v}_{a}=-y \hat{x}+x \hat{y}, \quad \mathbf{v}_{b}=x \hat{y}\)

Calculate curl: \(\nabla \times \mathbf{v}_{a}\)

Question

Calculate curl: \(\underline{\nabla} \times \mathbf{v}_{b}\)

5.5 The Laplacian

One can also take the divergence of a gradient of a scalar field: \(\nabla \cdot \nabla \phi\) or \(\nabla^2 \phi\) (the Laplacian of \(\phi\)).

\[ \begin{aligned} & \nabla^2 \phi = \frac{\partial}{\partial x}\frac{\partial \phi}{\partial x}+\frac{\partial}{\partial y}\frac{\partial \phi}{\partial y}+\frac{\partial}{\partial z}\frac{\partial \phi}{\partial z}\\ & = \frac{\partial^2 \phi}{\partial x^2}+\frac{\partial^2 \phi}{\partial y^2}+\frac{\partial^2 \phi}{\partial z^2} \end{aligned} \]