Sub topic 2
Conservative forces and path independence
This chapter defines conservative forces and gives two equivalent tests for them. It also shows why the distinction matters before we introduce potential energy in the next chapter. It assumes you know Newton's laws, the work done by a constant force, the work-energy theorem, kinetic energy, and 1D vectors with sign conventions. A little 2D vector notation (components, dot product) appears in the code.
Why the question matters
The work-energy theorem says the net work on an object equals its change in kinetic energy. That is always true, but it can be hard to use. To compute work you normally need the force at every point along the actual path.
For some forces, the work depends only on where the motion starts and ends. We can then replace a detailed path calculation with a comparison of two positions. Forces with this property are called conservative. Gravity and ideal spring forces are conservative. Friction and air drag are not.
Definition
A force is conservative if the work it does on an object moving between two points A and B is the same for every path connecting them.
Two statements are equivalent, and you will use both:
- Path independence. The work done by the force from A to B has the same value along every path from A to B.
- Zero work around a closed loop. The work done by the force on an object that returns to its starting point is zero, whatever route it took.
Why the two statements are equivalent
Suppose the work is path independent. Take a loop that leaves A, reaches B by path 1, and returns to A by path 2.
- The work on the way out is W(A→B via 1).
- The return trip along path 2 is the reverse of a trip from A to B along path 2. Every small displacement flips sign, so the work flips sign: W(B→A via 2) = −W(A→B via 2).
- Total work around the loop is W(A→B via 1) − W(A→B via 2). If the work is path independent, this is zero.
The argument runs backward too. If every loop gives zero, the two outbound paths must give equal work.
Example 1: gravity near the surface
Take a uniform gravitational force of magnitude mg pointing down. Let y be height. For a small displacement with components (dx, dy), the work is
dW = F · dr = (0)(dx) + (−mg)(dy) = −mg dy.
Adding up small pieces from start to end gives
Wgravity = −mg (yfinal − y_initial).
Only the change in height appears. A steep ramp, a gentle ramp, a staircase, and a roller-coaster track between the same two heights all give the same work. Going up, gravity does negative work. Coming back down along any route, it does the same amount of positive work, so a round trip nets zero.
Example 2: an ideal spring
For a spring along the x-axis with the relaxed length at x = 0, the force is F = −kx. The work as the end moves from x₁ to x₂ is
W_spring = −(1/2)k x₂² + (1/2)k x₁².
In one dimension, path independence is almost automatic. The object can only move back and forth along a line, and the formula depends only on the endpoints even if the object wanders out and back. A spring that pulls toward a fixed center in 2D or 3D, F = −kr, is also conservative, and its work depends only on the starting and ending distances from the center.
Example 3: friction is not conservative
Kinetic friction has magnitude μ_k N and always points opposite to the motion. Consider a block of mass m sliding on a horizontal table, so N = mg. The work friction does along a path of length L is
Wfriction = −μk m g L.
This depends on the path length, not only on the endpoints. Slide from A to B in a straight line and you get one value. Slide along a longer curved route and friction does more negative work. Slide around a closed loop and friction does negative work on the whole trip, so the loop total is not zero. Both tests fail.
The reason is that the direction of friction depends on the direction of motion, not only on position. Reverse the trip and friction also reverses, so it never gives back the work it took.
Checking it numerically
The following program computes work along three paths from (0, 0) to (3, 4) and around a closed loop. It adds up F · Δr over many small straight steps. The force is evaluated at the midpoint of each step. For the constant and linear forces used here, the midpoint rule is exact up to floating-point error. In the code, y is vertical and gravity points in −y.
import numpy as np
m = 2.0 # kg
g = 9.81 # m/s^2
mu = 0.3 # kinetic friction coefficient
k = 10.0 # N/m, spring pulling toward the origin
def densify(waypoints, steps=1000):
"""Join waypoints with straight segments split into many small steps."""
pts = []
for a, b in zip(waypoints[:-1], waypoints[1:]):
a, b = np.array(a, dtype=float), np.array(b, dtype=float)
for s in np.linspace(0.0, 1.0, steps, endpoint=False):
pts.append(a + s * (b - a))
pts.append(np.array(waypoints[-1], dtype=float))
return np.array(pts)
def gravity(pos, disp):
return np.array([0.0, -m * g])
def spring(pos, disp):
return -k * pos # central spring force, F = -k r
def friction(pos, disp):
length = np.linalg.norm(disp)
return -mu * m * g * disp / length # opposes the motion
def work(force, waypoints):
pts = densify(waypoints)
total = 0.0
for p, q in zip(pts[:-1], pts[1:]):
disp = q - p
mid = (p + q) / 2
total += np.dot(force(mid, disp), disp)
return total
paths = {
"straight": [(0, 0), (3, 4)],
"right then up": [(0, 0), (3, 0), (3, 4)],
"detour": [(0, 0), (5, -2), (3, 4)],
"closed loop": [(0, 0), (3, 0), (3, 4), (0, 0)],
}
for name, wp in paths.items():
print(f"{name:14s}", end="")
for label, f in [("gravity", gravity), ("spring", spring), ("friction", friction)]:
w = round(work(f, wp), 2) + 0.0 # + 0.0 turns -0.0 into 0.0
print(f" {label}: {w:8.2f} J", end="")
print()Expected results, apart from tiny rounding differences:
| Path | Gravity (J) | Spring (J) | Friction (J) |
|---|---|---|---|
| straight | −78.48 | −125.00 | −29.43 |
| right then up | −78.48 | −125.00 | −41.20 |
| detour | −78.48 | −125.00 | about −68.9 |
| closed loop | 0.00 | 0.00 | −70.63 |
The gravity and spring columns do not change between the first three rows. Gravity gives −mg(4 m) = −78.48 J. The spring gives −(1/2)(10)(5² − 0²) = −125 J, because the end point is 5 m from the origin. Friction changes with every route, and it is negative on the closed loop (−μ m g × 12 m of path).
Position-dependent is not the same as conservative
It is tempting to say that a force is conservative if it depends only on position. That is necessary but not sufficient. Consider a swirling force in 2D:
F = c(−y, x), with c a positive constant.
At each point it depends only on position, but it points around the origin, tangent to circles. Around a circle of radius r traversed counterclockwise, the force is parallel to every displacement and has magnitude c r. The work is
W = (c r)(2πr) = 2πc r².
This is not zero, so the force fails the closed-loop test. It is non-conservative even though it has no velocity dependence. A force that depends on position can fail to be conservative if it "circulates".
Forces that need care
| Force | Conservative? | Reason |
|---|---|---|
| Gravity (uniform or general) | Yes | Work depends only on endpoints |
| Ideal spring | Yes | Work depends only on the initial and final stretch |
| Kinetic friction | No | Work depends on path length |
| Air drag | No | Always opposes velocity, so it always removes energy |
| Normal force on a fixed surface | Does no work | Perpendicular to the displacement, so it plays no role in the work total |
| Magnetic force on a charge | Does no work | Perpendicular to the velocity. This is a different reason from being conservative |
| Applied push or pull by a person | Usually no | Can be chosen to do any amount of work on a path |
Three points of caution:
- Zero work on one path proves nothing. A non-conservative force can happen to do zero work on a particular path. The tests require all paths between the endpoints, or all closed loops.
- Zero work is not the same as conservative. A normal force on a fixed surface does zero work, but that is because it is perpendicular to the motion, not because of path independence. It does not need an energy term.
- A force can be conservative in one setting and not another. An ideal spring is conservative. A real spring that heats up when it is cycled quickly loses some energy, so the ideal model has limits.
What this buys us
Because gravity's work depends only on the endpoints, we can describe it by a quantity that depends only on position, the potential energy, and track the energy by comparing two states. The next chapter builds that quantity. Without path independence the construction would not work. If the work depended on the route, no function of position alone could store it.
For now, keep the practical rule. Before using a position-only shortcut for a force, check that the force passes the closed-loop test. If it fails, as friction does, the energy accounting needs an extra term, which we develop later in the tutorial.
Exercise
A 3.0 kg box is lifted by hand, and later slides back down a ramp. Gravity does work on the box as it moves from the floor to a shelf 2.0 m higher. What is the work done by gravity if the box goes up a vertical path, and what is it if the box goes up a 5.0 m long ramp instead? Use g = 9.81 m/s².
Show answer
It is the same for both paths, because gravity is conservative. W = −mg(Δy) = −(3.0)(9.81)(2.0) = −58.86 J, about −59 J. The ramp length does not matter.
Exercise
A 1.0 kg block slides around a closed loop on a rough horizontal table. The loop has a perimeter of 4.0 m and the kinetic friction coefficient is 0.20. How much work does friction do over one lap? Is friction conservative?
Show answer
W = −μ_k m g L = −(0.20)(1.0)(9.81)(4.0) = −7.85 J. The block returns to its start, but friction's work is not zero, so friction is not conservative.