Gradient field (in space)

\(\)

My notes of the excellent lecture 30 by “Denis Auroux. 18.02 Multivariable Calculus. Fall 2007. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA.”

The fundamental theorem of multivariable calculus tell us (using the symbolic \(\nabla\)-operator)

If you take the line integral of the gradient of a function, what you get back is the function.
$$ \shaded{ \int_C\nabla f\cdot d\vec r = f(P_1) – f(P_0) } \label{eq:fundthm} $$
Work in gradient field

Similar to the plane, in space

When vector field \(\vec F\) is a gradient of function \(f(x,y)\), it is called a gradient field $$ \newcommand{pdv}[1]{\tfrac{\partial}{\partial #1}} \shaded{ \vec F = \nabla f = \left\langle \pdv{x}f, \pdv{y}f, \pdv{z}f \right\rangle } \nonumber $$ where \(f(x,y,z)\) is called the potential.

When is a vector field a gradient field?

In the plane, to check if a vector field is a gradient field we only had to check the condition

$$ \newcommand{dv}[2]{\frac{d #1}{d #2}} \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{ppdv}[3]{\frac{\partial^2 #1}{\partial #2\partial #3}} \newcommand{oiint}{\subset\!\!\supset\kern-1.65em\iint} \newcommand{ppdv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \pdv{M}{y} = \pdv{N}{x} \nonumber $$

In space, we want to know if $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \vec F = \left\langle P,Q,R\right\rangle \stackrel{?}{=} \nabla f = \left\langle \pdv{}{x}f, \pdv{}{y}f, \pdv{}{z}f \right\rangle \nonumber $$ where \(\vec F=\left\langle P,Q,R\right\rangle\) be defined in a simply connected region.

If \(\vec F\) is a gradient field, \(\vec F=\nabla f\), then $$ \newcommand{dv}[2]{\frac{d #1}{d #2}} \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \left\{ \begin{align*} P &= \pdv{}{x}f = f_x \\ Q &= \pdv{}{y}f = f_y \\ R &= \pdv{}{z}f = f_z \end{align*} \right. $$

Take the partial derivatives of \(P\), \(Q\) and \(R\) $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{ppdv}[3]{\frac{\partial^2 #1}{\partial #2\partial #3}} \left\{ \begin{align*} P_y=\pdv{P}{y}=\ppdv{}{x}{y}f = f_{xy} \\ P_z=\pdv{P}{z}=\ppdv{}{x}{z}f = f_{xz} \\ Q_x=\pdv{Q}{x}=\ppdv{}{y}{x}f = f_{yx} \\ Q_z=\pdv{Q}{z}=\ppdv{}{y}{z}f = f_{yz} \\ R_x=\pdv{R}{x}=\ppdv{}{z}{x}f = f_{zx} \\ R_z=\pdv{R}{y}=\ppdv{}{z}{y}f = f_{zy} \end{align*} \right. $$

Recall:

The mixed second derivatives are the same, no matter what order you take them $$ \newcommand{dv}[2]{\frac{d #1}{d #2}} \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{ppdv}[3]{\frac{\partial^2 #1}{\partial #2\partial #3}} \pdv{}{\color{red}x}\left(\pdv{f}{\color{blue}y}\right) =\ppdv{f}{\color{red}x}{\color{blue}y} =\ppdv{f}{\color{blue}y}{\color{red}x} =\pdv{}{\color{blue}y}\left(\pdv{f}{\color{red}x}\right) \nonumber $$

Based on this second partial derivative rule $$ \begin{align*} \underline{P_y} = f_{xy} &= f_{yx} = \underline{Q_x} \\ \underline{P_z} = f_{xz} &= f_{zx} = \underline{R_x} \\ \underline{Q_z} = f_{yz} &= f_{zy} = \underline{R_y} \end{align*} \nonumber $$

Therefore, if \(\vec F=\left\langle P,Q,R\right\rangle\), defined in a simply connected region is a gradient field, when $$ \shaded{ \left\{ \begin{align*} P_y &= Q_x \\ P_z &= R_x \\ Q_z &= R_y \end{align*} \right. } \nonumber $$

Exact differential

We can also think of it in terms of differentials.

If we have a differential of the form $$ P\,dx + Q\,dy + R\,dz \nonumber $$ is an exact differential. That means it is going to equal to \(df\) for some function \(F\) exactly and of the same conditions. Just another way of saying it.

Example

For which \(a\) and \(b\) is the differential below exact? $$ \underbrace{axy}_P\,dx + (\underbrace{x^2+z^3}_Q)dy + (\underbrace{byz^2+4z^3}_R)dz \nonumber $$

Or, for which \(a\) and \(b\) is \(\vec F\) a gradient field? $$ \vec F=\left\langle axy,x^2+z^3, byz^2-4z^3\right\rangle \nonumber $$

Compare $$ \left. \begin{array}{lllll} P_y &= ax &= 2x &= Q_x &\Rightarrow a = 2 \\ P_z &= 0 &= 0 &= R_x \\ Q_z &= 3z^2 &= bz^2 &= R_y &\Rightarrow b=3 \end{array} \right\} \nonumber $$

For those values of \(a\) and \(b\) we can look for a potential. For any other values we would have to set up the line integral.

Potential of a gradient field

Recall: for the plane

When the field is a gradient, and you know the function \(f\), you can simplify the evaluation of the line integral for work. $$ \shaded{ \int_C\nabla f\cdot d\vec r=f(P_1)-f(P_0) } \nonumber $$ where \(f(x,y)\) is called the potential

Once again, you have two methods: computing line integrals, or using antiderivatives.

Method 1: Computing line integrals

Similar to in the plane, apply the fundamental theorem, equation \(\eqref{eq:fundthm}\), to find an expression for the potential at \((x_1,y_1,z_1)\) $$ \begin{align} &\int_C\vec F\cdot d\vec r=f(x_1,y_1,z_1)-f(0,0,0) \nonumber \\ \Rightarrow & f(x_1,y_1,z_1) = \underbrace{\int_C\vec F\cdot d\vec r}_\text{work} + \underbrace{f(0,0,0)}_{\mathrm{constant}} \label{eq:method1} \end{align} $$

The work in a gradient field is path independent \(\Longrightarrow\) find the easiest path

Apply the work differential, to find the work along \(C\) in gradient field \(\vec F\)

Then add the line integrals together, to get the total work. $$ \underline{\int_C\vec F\cdot d\vec r} = \int_{C_1}\ldots + \int_{C_2}\ldots + \int_{C_3}\ldots \nonumber $$

Substitute this back in equation \(\eqref{eq:method1}\) and drop the subscripts $$ f(x,y,z) = \underline{\int_C\vec F\cdot d\vec r} + \rm{c} \nonumber $$ If you would take the gradient of \(f(x,y,z)\), you should get \(\vec F\) back.

Method 2: Using Antiderivatives

Similar to in the plane. No integrals, but you have to follow the procedure very carefully.

Continue with the earlier example, with \(a=2\) and \(b=3\). Solve $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align} \pdv{f}{x} &= f_x = 2xy \label{eq:potential1} \\ \pdv{f}{y} &= f_y = x^2 + z^3 \label{eq:potential2} \\ \pdv{f}{z} &= f_z = 3yz^2 – 4z^3 \label{eq:potential3} \end{align} $$

Integrate \(\eqref{eq:potential1}\) in respect to \(x\). The integration constant might depend on \(y\) and \(z\), so call it \(g(y,z)\) $$ \newcommand{pdv}[2]{\tfrac{\partial #1}{\partial #2}} f_x = 2xy \xrightarrow{\int dx} \underline{f = x^2y + g(y,z)} \nonumber $$

To get information on \(g(y,z)\) we look at the other partials. Take the derivative of \(f\) in respect to \(y\) and compare to \(\eqref{eq:potential2}\). The integration constant might depend on \(y\), so call it \(h(z)\) $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} x^2 + \pdv{g}{y} &= x^2 + z^3 \\ \Rightarrow \pdv{g}{y} &= z^3 \xrightarrow{\int dy} g = \underline{yz^3 + h(z)} \\ \end{align*} $$

Substituting \(g\) in \(f\) $$ f = x^2y + \underline{yz^3 + h(z)} \nonumber $$

To get information on \(h(z)\) we look at the other partials. Take the derivative of \(f\) in respect to \(z\) and compare to \(\eqref{eq:potential3}\). The integration constant \(\rm{c}\) is a true constant $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} 3yz^2 + \pdv{h}{z} &= 3yz^2 – 4z^3 \\ \Rightarrow \pdv{h}{z} &= – 4z^3 \xrightarrow{\int dz} h = \underline{-z^4 + \rm{c}} \\ \end{align*} $$

Substituting \(h\) in \(f\) $$ f = x^2y + yz^3 \underline{-z^4\,(+ \rm{c})} \nonumber $$

If you want to find one potential, you can just forget about the constant. If you want to find all the potentials: they differ by this constant.