Skip to main content

Section 9.3 Path independence

Note: 2 lectures

Subsection 9.3.1 Path independent integrals

Let \(U \subset \R^n\) be a set and \(\omega\) a one-form defined on \(U\text{.}\) The integral of \(\omega\) is said to be path independent if for every pair of points \(x,y \in U\) and every pair of piecewise smooth paths \(\gamma \colon [a,b] \to U\) and \(\beta \colon [c,d] \to U\) such that \(\gamma(a) = \beta(c) = x\) and \(\gamma(b) = \beta(d) = y\text{,}\) we have

\begin{equation*} \int_\gamma \omega = \int_\beta \omega . \end{equation*}

In this case, we simply write

\begin{equation*} \int_x^y \omega := \int_\gamma \omega = \int_\beta \omega . \end{equation*}

Not every one-form gives a path independent integral. Most do not.

Example 9.3.1.

Let \(\gamma \colon [0,1] \to \R^2\) be the path \(\gamma(t) := (t,0)\) going from \((0,0)\) to \((1,0)\text{.}\) Let \(\beta \colon [0,1] \to \R^2\) be the path \(\beta(t) := \bigl(t,(1-t)t\bigr)\) also going between the same points. Then

\begin{equation*} \begin{aligned} & \int_\gamma y \, dx = \int_0^1 \gamma_2(t) \gamma_1^{\:\prime}(t) \, dt = \int_0^1 0 (1) \, dt = 0 ,\\ & \int_\beta y \, dx = \int_0^1 \beta_2(t) \beta_1'(t) \, dt = \int_0^1 (1-t)t(1) \, dt = \frac{1}{6} . \end{aligned} \end{equation*}

The integral of \(y\,dx\) is not path independent. In particular, \(\int_{(0,0)}^{(1,0)} y\,dx\) does not make sense.

Definition 9.3.2.

Let \(U \subset \R^n\) be an open set and \(f \colon U \to \R\) a continuously differentiable function. The one-form

\begin{equation*} df := \frac{\partial f}{\partial x_1} \, dx_1 + \frac{\partial f}{\partial x_2} \, dx_2 + \cdots + \frac{\partial f}{\partial x_n} \, dx_n \end{equation*}

is called the total derivative of \(f\text{.}\)

An open set \(U \subset \R^n\) is said to be path connected 1  if for every two points \(x\) and \(y\) in \(U\text{,}\) there exists a piecewise smooth path starting at \(x\) and ending at \(y\text{.}\)

We leave as an exercise that every connected open set is path connected.

In other words, if we fix \(p \in U\text{,}\) then \(f(x) = C + \int_{p}^x \omega\) for some constant \(C\text{.}\)


First suppose that the integral is path independent. Pick \(p \in U\text{.}\) Since \(U\) is path connected, there exists a path from \(p\) to every \(x \in U\text{.}\) Define

\begin{equation*} f(x) := \int_{p}^x \omega . \end{equation*}

Write \(\omega = \omega_1 \,dx_1 + \omega_2 \,dx_2 + \cdots + \omega_n \,dx_n\text{.}\) We wish to show that for every \(j = 1,2,\ldots,n\text{,}\) the partial derivative \(\frac{\partial f}{\partial x_j}\) exists and is equal to \(\omega_j\text{.}\)

Let \(e_j\) be an arbitrary standard basis vector, and \(h\) a nonzero real number. Compute

\begin{equation*} \frac{f(x+h e_j) - f(x)}{h} = \frac{1}{h} \left( \int_{p}^{x+he_j} \omega - \int_{p}^x \omega \right) = \frac{1}{h} \int_{x}^{x+he_j} \omega , \end{equation*}

which follows by Proposition 9.2.10 and path independence as \(\int_{p}^{x+he_j} \omega = \int_{p}^{x} \omega + \int_{x}^{x+he_j} \omega\text{,}\) because we pick a path from \(p\) to \(x+he_j\) that also happens to pass through \(x\text{,}\) and then we cut this path in two, see Figure 9.8.

Figure 9.8. Using path independence in computing the partial derivative.

Since \(U\) is open, suppose \(h\) is so small so that all points of distance \(\abs{h}\) or less from \(x\) are in \(U\text{.}\) As the integral is path independent, pick the simplest path possible from \(x\) to \(x+he_j\text{,}\) that is \(\gamma(t) := x+t he_j\) for \(t \in [0,1]\text{.}\) The path is in \(U\text{.}\) Notice \(\gamma^{\:\prime}(t) = h e_j\) has only one nonzero component and that is the \(j\)th component, which is \(h\text{.}\) Therefore,

\begin{equation*} \frac{1}{h} \int_{x}^{x+he_j} \omega = \frac{1}{h} \int_{\gamma} \omega = \frac{1}{h} \int_0^1 \omega_j(x+the_j) h \, dt = \int_0^1 \omega_j(x+the_j) \, dt . \end{equation*}

We wish to take the limit as \(h \to 0\text{.}\) The function \(\omega_j\) is continuous at \(x\text{.}\) Given \(\epsilon > 0\text{,}\) suppose \(h\) is small enough so that \(\abs{\omega_j(x)-\omega_j(y)} < \epsilon\) whenever \(\snorm{x-y} \leq \abs{h}\text{.}\) Thus, \(\abs{\omega_j(x+the_j)-\omega_j(x)} < \epsilon\) for all \(t \in [0,1]\text{,}\) and we estimate

\begin{equation*} \abs{\int_0^1 \omega_j(x+the_j) \, dt - \omega_j(x)} = \abs{\int_0^1 \bigl( \omega_j(x+the_j) - \omega_j(x) \bigr) \, dt} \leq \epsilon . \end{equation*}

That is,

\begin{equation*} \lim_{h\to 0}\frac{f(x+h e_j) - f(x)}{h} = \omega_j(x) . \end{equation*}

All partials of \(f\) exist and are equal to \(\omega_j\text{,}\) which are continuous functions. Thus, \(f\) is continuously differentiable, and furthermore \(df = \omega\text{.}\)

For the other direction, suppose a continuously differentiable \(f\) exists such that \(df = \omega\text{.}\) Take a smooth path \(\gamma \colon [a,b] \to U\) such that \(\gamma(a) = x\) and \(\gamma(b) = y\text{.}\) Then

\begin{equation*} \begin{split} \int_\gamma df & = \int_a^b \biggl( \frac{\partial f}{\partial x_1}\bigl(\gamma(t)\bigr) \gamma_1^{\:\prime}(t)+ \frac{\partial f}{\partial x_2}\bigl(\gamma(t)\bigr) \gamma_2^{\:\prime}(t)+ \cdots + \frac{\partial f}{\partial x_n}\bigl(\gamma(t)\bigr) \gamma_n^{\:\prime}(t) \biggr) \, dt \\ & = \int_a^b \frac{d}{dt} \Bigl[ f\bigl(\gamma(t)\bigr) \Bigr]\, dt \\ & = f(y)-f(x) . \end{split} \end{equation*}

The value of the integral only depends on \(x\) and \(y\text{,}\) not the path taken. Therefore the integral is path independent. We leave checking this fact for a piecewise smooth path as an exercise.

Path independence can be stated more neatly in terms of integrals over closed paths.


Suppose \(\omega = df\) and let \(\gamma\) be a piecewise smooth closed path. Since \(\gamma(a) = \gamma(b)\) for a closed path, the previous proposition says

\begin{equation*} \int_{\gamma} \omega = f\bigl(\gamma(b)\bigr) - f\bigl(\gamma(a)\bigr) = 0 . \end{equation*}

Now suppose that for every piecewise smooth closed path \(\gamma\text{,}\) \(\int_{\gamma} \omega = 0\text{.}\) Let \(x,y\) be two points in \(U\) and let \(\alpha \colon [0,1] \to U\) and \(\beta \colon [0,1] \to U\) be two piecewise smooth paths with \(\alpha(0) = \beta(0) = x\) and \(\alpha(1) = \beta(1) = y\text{.}\) See Figure 9.9.

Figure 9.9. Two paths from \(x\) to \(y\text{.}\)

Define \(\gamma \colon [0,2] \to U\) by

\begin{equation*} \gamma(t) := \begin{cases} \alpha(t) & \text{if } t \in [0,1], \\ \beta(2-t) & \text{if } t \in (1,2]. \end{cases} \end{equation*}

This path is piecewise smooth. This is due to the fact that \(\gamma|_{[0,1]}(t) = \alpha(t)\) and \(\gamma|_{[1,2]}(t) = \beta(2-t)\) (note especially \(\gamma(1) = \alpha(1) = \beta(2-1)\)). It is also closed as \(\gamma(0) = \alpha(0) = \beta(0) = \gamma(2)\text{.}\) So

\begin{equation*} 0 = \int_{\gamma} \omega = \int_{\alpha} \omega - \int_{\beta} \omega . \end{equation*}

This follows first by Proposition 9.2.10, and then noticing that the second part is \(\beta\) traveled backwards so that we get minus the \(\beta\) integral. Thus the integral of \(\omega\) on \(U\) is path independent.

However one states path independence, it is often a difficult criterion to check, you have to check something “for all paths.” There is a local criterion, a differential equation, that guarantees path independence, or in other words it guarantees an antiderivative \(f\) whose total derivative is the given one-form \(\omega\text{.}\) Since the criterion is local, we generally only find the function \(f\) locally. We can find the antiderivative in every so-called simply connected domain, which informally is a domain where every path between two points can be “continuously deformed” into any other path between those two points. But to make matters simple, we prove the result for so-called star-shaped domains, which is often good enough. As a bonus the proof in the star-shaped case constructs the antiderivative explicitly. As balls are star-shaped we then have the result locally.

Definition 9.3.5.

Let \(U \subset \R^n\) be an open set and \(p \in U\text{.}\) We say \(U\) is a star-shaped domain with respect to \(p\) if for every other point \(x \in U\text{,}\) the line segment \([p,x]\) is in \(U\text{,}\) that is, if \((1-t)p + tx \in U\) for all \(t \in [0,1]\text{.}\) If we say simply star-shaped, then \(U\) is star-shaped with respect to some \(p \in U\text{.}\) See Figure 9.10.

Figure 9.10. A star-shaped domain with respect to \(p\text{.}\)

Notice the difference between star-shaped and convex. A convex domain is star-shaped, but a star-shaped domain need not be convex.

The condition on the derivatives of \(\omega\) is precisely the condition that the second partial derivatives commute. That is, if \(df = \omega\text{,}\) and \(f\) is twice continuously differentiable, then

\begin{equation*} \frac{\partial \omega_j}{\partial x_k} = \frac{\partial^2 f}{\partial x_k \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_k} = \frac{\partial \omega_k}{\partial x_j} . \end{equation*}

The condition is clearly necessary. The Poincaré lemma says that it is sufficient for a star-shaped \(U\text{.}\)


Suppose \(U\) is a star-shaped domain with respect to \(p=(p_1,p_2,\ldots,p_n) \in U\text{.}\) Given \(x = (x_1,x_2,\ldots,x_n) \in U\text{,}\) define the path \(\gamma \colon [0,1] \to U\) as \(\gamma(t) := (1-t)p + tx\text{,}\) so \(\gamma^{\:\prime}(t) = x-p\text{.}\) Let

\begin{equation*} f(x) := \int_{\gamma} \omega = \int_0^1 \left( \sum_{k=1}^n \omega_k \bigl((1-t)p + tx \bigr) \, (x_k-p_k) \right) dt . \end{equation*}

We differentiate in \(x_j\) under the integral, which is allowed as everything, including the partials, is continuous:

\begin{equation*} \begin{split} \frac{\partial f}{\partial x_j}(x) & = \int_0^1 \left( \left( \sum_{k=1}^n \frac{\partial \omega_k}{\partial x_j} \bigl((1-t)p + tx \bigr) \, t (x_k-p_k) \right) + \omega_j \bigl((1-t)p + tx \bigr) \right) dt \\ & = \int_0^1 \left( \left( \sum_{k=1}^n \frac{\partial \omega_j}{\partial x_k} \bigl((1-t)p + tx \bigr) \, t (x_k-p_k) \right) + \omega_j \bigl((1-t)p + tx \bigr) \right) dt \\ & = \int_0^1 \frac{d}{dt} \Bigl[ t \omega_j\bigl((1-t)p + tx \bigr) \Bigr] \, dt \\ &= \omega_j(x) . \end{split} \end{equation*}

And this is precisely what we wanted.

Example 9.3.7.

Without some hypothesis on \(U\) the theorem is not true. Let

\begin{equation*} \omega(x,y) := \frac{-y}{x^2+y^2} \,dx + \frac{x}{x^2+y^2} \,dy \end{equation*}

be defined on \(\R^2 \setminus \{ 0 \}\text{.}\) Then

\begin{equation*} \frac{\partial}{\partial y} \left[ \frac{-y}{x^2+y^2} \right] = \frac{y^2-x^2}{{(x^2+y^2)}^2} = \frac{\partial}{\partial x} \left[ \frac{x}{x^2+y^2} \right] . \end{equation*}

However, there is no \(f \colon \R^2 \setminus \{ 0 \} \to \R\) such that \(df = \omega\text{.}\) In Example 9.2.11 we integrated from \((1,0)\) to \((1,0)\) along the unit circle counterclockwise, that is \(\gamma(t) = \bigl(\cos(t),\sin(t)\bigr)\) for \(t \in [0,2\pi]\text{,}\) and we found the integral to be \(2\pi\text{.}\) We would have gotten \(0\) if the integral was path independent, or in other words if there would exist an \(f\) such that \(df = \omega\text{.}\)

Subsection 9.3.2 Vector fields

A common object to integrate is a so-called vector field.

Definition 9.3.8.

Let \(U \subset \R^n\) be a set. A continuous function \(v \colon U \to \R^n\) is called a vector field. Write \(v = (v_1,v_2,\ldots,v_n)\text{.}\)

Given a smooth path \(\gamma \colon [a,b] \to \R^n\) with \(\gamma\bigl([a,b]\bigr) \subset U\) we define the path integral of the vectorfield \(v\) as

\begin{equation*} \int_{\gamma} v \cdot d\gamma := \int_a^b v\bigl(\gamma(t)\bigr) \cdot \gamma^{\:\prime}(t) \, dt , \end{equation*}

where the dot in the definition is the standard dot product. The definition for a piecewise smooth path is, again, done by integrating over each smooth interval and adding the results.

Unraveling the definition, we find that

\begin{equation*} \int_{\gamma} v \cdot d\gamma = \int_{\gamma} v_1 \,dx_1 + v_2 \,dx_2 + \cdots + v_n \,dx_n . \end{equation*}

What we know about integration of one-forms carries over to the integration of vector fields. For example, path independence for integration of vector fields is simply that

\begin{equation*} \int_x^y v \cdot d\gamma \end{equation*}

is path independent if and only if \(v = \nabla f\text{,}\) that is, \(v\) is the gradient of a function. The function \(f\) is then called a potential for \(v\text{.}\)

A vector field \(v\) whose path integrals are path independent is called a conservative vector field. The rationale for the naming is that such vector fields arise in physical systems where a certain quantity, the energy, is conserved.

Subsection 9.3.3 Exercises

Exercise 9.3.1.

Find an \(f \colon \R^2 \to \R\) such that \(df = xe^{x^2+y^2}\, dx + ye^{x^2+y^2} \, dy\text{.}\)

Exercise 9.3.2.

Find an \(\omega_2 \colon \R^2 \to \R\) such that there exists a continuously differentiable \(f \colon \R^2 \to \R\) for which \(df = e^{xy} \,dx + \omega_2 \,dy\text{.}\)

Exercise 9.3.3.

Finish the proof of Proposition 9.3.3, that is, we only proved the second direction for a smooth path, not a piecewise smooth path.

Exercise 9.3.4.

Show that a star-shaped domain \(U \subset \R^n\) is path connected.

Exercise 9.3.5.

Show that \(U := \R^2 \setminus \{ (x,y) \in \R^2 : x \leq 0, y=0 \}\) is star-shaped and find all points \((x_0,y_0) \in U\) such that \(U\) is star-shaped with respect to \((x_0,y_0)\text{.}\)

Exercise 9.3.6.

Suppose \(U_1\) and \(U_2\) are two open sets in \(\R^n\) with \(U_1 \cap U_2\) nonempty and path connected. Suppose there exists an \(f_1 \colon U_1 \to \R\) and \(f_2 \colon U_2 \to \R\text{,}\) both twice continuously differentiable such that \(d f_1 = d f_2\) on \(U_1 \cap U_2\text{.}\) Then there exists a twice differentiable function \(F \colon U_1 \cup U_2 \to \R\) such that \(dF = df_1\) on \(U_1\) and \(dF = df_2\) on \(U_2\text{.}\)

Exercise 9.3.7.

(Hard)   Let \(\gamma \colon [a,b] \to \R^n\) be a simple nonclosed piecewise smooth path (so \(\gamma\) is one-to-one). Suppose \(\omega\) is a continuously differentiable one-form defined on some open set \(V\) with \(\gamma\bigl([a,b]\bigr) \subset V\) and \(\frac{\partial \omega_j}{\partial x_k} = \frac{\partial \omega_k}{\partial x_j}\) for all \(j\) and \(k\text{.}\) Prove that there exists an open set \(U\) with \(\gamma\bigl([a,b]\bigr) \subset U \subset V\) and a twice continuously differentiable function \(f \colon U \to \R\) such that \(df = \omega\text{.}\)
Hint 1: \(\gamma\bigl([a,b]\bigr)\) is compact.
Hint 2: Show that you can cover the curve by finitely many balls in sequence so that the \(k\)th ball only intersects the \((k-1)\)th ball.
Hint 3: See previous exercise.

Exercise 9.3.8.

  1. Show that a connected open set \(U \subset \R^n\) is path connected. Hint: Start with a point \(x \in U\text{,}\) and let \(U_x \subset U\) is the set of points that are reachable by a path from \(x\text{.}\) Show that \(U_x\) and \(U \setminus U_x\) are both open, and since \(U_x\) is nonempty (\(x \in U_x\)) it must be that \(U_x = U\text{.}\)

  2. Prove the converse, that is, an open 2  path connected set \(U \subset \R^n\) is connected. Hint: For contradiction assume there exist two open and disjoint nonempty open sets and then assume there is a piecewise smooth (and therefore continuous) path between a point in one to a point in the other.

Exercise 9.3.9.

Usually path connectedness is defined using continuous paths rather than piecewise smooth paths. Prove that for open subsets of \(\R^n\) the definitions are equivalent, in other words prove:
Suppose \(U \subset \R^n\) is open and for every \(x,y \in U\text{,}\) there exists a continuous function \(\gamma \colon [a,b] \to U\) such that \(\gamma(a) = x\) and \(\gamma(b) = y\text{.}\) Then \(U\) is path connected, that is, there is a piecewise smooth path in \(U\) from \(x\) to \(y\text{.}\)

Exercise 9.3.10.

(Hard)   Take

\begin{equation*} \omega(x,y) = \frac{-y}{x^2+y^2} \, dx + \frac{x}{x^2+y^2} \, dy \end{equation*}

defined on \(\R^2 \setminus \{ (0,0) \}\text{.}\) Let \(\gamma \colon [a,b] \to \R^2 \setminus \{ (0,0) \}\) be a closed piecewise smooth path. Let \(R:=\{ (x,y) \in \R^2 : x \leq 0 \text{ and } y=0 \}\text{.}\) Suppose \(R \cap \gamma\bigl([a,b]\bigr)\) is a finite set of \(k\) points. Prove that

\begin{equation*} \int_{\gamma} \omega = 2 \pi \ell \end{equation*}

for some integer \(\ell\) with \(\abs{\ell} \leq k\text{.}\)
Hint 1: First prove that for a path \(\beta\) that starts and end on \(R\) but does not intersect it otherwise, you find that \(\int_{\beta} \omega\) is \(-2\pi\text{,}\) 0, or \(2\pi\text{.}\)
Hint 2: You proved above that \(\R^2 \setminus R\) is star-shaped.
Note: The number \(\ell\) is called the winding number it measures how many times does \(\gamma\) wind around the origin in the clockwise direction.

Normally only a continuous path is used in this definition, but for open sets the two definitions are equivalent. See the exercises.
If the definition of “path connected” is as in the next exercise, “open” would not be needed for this part.
For a higher quality printout use the PDF versions: or