My notes of the excellent lectures 20 and 21 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.”

## Potential

When vector field $$\vec F$$ is a gradient of function (written using the symbolic $$\nabla$$-operator) $$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 \right\rangle = \left\langle f_x, f_y \right\rangle } \nonumber$$

Where $$f(x,y)$$ is called the potential.

### Fundamental theorem

Recall the fundamental theorem of calculus

If you integrate the derivative, you get back the function. $$\int_a^b \frac{df(t)}{dt}\,dt=f(b)-f(a) \label{eq:fndcalc}$$

In multivariable calculus, it is the same

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}$$ where $$f(x,y)$$ is called the potential.

Only 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$$

### Proof

In coordinates, the gradient field $$\nabla f$$ is expressed as $$\newcommand{pdv}[1]{\tfrac{\partial}{\partial #1}} \nabla f =\left\langle \pdv{x}f, \pdv{y}f \right\rangle =\left\langle M, N \right\rangle \nonumber$$

Recall: the work integral in differential form
$$\int_C\vec F\cdot d\vec r = \int_C\left( M\,dx + N\,dy \right) \nonumber$$


Recall: the multivariable calculus chain rule




With the points \left\{ \begin{align*} P_0 &= \big(\,x(t_0),\,x(t_0)\,\big) \\ P_1 &= \big(\,x(t_1),\,x(t_1)\,\big) \end{align*} \right.


### Physics (using math notation)

A lot of forces are gradients of potentials such as the electric force and the gravitational force. However, magnetic fields are not gradients.

The work done by the electrical (or gravitational) force, is given by the change of the potential energy from the starting point to the ending point.

Note that: physics potentials are the opposite of mathematical potentials. The force $$\vec F$$ will be negative the gradient. So in physics, it would be expressed as $$\vec F=-\nabla f \nonumber$$

### Properties

Equivalent properties of the work in a gradient field $$\rm W = \int_C\nabla f\,d\vec r \nonumber$$

1. Path-independent: the work only depends on at the start and end points, $$f(P_0)$$ and $$f(P_1)$$.
2. Conservative: the work is $$0$$ along all closed curves. This means a closed loop in a gradient field does not provide energy. Conservativeness means no energy can be extracted from the field for free. The total energy is conserved.
3. $$Mdx+Ndy$$ is an exact differential. That means it can be put in the form $$df$$.

### Examples

#### One

Let’s look at the earlier example again: Curve $$C$$ starting and ending at $$(0,0)$$ through vector field $$\vec F$$ $$\begin{array}{l} \vec F = \left\langle y,x \right\rangle \\ C_1: (0,0)\ \mathrm{to}\ (1,0) \\ C_2: \mathrm{unit\ circle\ from}\ (1,0)\ \mathrm{to\ the\ diagonal} \\ C_3: \mathrm{from\ the\ diagonal\ to}\ (0,0) \end{array} \nonumber$$

##### Try

Try function $$f=xy$$. The gradient is \renewcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} \nabla f &= \left\langle \pdv{}{x}xy, \pdv{}{y}xy \right\rangle = \left\langle y,x \right\rangle \end{align*} That means the line integral can just be evaluated by finding the values of $$f$$ at the endpoints.

##### Visualize

Visualize using a contour plot of $$f=xy$$ through gradient field $$\vec F$$

Along the segments

• On $$C_1$$ the potential stays $$0$$.
• On $$C_2$$ \begin{align*} \int_{C_2}\vec F\cdot d\vec r &= f\left(\frac{1}{\sqrt 2},\frac{1}{\sqrt 2}\right) – f(1,0) \\ &= \frac{1}{2}-0=\frac{1}{2} \end{align*}
• On $$C_3$$ it decreases back to $$0$$.
The sum of the work therefore is $$0$$.

## When is a vector field a gradient field?

Let vector field $$\vec F=\left\langle M,N\right\rangle$$ where $$M$$ and $$N$$ are functions of $$x$$ and $$y$$.

When is this a gradient field? $$\newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \vec F = \left\langle M, N \right\rangle \stackrel{?}{=} \nabla f = \left\langle \pdv{}{x}f, \pdv{}{y}f \right\rangle \nonumber$$



Recall: the second partial derivative of function $$f$$



Therefore, $$\vec F=\left\langle M,N \right\rangle$$, defined and differentiable everywhere, is a gradient field, when $$\shaded{ M_y = N_x } \nonumber$$ (Also see the Definition of Curl.)

So, if $$\vec F=\left\langle M,N\right\rangle$$ is a gradient field in a region of the plane.

• $$\Leftrightarrow$$ Conservative if $$\int_C \vec F\cdot d\vec r=0$$ for any closed curve. To note it is along a closed curve, we note it as $$\oint_C$$ $$\oint_C \vec F\cdot d\vec r=0 \nonumber$$
• $$\Rightarrow$$ $$N_x=M_y$$ at every point.
• $$\Leftarrow$$ $$N_x=M_y$$ at every point, if $$\vec F$$ is defined in the entire plane (or, in a simply connected region). (see later)

### Example

#### One

Is $$\vec F$$ a gradient field? $$\vec F=\underbrace{-y}_{M}\hat\imath+\underbrace{x}_N\hat\jmath=\left\langle -y,x \right\rangle \nonumber$$


#### Two

For what value of $$a$$ is $$\vec F$$ a gradient field? $$\vec F = \underbrace{(4x^2+axy)}_{M}\hat\imath+\underbrace{(3y^2+4x^2)}_N\hat\jmath = \left\langle 4x^2+axy, 3y^2+4x^2\right\rangle \nonumber$$


## Finding the potential

Recall: from earlier

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

To show the two methods, we will find the potential of the gradient field $$\vec F$$ $$\vec F = \left\langle \underbrace{4x^2+axy}_{=M}, \underbrace{3y^2+4x^2}_{=N} \right\rangle \nonumber$$

### Compute line integrals

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

Apply the work differential, to find the work along $$C$$ in gradient field $$\vec F$$ \begin{align*} \underline{\int_C\vec F\cdot d\vec r} &= \int_C M\,dx+N\,dy \\ &= \int_C\left(4x^2+8xy\right)dx+\left(3y^2+4x^2\right)dy \end{align*}

The work in a gradient is path independent $$\Longrightarrow$$ find the easiest path

The easiest path is $$\begin{array}{lll} C_1: & x\ \mathrm{from}\ 0\ \mathrm{to}\ x_1 & y=0 &\Rightarrow dy=0 \\ C_2: & x=x_1 & y\ \mathrm{from}\ 0\ \mathrm{to}\ y_1 &\Rightarrow dx=0 \end{array} \nonumber$$

Work along the curves

• Along $$C_1$$ \begin{align*} \int_{C_1}\vec F\cdot d\vec r &= \int_0^{x_1}(4x^2+0)\,dx + 0 \\ &= \left[\frac{4}{3}x^3\right]_0^{x_1} = \frac{4}{3}{x_1}^3 \end{align*}
• Along $$C_2$$ \begin{align*} \int_{C_2}\vec F\cdot d\vec r &= \int_0^{y_1}0+(3y^2+4{x_1}^2)\,dy \\ &= \left[y^3+4{x_1}^2y \right]_0^{y_1} = {y_1}^3+4{x_1}^2y_1 \end{align*}

The total work $$\int_C\vec F\cdot d\vec r = \int_{C_1}\ldots + \int_{C_2}\ldots = \frac{4}{3}{x_1}^3 + {y_1}^3+4{x_1}^2y_1 \nonumber$$

Substitute $$\int_{C_1}, \int_{C_2}$$ back in $$\eqref{eq:method1}$$ \begin{align*} f(x_1,y_1) &= \int_C\vec F\cdot d\vec r + \rm{c} \\ &= \frac{4}{3}{x_1}^3 + {y_1}^3+4{x_1}^2y_1 + \rm{c} \end{align*}

Drop the subscripts $$f(x,y) = \frac{4}{3}x^3 + 4x^2y_1 + y^3\, (+ \rm{c}) \nonumber$$ If you would take the gradient, you should get $$\vec F$$ back.

### Compute using antiderivatives

No integrals, but you have to follow the procedure very carefully. A common pitfall, is to treat the second equation, like the first one.

For the example, we want to solve \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \left. \begin{align} \pdv{f}{x}&=f_x=4x^2+8xy \label{eq:anti1} \\ \pdv{f}{y}&=f_y=3y^2+4x^2 \label{eq:anti2} \end{align} \right.

Integrate equation $$\eqref{eq:anti1}$$ in respect to $$x$$. The integration constant might depend on $$y$$, so we call it $$g(y)$$ $$\newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \pdv{f}{x} = 4x^2+8xy \xrightarrow{\int dx} f = \underline{\frac{4}{3}x^3 + 4x^2y + g(y)} \label{eq:anti}$$

To get information of $$g(y)$$, we look at the other partial. Take the derivative of $$f$$ in respect to $$y$$ and compare to $$\eqref{eq:anti}$$ \require{cancel} \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \begin{align*} \pdv{}{y}\left(\frac{4}{3}x^3 + 4x^2y + g(y)\right) &= 3y^2+\bcancel{4x^2} \\ 0 + \bcancel{4x^2}+\pdv{}{y}g(y) &= 3y^2+\bcancel{4x^2} \Rightarrow \pdv{}{y}g(y) = 3y^2\\ \xrightarrow{\int dy} g(y) &= \int \pdv{}{y}g(y)\,dy = \underline{y^3 + c} \end{align*} $$g(y)$$ only depends on $$y$$, so $$c$$ is a true constant.

Plug this back into equation $$\eqref{eq:anti}$$, gives the potential $$f(x,y)$$ $$f = \frac{4}{3}x^3 + 4x^2y + \underline{y^3\ (+ \rm{c})} \nonumber$$