Partial Derivatives, Gradient, Divergence, and Curl

PDF Download

Partial Derivatives

Recall that the derivative of a function of one variable provides information about how the function changes as the input variable changes. For a function of multiple variables, we consider how the function changes when one input variable changes and all other input variables are fixed, and refer to partial derivatives. For example, if f is a function of two variables x and y, then its partial derivatives are the functions fx and fy, which are defined by

\(f_x\left(x,y\right)=\underset{h\to0}{\operatorname*{lim}}\frac{f\left(x+h,y\right)-f\left(x,y\right)}h\mathrm{~and~}f_y\left(x,y\right)=\underset{h\to0}{\operatorname*{lim}}\frac{f\left(x,y+h\right)-f\left(x,y\right)}h\)

provided that the limit(s) exist.

Notation for Partial Derivatives 

For a function z = f(x, y), all of the following notation is used to represent partial derivatives.

\(f_x\left(x,y\right)=f_x=\frac{\partial f}{\partial x}=\frac{\partial}{\partial x}f\left(x,y\right)=\frac{\partial z}{\partial x}=f_1=D_1f=D_xf\\f_y\left(x,y\right)=f_y=\frac{\partial f}{\partial y}=\frac{\partial}{\partial y}f\left(x,y\right)=\frac{\partial z}{\partial y}=f_2=D_2f=D_yf\)

Rule for Finding Partial Derivatives of z = f(x, y)

  1. To find fx , regard y as a constant and differentiate f(x, y) with respect to x.
  2. To find fy , regard x as a constant and differentiate f(x, y) with respect to y.

Partial derivatives are similarly defined for functions of three or more variables.

Higher Order Derivatives 

For higher order derivatives, we take derivatives one order at a time. For a function z = f(x, y), we use the notation

\(\begin{gathered}
(f_{x})_{x}=f_{xx}=f_{11}=\frac{\partial}{\partial x}\Bigg(\frac{\partial f}{\partial x}\Bigg)=\frac{\partial^{2}f}{\partial x^{2}}=\frac{\partial^{2}z}{\partial x^{2}} \\
(f_x)_y=f_{xy}=f_{12}=\frac{\partial}{\partial y}\Bigg(\frac{\partial f}{\partial x}\Bigg)=\frac{\partial^2f}{\partial y\partial x}=\frac{\partial^2z}{\partial y\partial x} \\
(f_{y})_{x}=f_{yx}=f_{21}=\frac{\partial}{\partial x}\Bigg(\frac{\partial f}{\partial y}\Bigg)=\frac{\partial^{2}f}{\partial x\partial y}=\frac{\partial^{2}z}{\partial x\partial y} \\
(f_{y})_{y}=f_{yy}=f_{22}=\frac{\partial}{\partial y}\Bigg(\frac{\partial f}{\partial y}\Bigg)=\frac{\partial^{2}f}{\partial y^{2}}=\frac{\partial^{2}z}{\partial y^{2}} 
\end{gathered}\)

The notation is similar for higher order partial derivatives.

Clairaut’s Theorem

Suppose that f is defined on a disk D that contains the point (a, b). If the functions fxy and fyx are both continuous on D, then fxy(a, b) = fyx(a, b). In essence, if f  is a “nice” function, then a mixed partial derivative is independent of the order we take the derivatives, i.e. fxy = fyx.

Del Operator 

The del operator is denoted as ∇ which is called nabla. The del operator is a vector written as

\(\nabla=\Bigg(\frac{\partial}{\partial x}\Bigg)\overline{i}+\Bigg(\frac{\partial}{\partial y}\Bigg)\overline{j}+\Bigg(\frac{\partial}{\partial z}\Bigg)\overline{k}\)

Basically, the presence of the ∇ tells us we are taking a derivate, which takes several forms, each of which gives different results!

  • If f is a function, then ∇f (gradient) is a vector.
  • If \(\bar{F}\) is a vector field, then ∇ * \(\bar{F}\) (divergence) is a scalar function.
  • If \(\bar{F}\) is a vector field, then ∇ * \(\bar{F}\) (curl) is a vector function.

We will consider each of these forms below.

Gradient 

If f is a function of two variables x and y, then the gradient of f  is the vector ∇f defined by 

\(\mathrm{grad }f\left(x,y\right)=\nabla f\left(x,y\right)=\left\langle f_x\left(x,y\right),f_y\left(x,y\right)\right\rangle=\frac{\partial f}{\partial x}\overline{i}+\frac{\partial f}{\partial y}\overline{j}\)

where \(\overline{i}\) and \(\overline{j}\) are unit vectors.

The gradient of a function is similarly defined for functions of three or more variables. 

We think of the gradient of a function of two or more variables as the direction of the fastest increase of f at a point, with magnitude equal to the maximum rate of increase at a point – just as we do for the derivative of a single-variable function. Geometrically, the gradient at a point is perpendicular to the tangent vector of any curve that passes through the point.

Example. If \(f\left(x,y\right)=2x^2y^3-4y+5,\) find the gradient at the point (2, -1).

Solution. Taking the required partial derivatives, we obtain

\(\nabla f\begin{pmatrix}x,y\end{pmatrix}=\left\langle f_x\begin{pmatrix}x,y\end{pmatrix},f_y\begin{pmatrix}x,y\end{pmatrix}\right\rangle=\left\langle4xy^3,6x^2y^2-4\right\rangle.\)

Plugging in the point (2, -1), we obtain

\(\nabla f\begin{pmatrix}2,-1\end{pmatrix}=\left\langle4\begin{pmatrix}2\end{pmatrix}\begin{pmatrix}-1\end{pmatrix}^3,6\begin{pmatrix}2\end{pmatrix}^2\begin{pmatrix}-1\end{pmatrix}^2-4\right\rangle=\left\langle-8,20\right\rangle.\)

Divergence 

If \(\bar{F}=P\overline{i}+Q\overline{j}+R\overline{k} ,\) where P, Q, and R are functions, is a vector field on R3, and \(\frac{\partial P}{\partial x},\) \(\frac{\partial Q}{\partial y},\mathrm{and~}\frac{\partial R}{\partial z}\) exist, then the divergence of \(\bar{F}\) is defined by

\(\nabla\cdot\overline{F}=\text{div}\overline{F}=\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}\)

The divergence of a function is similarly defined for functions of an arbitrary number of variables. 

In essence, the divergence is the dot product of the del operator ∇ and the vector field \(\bar{F}\) which results in a scalar function.

Example. If \(\overline{F}=xz\overline{i}+xyz\overline{j} ,\) then find ∇ * \(\bar{F}\)

Solution. We note that R = 0. Applying the definition, we obtain

\(\nabla\cdot\overline{F}=\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}=\frac{\partial}{\partial x}\left(xz\right)+\frac{\partial}{\partial y}\left(xyz\right)+\frac{\partial}{\partial z}\left(0\right)=z+xz.\)

Curl

If \(\bar{F}=P\overline{i}+Q\overline{j}+R\overline{k} ,\) where P, Q, and R are functions, is a vector field on R3, and \(\frac{\partial P}{\partial x},\) \(\frac{\partial Q}{\partial y},\mathrm{and~}\frac{\partial R}{\partial z}\) exist, then the curl of \(\bar{F}\) is defined by

\(\nabla\times\overline{F}=\text{curl}\overline{F}=\left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\overline{i}+\left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\overline{j}+\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\overline{k}\)

\(\text{Or equivalently, }\nabla\times\overline{F}=\begin{vmatrix}\overline{i}&\overline{j}&\overline{k}\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}&\frac{\partial}{\partial z}\\P&Q&R\end{vmatrix}.\)

The curl of a function is not defined for functions with a different number of variables; it only applies to 3-dimensional space. 

In essence, the curl is the cross product of the del operator ∇ and the vector field \(\bar{F}\) which results in a vector field. 

Geometrically, the curl of \(\bar{F}\) is a vector that is perpendicular to the vector field that represents the velocity of a particle in motion. Its length and direction characterize the rotation at a particular point.

Example. If \(\overline{F}=xyz^2\overline{i}-x^2y\overline{j}+x^2yz^3\overline{k}\), then find ∇ * \(\bar{F}\).

Solution. Applying the definition, we obtain

\(\begin{aligned}
\nabla\times\bar{F}& =\begin{vmatrix}\overline{i}&\overline{j}&\overline{k}\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}&\frac{\partial}{\partial z}\\P&Q&R\end{vmatrix} \\
&=\begin{vmatrix}\overline{i}&\overline{j}&\overline{k}\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}&\frac{\partial}{\partial z}\\xyz^2&-x^2y&x^2yz^3\end{vmatrix} \\
&=\left(\frac\partial{\partial y}x^2yz^3-\frac\partial{\partial z}\left(-x^2y\right)\right)\overline{i}+\left(\frac\partial{\partial z}xyz^2-\frac\partial{\partial x}x^2yz^3\right)\overline{j}+\left(\frac\partial{\partial x}\left(-x^2y\right)-\frac\partial{\partial y}xyz^2\right)\overline{k} \\
&=\left(x^2z^3\right)\overline{i}+\left(2xyz-2xyz^3\right)\overline{j}+\left(-2xy-xz^2\right)\overline{k}.
\end{aligned}\)

Fun Facts: 

Theorem. If f is a function of three variables that has continuous second-order partial derivatives, then

\(\nabla\times\nabla f=\operatorname{curl}\left(\nabla f\right)=\overline{0}.\)

It follows that if \(\bar{F}\) is conservative, meaning there is a function f such that \(\bar{F}\)=∇f , then

\(\nabla\times\bar{F}=\operatorname{curl}\left(\bar{F}\right)=\overline{0}.\)

Theorem. If \(\overline{F}=P\overline{i}+Q\overline{j}+R\overline{k}\) is a vector field on R3 that has continuous second-order partial derivatives, then

\(\nabla\cdot\left(\nabla\times\bar{F}\right)=\text{div curl }\bar{F}=0\)

Proof.

\(\begin{aligned}
\nabla\cdot\bigl(\nabla\times\bar{F}\bigr)& =\nabla\cdot\begin{vmatrix}\overline{i}&\overline{j}&\overline{k}\\\frac{\partial}{\partial x}&\frac{\partial}{\partial y}&\frac{\partial}{\partial z}\\P&Q&R\end{vmatrix} \\
&=\nabla\cdot\left(\left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\overline{i}+\left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\overline{j}+\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\overline{k}\right) \\
&=\frac{\partial}{\partial x}\Bigg(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\Bigg)+\frac{\partial}{\partial y}\Bigg(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\Bigg)+\frac{\partial}{\partial z}\Bigg(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\Bigg) \\
&=\frac{\partial^2R}{\partial x\partial y}-\frac{\partial^2Q}{\partial x\partial z}+\frac{\partial^2P}{\partial y\partial z}-\frac{\partial^2R}{\partial y\partial z}+\frac{\partial^2Q}{\partial z\partial x}-\frac{\partial^2P}{\partial z\partial x}=0,
\end{aligned}\)

since mixed partial derivatives do not depend on the order of the variables.