# Fundamental theorem of line integrals

Also known as the Gradient Theorem, this generalizes the fundamental theorem of calculus to line integrals through a vector field.

## Background

Only needed if you want to understand the proof:

## What we're building to

• The fundamental theorem of line integrals, also called the gradient theorem, states that
\begin{aligned} \int_a^b \nabla \blueE{f}(\greenE{\vec{\textbf{r}}}(t)) \cdot \redE{\vec{\textbf{r}}'}(t)dt = \blueE{f}(\greenE{\vec{\textbf{r}}}(b)) - \blueE{f}(\greenE{\vec{\textbf{r}}}(a)) \end{aligned}
• The intuition behind this formula is that each side represents the change in the value of a multivariable function start color blueE, f, end color blueE as you walk along a path parameterized by start color greenE, r, with, vector, on top, left parenthesis, t, right parenthesis, end color greenE.
• This formula implies that gradient fields are path independent, meaning the line integrals along any two paths connecting the same start and end points will be equal.

## Statement of the theorem

Recall that the fundamental theorem of calculus in the single-variable world states that
\begin{aligned} \int_a^b g'(t)dt = g(b) - g(a) \end{aligned}
In some sense, this says that integration is the opposite of differentiation.
The fundamental theorem of line integrals, also known as the gradient theorem, is one of several ways to extend this theorem into higher dimensions. In a sense, it says that line integration through a vector field is the opposite of the gradient. The statement of the theorem is that
\begin{aligned} \int_a^b \nabla \blueE{f}(\greenE{\vec{\textbf{r}}}(t)) \cdot \redE{\vec{\textbf{r}}'}(t)dt = \blueE{f}(\greenE{\vec{\textbf{r}}}(b)) - \blueE{f}(\greenE{\vec{\textbf{r}}}(a)) \end{aligned}
Where
• start color blueE, f, end color blueE is some scalar-valued multivariable function.
• del, start color blueE, f, end color blueE is the gradient of start color blueE, f, end color blueE.
• start color greenE, r, with, vector, on top, end color greenE, left parenthesis, t, right parenthesis is a vector-valued function which parameterizes some path through the input space of start color blueE, f, end color blueE.
• r, with, vector, on top, left parenthesis, a, right parenthesis and r, with, vector, on top, left parenthesis, b, right parenthesis are the end points of the path.
• start color redE, r, with, vector, on top, prime, end color redE, left parenthesis, t, right parenthesis is the derivative of start color greenE, r, with, vector, on top, end color greenE, left parenthesis, t, right parenthesis, taken component-wise as usual.
You might also see this theorem written without reference to the parameterization r, with, vector, on top, left parenthesis, t, right parenthesis as follows:
\begin{aligned} \int_C \nabla f \cdot d\textbf{s} = f(B) - f(A) \end{aligned}
Where C represents the path through space, with A as its starting point and B as its ending point, and d, s is thought of as a tiny step along C.
In short, the theorem states that the line integral of the gradient of a function f gives the total change in the value of f from the start of the curve to its end.

## The intuition

The meaning behind this formula is actually fairly straightforward​, once we take some time to digest the meaning of each term. There are two main players on the stage right now:
• A path wandering through space (let's say two-dimensional space, for now, to make drawing easier).
• A function f which takes in points of that path as its input, and outputs a number.
Think about how the value of the function f changes as we walk along the path. The following video shows one way to visualize this, where the graph of some function f is shown in blue, a path in the x, y-plane is shown in red, and the projection of that path onto the graph is also shown in red.
Think about the height of this graph above each point on the path. How could you mathematically keep track of the change in this height as we walk along the path.
Instead of projecting the path onto the graph of f, we could also overlay it with the gradient field of f (the vector field where each vector represents del, f):
Let's write down the gradient theorem again:
\begin{aligned} \int_a^b \blueE{\nabla f(\vec{\textbf{r}}(t))} \cdot \redE{\vec{\textbf{r}}'(t)dt} = f(\textbf{r}(b)) - f(\textbf{r}(a)) \end{aligned}
The next few questions will have you reason through the left-hand side of this expression.
Concept check 1: If we think of d, t as a very slight change to the parameter t, how can you interpret the vector start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, d, t, end color redE?
Réponse(s) :
Réponse(s) :

The vector start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, d, t, end color redE gives a tiny step along the path.
This is the motion in the x, y-plane which results from a slight nudge of size d, t to the parameter t.
Alternatively, you can think of r, with, vector, on top, prime, left parenthesis, t, right parenthesis as a velocity vector of a particle whose position as a function of time is given by r, with, vector, on top, left parenthesis, t, right parenthesis. Multiplying this velocity vector by the tiny change in time d, t gives a tiny change in position, which in this case is a little step along the curve.
Concept check 2: How can you interpret the dot product
del, f, left parenthesis, P, right parenthesis, dot, v, with, vector, on top
where P is some point in space and v, with, vector, on top is some vector?
Réponse(s) :
Réponse(s) :

Both answers are correct. If this seems unfamiliar, consider reviewing the article on directional derivatives.
Concept check 3: Given these two facts, how can we interpret the dot product start color blueE, del, f, left parenthesis, r, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis, end color blueE, dot, start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, end color redE?
Réponse(s) :
Réponse(s) :

From the previous two questions, this is the directional derivative of f in the direction of start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, end color redE
This can also be interpretted as the rate of change of f with respect to t (given as a function of t).
1. The parameter t is changed by some tiny amount d, t.
2. This causes a tiny step along the path, given by the vector start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, d, t, end color redE.
3. This, in turn, causes a change in the value of f, which is given by the directional derivative start color blueE, del, f, left parenthesis, r, with, vector, on top, left parenthesis, t, right parenthesis, right parenthesis, end color blueE, dot, start color redE, r, with, vector, on top, prime, left parenthesis, t, right parenthesis, d, t, end color redE
\begin{aligned} \dfrac{d}{dt} f(\vec{\textbf{r}}(t)) = \blueE{\nabla f(\vec{\textbf{r}}(t))} \cdot \redE{\vec{\textbf{r}}'(t)} \end{aligned}
In fact, the three steps above just spell out the intuition for the multivariable chain rule.
Concept check 4: Finally, how can you interpret​ the integral
\begin{aligned} \int_a^b \blueE{\nabla f(\vec{\textbf{r}}(t))} \cdot \redE{\vec{\textbf{r}}'(t)dt} \end{aligned}
Réponse(s) :
Réponse(s) :

The integral gives the change in f from the start of the path to its end.
You can think of it as adding up all the tiny changes in f due to tiny changes in the parameter t which move us along the path. The end result is the total change in f from start to finish.
The "area under a curtain" interpretation of a line integral only applies to line integrals through scalar fields. For instance, that would be the interpretation of
\begin{aligned} \int_C f|d\textbf{s}| = \int_a^b f(\vec{\textbf{r}}(t)) ||\vec{\textbf{r}}'(t)||dt \end{aligned}
The integrand here is a scalar-valued function multiplied by the length of d, s, not a vector-valued function dotted with d, s.
However, there is a much simpler way to think about the change in the value of f from the start of the path to its end: Just evaluate f at both ends, and subtract the difference:
f, left parenthesis, r, with, vector, on top, left parenthesis, b, right parenthesis, right parenthesis, minus, f, left parenthesis, r, with, vector, on top, left parenthesis, a, right parenthesis, right parenthesis
In other words, each side of the equation in the gradient theorem computes the change in f across the path, but the left side thinks of it step-by-step, while the right side takes a global perspective.
\begin{aligned} \int_a^b \blueE{\nabla f(\vec{\textbf{r}}(t))} \cdot \redE{\vec{\textbf{r}}'(t)dt} = f(\vec{\textbf{r}}(b)) - f(\vec{\textbf{r}}(a)) \end{aligned}

## A quick proof

Using the multivariable chain rule, we have
\begin{aligned} \dfrac{d}{dt} f(\vec{\textbf{r}}(t)) = \nabla f(\vec{\textbf{r}}(t)) \cdot \vec{\textbf{r}}'(t) \end{aligned}
Plugging this into the statement of the gradient theorem, we see it becomes the same as the fundamental theorem of calculus
\begin{aligned} &\phantom{=} \int_a^b \nabla f(\vec{\textbf{r}}(t)) \cdot \vec{\textbf{r}}'(t)dt \\\\ &= \int_a^b \dfrac{d}{dt} f(\vec{\textbf{r}}(t))dt \\\\ &= f(\vec{\textbf{r}}(b)) - f(\vec{\textbf{r}}(a)) \end{aligned}
This proof leverages the powerful fundamental theorem of calculus, along with the multivariable chain rule, and hence looks deceptively simple. A good exercise in understanding this theorem is to think through how exactly this quick and tidy three-line proof encapsulates the intuition for the gradient theorem spelled out in the last section.
There's nothing wrong with using other powerful theorems to help prove new results. In fact, to avoid doing so would be foolish. However, walking through such proofs is often not enough for a deeper understanding, so it's healthy to unravel new results into their full meaning, seeing how they stand up on their own.

## Example: A sinusoidal path

Define f as
f, left parenthesis, x, comma, y, right parenthesis, equals, x, start superscript, 2, end superscript, plus, y, start superscript, 2, end superscript
Let C represent the path parameterized by
\begin{aligned} \vec{\textbf{r}}(t) = \left[ \begin{array}{c} t \\ \sin(t) \end{array} \right] \end{aligned}
between the values t, equals, 0 and t, equals, 2, pi.
Compute the integral
\begin{aligned} \int_C \nabla f \cdot d\textbf{s} \end{aligned}

### Solution 1: The old fashioned way

We can spell out the full line integral and compute it. In preparation, we will need to evaluate the gradient of f, left parenthesis, x, comma, y, right parenthesis, equals, x, start superscript, 2, end superscript, plus, y, start superscript, 2, end superscript.
What is del, f?
Réponse :
Réponse :

\begin{aligned} \nabla f(x, y) = \left[ \begin{array}{c} \dfrac{\partial}{\partial \blueE{x}} \blueE{x}^2 + y^2 \\\\ \dfrac{\partial}{\partial \redE{y}} x^2 + \redE{y}^2 \\\\ \end{array} \right] = \left[ \begin{array}{c} 2\blueE{x} \\ 2\redE{y} \end{array} \right] \end{aligned}
We will also need the derivative of $\vec{\textbf{r}}(t) = \left[\begin{array}{c} t \\ \sin(t) \end{array} \right]$.
What is r, with, vector, on top, prime, left parenthesis, t, right parenthesis?
Réponse :
Réponse :

\begin{aligned} \dfrac{d}{dt} \vec{\textbf{r}}(t) = \dfrac{d}{dt} \left[ \begin{array}{c} t \\ \sin(t) \end{array} \right]= \left[ \begin{array}{c} 1 \\ \cos(t) \end{array} \right] \end{aligned}
Finally, what do you get when you plug these in and chug through the line integral?
\begin{aligned} \int_C \nabla f \cdot d\textbf{s} = \end{aligned}

### Solution 2: Apply the fundamental theorem of line integrals

Applying the fundamental theorem of line integrals, we can skip over many of the steps from the previous solution, including the computation of the gradient of f and the derivative of r, with, vector, on top, left parenthesis, t, right parenthesis.
Solve the line integral above using the gradient theorem.
\begin{aligned} \int_0^{2\pi} \nabla f(\vec{\textbf{r}}(t)) \cdot \vec{\textbf{r}}'(t)dt &= f(\vec{\textbf{r}}(2\pi)) - f(\vec{\textbf{r}}(0)) \\\\ &= f\left( \left[ \begin{array}{c} 2\pi \\ \sin(2\pi) \end{array} \right] \right) - f\left( \left[ \begin{array}{c} 0 \\ \sin(0) \end{array} \right] \right) \\ &= \left((2\pi)^2 + \sin(2\pi)^2 \right) - \left((0)^2 + \sin(0)^2\right) \\ &= 4\pi^2 \end{aligned}
If you look back through the full computation of the line integral in solution 1, the computations we performed actually feel pretty silly. We took the derivative of everything, including the partial derivatives of x, start superscript, 2, end superscript, plus, y, start superscript, 2, end superscript and the ordinary derivatives of t and sine, left parenthesis, t, right parenthesis, then later integrated those derivatives back up to where they started.
Working through this should also help build an intuition for how the fundamental theorem of line integrals derives from the fundamental theorem of calculus.

## Path independence

The gradient theorem has a really important consequence regarding gradient fields. Suppose you have two distinct curves C, start subscript, 1, end subscript and C, start subscript, 2, end subscript, each connecting the same two points A and B. Let's say these are wandering through the gradient field of some scalar-valued function f:
According to the gradient theorem, the line integral of del, f along each of these curves will be the same, since that integral is completely determined by the value of f at A and B:
\begin{aligned} \int_{C_1} \nabla f \cdot d\textbf{r} = f(B) - f(A) = \int_{C_2} \nabla f \cdot d\textbf{r} \end{aligned}
We explore this idea further in the next article on conservative vector fields.

## À retenir

• The fundamental theorem of line integrals, also called the gradient theorem, states that
\begin{aligned} \int_a^b \nabla \blueE{f}(\greenE{\vec{\textbf{r}}}(t)) \cdot \redE{\vec{\textbf{r}}'}(t)dt = \blueE{f}(\greenE{\vec{\textbf{r}}}(b)) - \blueE{f}(\greenE{\vec{\textbf{r}}}(a)) \end{aligned}
• The intuition behind this formula is that each side represents the change in the value of a multivariable function start color blueE, f, end color blueE as you walk along a path parameterized by start color greenE, r, with, vector, on top, left parenthesis, t, right parenthesis, end color greenE.
• This formula implies that gradient fields are path independent, meaning the line integrals along any two paths connecting the same start and end points will be equal.