$W = Fd$ needs one steady force. A spring's force grows as you stretch it, and a rocket's thrust changes as it climbs. A graph of force against position handles any of them, the same way the area under a v–t graph gave displacement.
Key idea
The work done by a force along a straight path is the area under its force-position ($F$–$x$) graph, counted negative where the force is negative.
Why it works
Slice the path into short steps. Over each step the force is nearly constant, so the work there is $F\,\Delta x$: the area of a thin strip. Adding up all the strips adds up the work. For a force that changes, using the final force times the whole distance counts the big end value over the whole path and overestimates the work.
Worked examples
Worked example: A spring
Stretching a spring from $0$ to $0.3\ \text{m}$, the force rises steadily from $0$ to $60\ \text{N}$. How much work do you do?
- The area under the straight line is a triangle.
- $W = \tfrac12 \times 0.3\ \text{m} \times 60\ \text{N} = 9\ \text{J}$.
Answer: $9\ \text{J}$
Worked example: A changing push
A cart is pushed with $10\ \text{N}$ for the first $2\ \text{m}$; then the push falls steadily to $0$ over the next $4\ \text{m}$. Find the total work.
- Rectangle: $10 \times 2 = 20\ \text{J}$.
- Triangle: $\tfrac12 \times 4 \times 10 = 20\ \text{J}$.
- Total: $40\ \text{J}$.
Answer: $40\ \text{J}$
Worked example: A force that reverses
A force is $+8\ \text{N}$ from $x = 0$ to $3\ \text{m}$, then $-4\ \text{N}$ from $3$ to $5\ \text{m}$. Find the net work.
- Above the axis: $8 \times 3 = 24\ \text{J}$. Below: $-4 \times 2 = -8\ \text{J}$.
- Net work: $16\ \text{J}$.
Answer: $16\ \text{J}$
Common mistake
Multiplying the final force by the distance when the force changes along the way. For the spring above that gives $18\ \text{J}$, twice the right answer. Check: sketch the $F$–$x$ graph and find the area; $F_{final} \times d$ is the area of the rectangle around it, too big whenever the force grew.