Sub topic 10
Finding force from the slope of the potential energy
Earlier chapters computed potential energy from a force: you found the work a conservative force does and stored it as U. This chapter runs the calculation backwards. If you know U(x), you can recover the force at every position from the slope of the U curve.
This chapter assumes you know the following:
- Work as force times displacement, and the work-energy theorem.
- The definition of a conservative force, and the forms U = mgy and U = kx²/2.
- Basic derivatives, such as the derivative of x² and of a constant. The chapter uses only power-rule derivatives.
- One-dimensional sign conventions, where positive x points right and a positive force points right.
The relation between force and potential energy
For a conservative force, the work done as an object moves from x to x + dx is F(x) dx. The potential energy is defined so that this work equals the decrease in U:
dU = -F(x) dx
Dividing by dx gives the relation this chapter is about:
F(x) = -dU/dx
In words, the force equals the negative of the slope of the potential energy curve. Two things follow directly:
- The force points in the direction in which U decreases. Objects are pushed "downhill" on the U curve.
- A steep slope means a large force. A flat slope means zero force.
This relation only makes sense for conservative forces. Path independence is what makes U a single-valued function of position, so that "the slope of U" is well defined. A friction force has no potential energy function, so it has no slope to read.
Recovering familiar forces
Differentiating the two potential energies you already know should return the forces you started with.
Gravity near the surface. With y pointing up, U(y) = mgy.
F_y = -d(mgy)/dy = -mg
The slope is positive (U rises with height), so the force is negative, which is downward. The magnitude mg matches the weight.
Ideal spring. With x measured from the relaxed position, U(x) = kx²/2.
F_x = -d(kx²/2)/dx = -kx
This is Hooke's law. For x > 0 the slope is positive, so the force is negative and pulls the block back toward x = 0. For x < 0 the slope is negative, so the force is positive and again points toward x = 0.
The reference level does not affect the force
Adding a constant to U shifts the whole curve up or down but does not change its slope. If U(y) = mgy + C, then dU/dy is still mg. This is the same fact as "the choice of zero does not matter" from the reference-level chapter, seen from the force side. Only differences in U, and therefore slopes, have physical meaning.
A worked example with an offset
A particle on a track has potential energy
U(x) = (5.0 J/m²) x² - (2.0 J/m) x
with x in meters and U in joules.
- Differentiate: dU/dx = 2(5.0)x - 2.0 = 10x - 2.0, in newtons.
- Apply the sign: F(x) = -(10x - 2.0) = 2.0 - 10x, in newtons.
- Find where the force is zero: 2.0 - 10x = 0, so x = 0.20 m.
- Check the force at x = 0.50 m: F = 2.0 - 5.0 = -3.0 N. It is negative, so it pushes the particle back toward smaller x.
This U is a spring potential with k = 10 N/m plus a linear term. The linear term is a constant force of +2.0 N, like a weight hanging from a vertical spring. The equilibrium point moves from x = 0 to x = 0.20 m. The spring's behavior is unchanged, but it now oscillates about a shifted center.
Checking a slope numerically
You can estimate a derivative on a computer using a central difference, which compares U a tiny step on each side of the point. The script below computes the force from U alone and compares it with the known answers.
def force_from_U(U, x, h=1e-5):
"""Estimate F = -dU/dx with a central difference."""
return -(U(x + h) - U(x - h)) / (2 * h)
# Spring: U = k x^2 / 2, expected force -k x
k = 200.0
spring_U = lambda x: 0.5 * k * x**2
x = 0.10
print(f"Spring at x={x:.2f} m: F = {force_from_U(spring_U, x):.3f} N "
f"(expected {-k * x:.3f} N)")
# Gravity: U = m g y, expected force -m g
m, g = 2.0, 9.81
grav_U = lambda y: m * g * y
print(f"Gravity at y=3.0 m: F = {force_from_U(grav_U, 3.0):.3f} N "
f"(expected {-m * g:.3f} N)")
# A cubic potential: U = 2 x^3 - 6 x, expected force 6 - 6 x^2
cubic_U = lambda x: 2 * x**3 - 6 * x
for x in [-1.0, 0.0, 1.0, 2.0]:
expected = 6 - 6 * x**2
print(f"Cubic at x={x:+.1f} m: F = {force_from_U(cubic_U, x):+8.3f} N "
f"(expected {expected:+8.3f} N)")The output shows -20.000 N for the spring, -19.620 N for gravity, and forces of about 0, +6, 0 and -18 N for the cubic at the four sample points. The cubic example has zero force at both x = -1 m and x = +1 m. Those are the points where its U curve is flat, which the next chapter classifies as equilibrium points.
Reading force from a graph
You can often get the force without a formula. Draw U against x and look at the slope at the point of interest.
- Slope positive: the force is negative, toward smaller x.
- Slope negative: the force is positive, toward larger x.
- Slope zero: the force is zero.
- Steeper slope: larger force magnitude.
You can estimate a slope from two nearby points on the curve: F ≈ -ΔU/Δx. Suppose a graph shows U = 12 J at x = 1.0 m and U = 8 J at x = 3.0 m, with the curve nearly straight between them. The average force there is -(8 - 12)/(3.0 - 1.0) = +2 N. U falls as x increases, so the force points toward larger x.
The same idea in more than one dimension
In two or three dimensions, U depends on position (x, y, z), and each force component is minus the slope along that axis, holding the other coordinates fixed:
F_x = -∂U/∂x, F_y = -∂U/∂y, F_z = -∂U/∂z
Together these form the force vector F = -∇U, where ∇U is the gradient of U. The gradient points in the direction of steepest increase of U, so the force points in the direction of steepest decrease. For U = mgy, only the y derivative is nonzero, which gives F = (0, -mg, 0). This course stays with one-dimensional problems, but the one-dimensional rule is the special case of this one.
The same rule gives the force for the general gravitational potential energy U(r) = -GMm/r, which later chapters use for escape speed. Differentiating gives dU/dr = +GMm/r², so F_r = -GMm/r². The force has a negative radial component, so it points toward the center, which is attraction.
Common errors
| Error | What goes wrong | Fix |
|---|---|---|
| Dropping the minus sign | The force points the wrong way, so the object appears pushed uphill on the U curve | Write `F = -dU/dx` and check that the force points toward lower U |
| Reading the height of the curve as the force | A high U value is not a large force | Use the slope, not the value |
| Using a nonconservative force | Friction has no U(x), so the formula does not apply | Treat friction with the work-energy relation from the previous chapter |
| Mixing coordinates | A U written in terms of compression s cannot be differentiated with respect to position x unless s = x - x₀ | Differentiate with respect to the same variable that defines the force direction |
| Forgetting units | A slope in J/m is a force in N | Check that the result has units of newtons |
Why this matters
The relation F = -dU/dx connects two descriptions of the same physics. The force description tells you the push at each point. The energy description holds the same information in one scalar function, and the force follows from its slope. This is also what makes energy diagrams useful. The next chapter uses the shape of a U curve to find equilibrium points and turning points without solving any equation of motion.
Exercises
Exercise
A particle has potential energy U(x) = 3.0x⁴ - 12x (U in joules, x in meters). Find the force on it at x = 1.0 m, and state its direction.
Show answer
dU/dx = 12x³ - 12. At x = 1.0 m this is 12 - 12 = 0, so F = -0 = 0 N. The force is zero there, so x = 1.0 m is a point where the U curve is flat.
Exercise
A graph of potential energy shows a straight line from U = 20 J at x = 2.0 m down to U = 5 J at x = 5.0 m. What is the force on a particle between those points, and which way does it point?
Show answer
The slope is (5 - 20) J / (5.0 - 2.0) m = -5 J/m. The force is F = -slope = +5 N. It is positive, so it points toward larger x, in the direction in which U decreases.
Exercise
A block of mass 0.50 kg hangs from a vertical spring with k = 200 N/m, with y measured upward from the relaxed position of the spring. Write U(y) = (1/2)k y² + m g y and find the equilibrium position y where F = 0. Use g = 9.81 m/s².
Show answer
F = -dU/dy = -(k y + m g). Setting F = 0 gives y = -m g / k = -(0.50)(9.81)/200 = -0.0245 m. The spring stretches by about 2.5 cm below its relaxed position.