Post · 11 min read· pp. 30–39

Vector Calculus

Differentiation With Respect To Time

Differentiation with respect to time can be written in several forms.

    velocity=dxdt=(dx1dt,dx2dt,dx3dt) =x˙=x˙i=xi,t\qquad \; \; \text{velocity} \qquad = \qquad {d{\bf x} \over dt} \qquad = \qquad \left( {dx_1 \over dt} , {dx_2 \over dt} , {dx_3 \over dt} \right) \qquad \ = \qquad \dot{\bf x} \qquad = \qquad \dot{x}_i \qquad = \qquad x_{i,t}

acceleration=dvdt=(dv1dt,dv2dt,dv3dt) =v˙=v˙i=vi,t\text{acceleration} \qquad = \qquad {d{\bf v} \over dt} \qquad = \qquad \left( {dv_1 \over dt} , {dv_2 \over dt} , {dv_3 \over dt} \right) \qquad \ = \qquad \dot{\bf v} \qquad = \qquad \dot{v}_i \qquad = \qquad v_{i,t}

acceleration=d2xdt2=(d2x1dt2,d2x2dt2,d2x3dt2) =x¨=x¨i=xi,tt\text{acceleration} \qquad = \qquad {d^2{\bf x} \over dt^2} \qquad = \qquad \left( {d^2x_1 \over dt^2} , {d^2x_2 \over dt^2} , {d^2x_3 \over dt^2} \right) \qquad \ = \qquad \ddot{\bf x} \qquad = \qquad \ddot{x}_i \qquad = \qquad x_{i,tt}

One can use the derivative with respect to   t\;t, or the dot, which is probably the most popular, or the comma notation, which is a popular subset of tensor notation. Note that the notation xi,ttx_{i,tt} somewhat violates the tensor notation rule of double-indices automatically summing from 1 to 3. This is because time does not have 3 dimensions as space does, so it is understood that no summation is performed.

Differentiation of a Vector

Suppose v=(5t2,sin⁡t,e3t){\bf v} = (5t^2, \sin t, e^{3t}). Then v˙\dot{\bf v} equals

v˙=(10t,cos⁡t,3e3t)\dot{\bf v} = (10t, \cos t, 3e^{3t})

Helix Example

Helix Ant

The position of an ant crawling around and up a pipe is given by x=(2cos⁡t,2sin⁡t,5t){\bf x} = (2 \cos t, 2 \sin t, 5t). The velocity, v{\bf v}, equals

x˙=v=(−2sin⁡t,2cos⁡t,5)\dot{\bf x} = {\bf v} = (-2 \sin t, 2 \cos t, 5)

and the acceleration is

x¨=v˙=a=(−2cos⁡t,−2sin⁡t,0)\ddot{\bf x} = \dot{\bf v} = {\bf a} = (-2 \cos t, -2 \sin t, 0)

which always points toward the center of the pipe.


Differentiation With Respect To A Coordinate

Suppose you want to differentiate a function, f(x,y,z)f(x,y,z), with respect to yy. This is written as

∂f∂yor∂f∂x2orf,2{\partial f \over \partial y} \quad \qquad \text{or} \qquad \quad {\partial f \over \partial x_2} \quad \qquad \text{or} \qquad \quad f_{,2}

where the comma is common tensor notation for a derivative.

In the more general case, differentiation with respect to xjx_j is (yes, this is a gradient)

∂f∂xjorf,j{\partial f \over \partial x_j} \qquad \qquad \text{or} \qquad \qquad f,_j

Differentiation of a vector, v{\bf v}, is

∂v∂xjor(∂ vx∂xj,∂ vy∂xj,∂ vz∂xj)orvi,j{\partial {\bf v} \over \partial x_j} \qquad \qquad \text{or} \qquad \qquad \left( {\partial \, v_x \over \partial x_j} , {\partial \, v_y \over \partial x_j} , {\partial \, v_z \over \partial x_j} \right) \qquad \qquad \text{or} \qquad \qquad v_{i,j}

Differentiation of a tensor, σ\boldsymbol{\sigma}, is

∂σ∂xkorσij,k{\partial \boldsymbol{\sigma} \over \partial x_k} \qquad \qquad \text{or} \qquad \qquad \sigma_{ij,k}

As with vectors, every component of a tensor is differentiated.

Differentiation of a Vector

Suppose v=(3x2−2y,z2+x,y3−z){\bf v} = (3x^2 - 2y, z^2+x, y^3 - z). Then ∂v∂y\partial {\bf v} \over \partial y equals

∂v∂y=(−2,0,3y2){\partial {\bf v} \over \partial y} = (-2, 0, 3y^2)


Gradient

The gradient of a function, f(x)f({\bf x}), is written, ∇f(x)\nabla f({\bf x}), and is a vector. It is formed by differentiating the function with respect to each coordinate.

∇f(x)=(∂f∂x1,∂f∂x2,∂f∂x3)\nabla f({\bf x}) = \left( {\partial f \over \partial x_1} , {\partial f \over \partial x_2} , {\partial f \over \partial x_3} \right)

Tensor Notation

The gradient can also be written as ∂f∂xi{ \partial f \over \partial x_i}, or simply as f,if_{,i}.

Gradient Example

Suppose f(x)=3x2−2yz2f({\bf x}) = 3x^2 - 2 y z^2. Then the gradient is

∇f(x)=(6x,−2z2,−4yz)\nabla f({\bf x}) = ( 6x, -2 z^2, -4 y z )

The gradient of a scalar function tells how much the function increases along each global coordinate. In the above example, ff increases at the rate of 6x6x along the xx axis, −2z2-2 z^2 along the yy axis, and −4yz-4 y z along the zz axis.

Coincidentally, the gradient also gives the direction, or orientation, in space that corresponds to the greatest rate of increase. The following example, in 2D space, demonstrates this.

2nd Gradient Example

Parabolic Gradient

Take for example the paraboloid, f(x,y)=2x2+y2f(x,y) = 2 x^2 + y^2. The gradient at x=(5,3){\bf x} = (5,3) is

∇f(x,y)=(4x,2y)=(20,6)\nabla f(x,y) \quad = \quad ( 4x, 2y ) \quad = \quad (20, 6)

Therefore, at x=(5,3){\bf x} = (5,3), ff is increasing at the rate of 20 along the xx axis, and at the rate of 6 along the yy axis. 20i+6j20{\bf i} + 6 {\bf j} also corresponds to the direction in the x,yx,y plane along which ff will increase the most quickly.

Gradients of vectors can also be computed. The result will be a 2nd order tensor. For example, the gradient of a velocity field is written as ∇v\nabla {\bf v}. Writing this in tensor notation vi,jv_{i,j} shows more clearly that the result is a 2nd order tensor because of the presence of the ii and jj subscripts. Gradients arise in mechanical deformation and heat conduction applications. Mechanical strains are related to gradients of displacements and heat conduction is related to the gradient of the temperature distribution.


Divergence

The divergence of a vector is a scalar result, and the divergence of a 2nd order tensor is a vector. The divergence of a vector is written as ∇⋅v\nabla \cdot {\bf v}, or vi,iv_{i,i} in tensor notation. It is computed as

\begin{eqnarray} \nabla \cdot {\bf v} & = & ( {\partial \over \partial x} {\bf i} + {\partial \over \partial y} {\bf j} + {\partial \over \partial z} {\bf k} ) \cdot( v_x {\bf i} + v_y {\bf j} + v_z {\bf k} ) \\ \\ & = & {\partial v_x \over \partial x} + {\partial v_y \over \partial y} + {\partial v_z \over \partial z} \end{eqnarray}

Tensor Notation

As stated above, the divergence is written in tensor notation as vi,iv_{i,i}. It is very important that both subscripts are the same because this dictates that they are automatically summed from 1 to 3. They can in fact be any letter one desires, so long as they are both the same letter.

Divergence Example

If v=(3x2−2y,z2+x,y3−z){\bf v} = (3x^2 - 2y, z^2+x, y^3 - z), then the dot product is

∇⋅v=∂∂x(3x2−2y)+∂∂y(z2+x)+∂∂z(y3−z)=6x−1\nabla \cdot {\bf v} \quad = \quad {\partial \over \partial x}(3x^2 - 2y) + {\partial \over \partial y}(z^2 + x) + {\partial \over \partial z}(y^3 - z) \quad = \quad 6x - 1

The divergence of velocity vectors often arises in the discussion of incompressibility and conservation of mass.


Curl

The curl of a vector is the cross product of partial derivatives with the vector. Curls arise when rotations are important, just as cross products of vectors tend to do. Rotations of solids automatically imply large displacements, which in turn automatically imply nonlinear analyses. And this is why one seldom comes across curls... because most analyses are linear.

Curls are calculated as follows.

\begin{eqnarray} \nabla \times {\bf v} & = & ( {\partial \over \partial x} {\bf i} + {\partial \over \partial y} {\bf j} + {\partial \over \partial z} {\bf k} ) \times ( v_x {\bf i} + v_y {\bf j} + v_z {\bf k} ) \\ \\ & = & \left| \matrix { {\bf i\;} & {\bf j\;} & {\bf k\;} \\ {\partial \over \partial x} & {\partial \over \partial y} & {\partial \over \partial z} \\ v_x & v_y & v_z } \right| \\ \\ & = & ({\partial \, v_z \over \partial y} - {\partial \, v_y \over \partial z}) {\bf i} + ({\partial \, v_x \over \partial z} - {\partial \, v_z \over \partial x}) {\bf j} + ({\partial \, v_y \over \partial x} - {\partial \, v_x \over \partial y}) {\bf k} \end{eqnarray}

Tensor Notation of Curls

The curl of a vector is written in tensor notation as ϵijkvk,j\epsilon_{ijk} v_{k,j}. It is critical to recognize that the vector is written as vk,jv_{k,j} here, not vj,kv_{j,k}. This is because the curl is ∇×v\nabla \times {\bf v}, not v×∇{\bf v} \times \nabla.

An easy way to get the tensor notation right is to think of ∇×v\nabla \times {\bf v} as ϵijk∇jvk\epsilon_{ijk} \nabla_j v_k and note the order of the subscripts. Of course, this reduces to the correct result: ϵijkvk,j\epsilon_{ijk} v_{k,j}.

As with cross products, the fact that jj and kk both occur twice in ϵijkvk,j\epsilon_{ijk} v_{k,j} dictates that both are automatically summed from 1 to 3. The term expands to

\matrix { \epsilon_{ijk} v_{k,j} & = & \epsilon_{i11} v_{1,1} & + & \epsilon_{i12} v_{2,1} & + & \epsilon_{i13} v_{3,1} & + & \\ & & \epsilon_{i21} v_{1,2} & + & \epsilon_{i22} v_{2,2} & + & \epsilon_{i23} v_{3,2} & + & \\ & & \epsilon_{i31} v_{1,3} & + & \epsilon_{i32} v_{2,3} & + & \epsilon_{i33} v_{3,3} }

Curls Using Tensor Notation

To obtain the yth component of a curl, set ii equal to 2 in the above equation.

\matrix { \epsilon_{2jk} v_{k,j} & = & \epsilon_{211} v_{1,1} & + & \epsilon_{212} v_{2,1} & + & \epsilon_{213} v_{3,1} & + & \\ & & \epsilon_{221} v_{1,2} & + & \epsilon_{222} v_{2,2} & + & \epsilon_{223} v_{3,2} & + & \\ & & \epsilon_{231} v_{1,3} & + & \epsilon_{232} v_{2,3} & + & \epsilon_{233} v_{3,3} }

All subscripts are now specified, and this permits evaluation of all alternating tensors. All of them will equal zero except two, leaving

ϵ2jkvk,j  =  v1,3−v3,1  =  ∂ vx∂z−∂ vz∂x\epsilon_{2jk} v_{k,j} \; = \; v_{1,3} - v_{3,1} \; = \; \frac{ \partial \, v_x}{\partial z} - \frac{\partial \, v_z}{\partial x}

which is again consistent with the determinant result (as it must be). Results for the xth and zth components are obtained by setting ii equal to 1 and 3, respectively.

Curl Example - Rotating Disk

Rotating Disc

Consider a disk rotating about the zz axis such that

\begin{eqnarray} x & = & X \cos (\omega \, t) - Y \sin (\omega \, t) \\ y & = & X \sin (\omega \, t) + Y \cos (\omega \, t) \\ z & = & Z \end{eqnarray}

where X{\bf X} is the vector of original coordinates of each point at t=0t = 0, and x{\bf x} is the vector of that point's coordinates at any other time, tt.

Note that this is common in Continuum Mechanics to use X{\bf X} as the position vector at t=0t = 0, the so-called reference configuration, and x{\bf x} for the position vector following any translations, rotations, and deformations, the so-called current configuration.

The velocity vector is

{\bf v} = {\partial {\bf x} \over \partial t} = \left( \begin{eqnarray} & - \omega X \sin (\omega \, t) - \omega Y \cos (\omega \, t) \\ & + \omega X \cos (\omega \, t) - \omega Y \sin (\omega \, t) \\ & 0 \end{eqnarray} \right)

which simplifies to

v=(−ω y,ω x,0){\bf v} = ( - \omega \, y, \omega \, x, 0 )

making the curl of the velocity vector relatively simple to compute.

∇×v=(0,0,2ω)\nabla \times {\bf v} = ( 0, 0, 2 \omega )

As stated above, the curl is related to rotations. It turns out that ∇×v\nabla \times {\bf v} gives the axis of rotation, and 12∣∇×v∣\frac{1}{2} | \nabla \times {\bf v} | is the rotational rate. So 12(∇×v)\frac{1}{2} ( \nabla \times {\bf v} ) gives

12(∇×v)=(0,0,ω)\frac{1}{2} ( \nabla \times {\bf v} ) = ( 0, 0, \omega )


Laplacian

The Laplacian is the divergence of the gradient of a function. It often arises in 2nd order partial differential equations and is usually written as ∇2 ⁣f(x)\nabla^2 \! f({\bf x}). It can also be written in the less popular, but more descriptive form of ∇⋅∇f(x)\nabla \cdot \nabla f({\bf x}). Its definition is

∇2 ⁣f(x)≡∂ 2 ⁣f(x)∂ x2+∂ 2 ⁣f(x)∂ y2+∂ 2 ⁣f(x)∂ z2\nabla^2 \! f({\bf x}) \equiv {\partial^{\,2} \! f({\bf x}) \over \partial \, x^2} + {\partial^{\,2} \! f({\bf x}) \over \partial \, y^2} + {\partial^{\,2} \! f({\bf x}) \over \partial \, z^2}

Tensor Notation

The Laplacian is written in tensor notation simply as f,iif,_{ii} where the two ii indices means that they are automatically summed from 1 to 3.

Laplacian Example

Determine the Laplacian of f(x)=2x3y−zsin⁡(y)f({\bf x}) = 2 x^3 y - z \sin(y).

Start by calculating the gradient of f(x)f({\bf x}).

∇f(x)=(6x2y,2x3−zcos⁡(y),−sin⁡(y))\nabla f({\bf x}) = \left( 6 x^2 y, 2 x^3 - z \cos(y), - \sin(y) \right)

And the divergence of the gradient (which is the Laplacian after all) is

∇2 ⁣f(x)=∇⋅∇f(x)=12xy+zsin⁡(y)\nabla^2 \! f({\bf x}) = \nabla \cdot \nabla f({\bf x}) = 12 x y + z \sin(y)


Derivatives of Vector Products

Differentiation of vector products (dot, cross, and diadic) follow the same rules as differentiation of scalar products. For example, the derivative of a dot product is

ddt(a⋅b)=d adt⋅b+a⋅d bdt{d \over dt} ( {\bf a} \cdot {\bf b} ) = {d \, {\bf a} \over dt} \cdot {\bf b} + {\bf a} \cdot {d \, {\bf b} \over dt}

while the derivative of a cross product is

ddt(a×b)=d adt×b+a×d bdt{d \over dt} ( {\bf a} \times {\bf b} ) = {d \, {\bf a} \over dt} \times {\bf b} + {\bf a} \times {d \, {\bf b} \over dt}

and the derivative of a diadic product is

ddt(a⊗b)=d adt⊗b+a⊗d bdt{d \over dt} ( {\bf a} \otimes {\bf b} ) = {d \, {\bf a} \over dt} \otimes {\bf b} + {\bf a} \otimes {d \, {\bf b} \over dt}

Dot Product Derivative Example

Suppose a=(5t,sin⁡t,et){\bf a} = (5t, \sin t, e^t) and b=(t2,sin⁡t,6t){\bf b} = (t^2, \sin t, 6t), then

a⋅b=5t3+sin⁡2t+6tet{\bf a} \cdot {\bf b} = 5 t^3 + \sin^2 t + 6t e^t

and the derivative is

ddt(a⋅b)=15t2+2sin⁡tcos⁡t+6(t+1)et{d \over dt} ( {\bf a} \cdot {\bf b} ) = 15 t^2 + 2 \sin t \cos t + 6 (t + 1) e^t

Applying the differentiation product rule gives the same result.

\begin{eqnarray} {d \, {\bf a} \over dt} \cdot {\bf b} + {\bf a} \cdot {d \, {\bf b} \over dt} & = & (5, \cos t, e^t) \cdot (t^2, \sin t, 6t) + (5t, \sin t, e^t) \cdot (2t, \cos t, 6)\\ \\ & = & 15 t^2 + 2 \sin t \cos t + 6 (t + 1) e^t \end{eqnarray}