In physics, work is force times distance: lifting a 50 N box 2 m takes $W = 50 \cdot 2 = 100$ joules (newton-meters). That rule needs a constant force over the whole distance. When the force changes as you go, or different parts of an object move different distances, you add up small pieces, which is what definite integrals do.
Why it works
Split the motion from $x = a$ to $x = b$ into short steps $\Delta x$. Over one short step the force hardly changes, so the work on that step is about $F(x_i)\,\Delta x$. Adding the steps gives a Riemann sum for $\int_a^b F(x)\,dx$.
For a tank of liquid, slice the liquid instead of the motion. A thin layer at height $y$ has a weight (density times volume) and must travel some distance $d(y)$ to the outlet. Its work is weight times $d(y)$. Different layers travel different distances, which is why you need an integral.
Key idea
Varying force: $W = \int_a^b F(x)\,dx$. Hooke's law for springs: $F(x) = kx$, with $x$ the stretch beyond natural length.
Pumping: $$W = \int (\text{layer weight})(\text{lift distance}),$$ summed over thin layers of the liquid: each layer's weight times the distance it travels. Water weighs $9800$ N/m³ (or $62.4$ lb/ft³).
Worked example: A spring
A force of 10 N holds a spring stretched 0.2 m beyond its natural length. How much work does it take to stretch it from 0.2 m to 0.5 m?
- $10 = k(0.2)$, so $k = 50$ N/m.
- $$\begin{aligned} W &= \int_{0.2}^{0.5} 50x\,dx \\ &= 25\left(0.5^{2} - 0.2^{2}\right) \\ &= 25(0.21). \end{aligned}$$
- $W = 5.25$ J.
Answer: $5.25$ J
Worked example: A hanging rope
A 20 m rope weighing 3 N/m hangs from a roof. How much work does it take to pull it all up?
- A short piece $y$ meters below the top weighs $3\,\Delta y$ newtons and travels $y$ meters.
- $W = \int_0^{20} 3y\,dy = 3\cdot\frac{20^{2}}{2} = 600$ J.
Answer: $600$ J
Worked example: Emptying a tank
A cylindrical tank of radius 2 m and height 5 m is full of water. Find the work needed to pump all the water out over the top.
- Measure $y$ up from the bottom. The layer at height $y$ is a disk of volume $\pi(2)^{2}\Delta y$ and weight $9800\cdot 4\pi\,\Delta y$ N.
- That layer rises $5 - y$ meters to the top.
- $$\begin{aligned} W &= \int_0^5 9800\cdot 4\pi\,(5 - y)\,dy \\ &= 39200\pi\left[5y - \frac{y^{2}}{2}\right]_0^5 \\ &= 39200\pi\cdot 12.5. \end{aligned}$$
- $W = 490000\pi \approx 1.54\times 10^{6}$ J.
Answer: $490000\pi$ J
| Layer at height $y$ (m) | Distance to the top (m) | Work for a $0.1$ m layer (J) |
|---|---|---|
| $0.5$ | $4.5$ | $9800\cdot 4\pi\cdot 0.1\cdot 4.5 \approx 55{,}400$ |
| $2.5$ | $2.5$ | $\approx 30{,}800$ |
| $4.5$ | $0.5$ | $\approx 6{,}200$ |
Common mistake
Using one distance for the whole tank, such as the full height. Here total weight times 5 m gives $9800\cdot 20\pi\cdot 5 = 980000\pi$ J, twice the right answer, because only the bottom layer travels the full 5 m. Check: set up the work of one thin layer, with its own distance, before integrating. Also keep $y$'s meaning fixed: if $y$ is the height from the bottom, the distance to the top is $5 - y$, not $y$.