Work Done by a Variable Force

The work done by a variable force F(x) moving an object along a line from x = a to x = b is W = \int_a^b F(x)\,dx. When the force is constant, work is just force times distance. When the force changes, you add up force times tiny distances, which is an integral.

Before this lesson: Riemann Sums, Definite Integrals and Fundamental Theorem of Calculus, Part 2

Why work becomes an integral

Pushing a box with a steady 10 newtons for 3 meters takes 10 · 3 = 30 joules of work. But stretching a spring gets harder the farther you pull. The force keeps changing, so one multiplication won’t do.

Break the motion into tiny steps Δx. Over each step, the force is almost constant, so the work is about F(x)Δx. Adding the steps is a Riemann sum, and its limit is \int_a^b F(x)\,dx. On a graph of force against distance, the work is the area under the curve.

Graph of the spring force F(x) = 30x newtons for x from 0 to 0.6 meters. The line rises from (0, 0) to (0.6, 18). The region under the line from x = 0.2 to x = 0.5 is shaded and labeled W = 3.15 J.
Work is the area under the force graph: stretching from 0.2 m to 0.5 m takes 3.15 joules.

Work formulas

W = \int_a^b F(x)\,dx
SituationFormula
Constant forceW = Fd
Variable force F(x)W = \int_a^b F(x)\,dx
Spring (Hooke’s law)F(x) = kx, where x is the distance stretched or squeezed past the natural length
Lifting a cable or chainW = \int (\text{weight per length})(\text{distance lifted})\,dy

Units: force in newtons and distance in meters give joules (J); pounds and feet give foot-pounds (ft-lb).

Work done by a variable force examples

Example 1: A force given by a formula

A force of F(x) = 3x^2 + 2 newtons moves an object from x = 0 to x = 2 meters. Find the work.

W = \int_0^2 (3x^2 + 2)\,dx

Set up the work integral.

= \Big[x^3 + 2x\Big]_0^2

Integrate with the power rule (see antiderivatives).

= (8 + 4) - 0 = 12

Plug in 2 and 0.

Answer: W = 12 joules.

Example 2: Stretching a spring

A force of 6 N holds a spring stretched 0.2 m past its natural length. How much work does it take to stretch it from 0.2 m to 0.5 m past its natural length?

6 = k(0.2)

Hooke’s law, F = kx, with x = 0.2.

k = 30

Divide both sides by 0.2. Units: N/m.

W = \int_{0.2}^{0.5} 30x\,dx = \Big[15x^2\Big]_{0.2}^{0.5}

Set up and integrate.

= 15(0.25) - 15(0.04)

Plug in 0.5 and 0.2.

= 3.75 - 0.6 = 3.15

Subtract.

Answer: W = 3.15 joules. This is the shaded area in the graph above.

Example 3: Finding the spring constant from work

A spring has natural length 10 cm. It takes 2 J of work to stretch it from 10 cm to 15 cm. How much work does it take to stretch it from 15 cm to 20 cm?

0 \text{ to } 0.05 \text{ m}

Measure x from the natural length, in meters: 15 cm is 0.05 m past it.

\int_0^{0.05} kx\,dx = \dfrac{k(0.05)^2}{2} = 0.00125k

Work for the first stretch.

0.00125k = 2 \Rightarrow k = 1600

Set it equal to 2 J and divide.

W = \int_{0.05}^{0.10} 1600x\,dx = \Big[800x^2\Big]_{0.05}^{0.10}

20 cm is 0.10 m past natural length.

= 800(0.01) - 800(0.0025) = 8 - 2 = 6

Plug in and subtract.

Answer: 6 joules, three times as much as the first 5 cm.

Example 4: Lifting a hanging cable

A 30 m cable that weighs 2 N per meter hangs from the top of a building. How much work does it take to pull the whole cable up to the top?

\text{weight of a piece} = 2\,\Delta y

Let y be the distance below the top. A piece of length Δy weighs 2Δy newtons.

\text{work for that piece} \approx 2\,\Delta y \cdot y

It must be lifted y meters.

W = \int_0^{30} 2y\,dy

Add the pieces from y = 0 to y = 30.

= \Big[y^2\Big]_0^{30} = 900

Integrate and plug in.

Answer: W = 900 joules. Pieces near the bottom are lifted farther, which is why the integral is needed.

Example 5: A cable lifting a bucket

The same 30 m cable (2 N/m) is used to lift a 150 N bucket of tools from the ground to the top. How much work is done in all?

W_{\text{cable}} = 900

From Example 4.

W_{\text{bucket}} = 150 \cdot 30 = 4500

The bucket’s weight is constant, so W = Fd.

W = 900 + 4500 = 5400

Add the two parts.

Answer: 5400 joules.

Common mistakes

MistakeExample of the errorFix
Using W = Fd for a changing forceSpring: 30(0.5) · 0.3The force changes, so integrate: \int_{0.2}^{0.5} 30x\,dx.
Measuring from the wrong placex = 15 cm for a 15 cm spring with natural length 10 cmHooke’s law uses the stretch past natural length: x = 5 cm.
Mixing unitsUsing x in centimeters with forces in newtonsConvert to meters to get joules.
Lifting a cable all the same distanceW = 60 · 30 for the whole 60 N cableEach piece is lifted a different distance. Integrate weight per length times y.
Forgetting the loadOnly the cable’s work for a cable lifting a bucketAdd the constant-force work for the load.

Related methods

Pumping liquid out of a tank

The cable idea extends to liquids: slice the liquid into thin layers, find each layer’s weight, and multiply by the distance it must be lifted. That is the next lesson, Pumping Liquid Problems.

Force from gravity far from Earth

Gravity’s pull drops as 1/r². The work to lift a satellite from r = R to r = 2R is \int_R^{2R} \dfrac{GMm}{r^2}\,dr = \dfrac{GMm}{2R}, an integral of a variable force.

Work and energy

The work done stretching a spring from its natural length to x is (1/2)kx². This is the energy stored in the spring.

Practice problems

  1. A force of F(x) = 5x + 4 newtons moves an object from x = 0 to x = 3 m. Find the work.
  2. A force of F(x) = \dfrac{1}{x^2} newtons acts from x = 1 to x = 4 m. Find the work.
  3. A force of F(x) = 10\sin\dfrac{\pi x}{4} newtons acts from x = 0 to x = 2 m. Find the work.
  4. A force of 8 N holds a spring 0.4 m past its natural length. Find the work to stretch it from natural length to 0.4 m.
  5. A spring has k = 50 N/m. Find the work to stretch it from 0.1 m to 0.3 m past natural length.
  6. A 10 lb force stretches a spring 2 inches. Find the work, in ft-lb, to stretch it 6 inches past natural length.
  7. It takes 0.9 J of work to stretch a spring 0.3 m past its natural length. What force holds it there?
  8. A 20 ft chain weighing 3 lb/ft hangs from a winch. Find the work to wind up the whole chain.
  9. For the chain in problem 8, find the work to wind up only the top 10 ft.
  10. A bucket of water weighs 40 lb at the bottom of a 50 ft well. It leaks as it rises, so it weighs 40 − 0.2y lb at height y. Find the work to lift it to the top (ignore the rope).
Show answers

1.

W = \int_0^3 (5x + 4)\,dx = \Big[\tfrac{5}{2}x^2 + 4x\Big]_0^3

Set up and integrate.

= 22.5 + 12 = 34.5

Plug in 3.

Answer: 34.5 J

2.

W = \int_1^4 x^{-2}\,dx = \Big[-\dfrac{1}{x}\Big]_1^4

Set up and integrate.

= -\dfrac{1}{4} + 1 = \dfrac{3}{4}

Plug in 4 and 1.

Answer: 0.75 J

3.

W = \int_0^2 10\sin\dfrac{\pi x}{4}\,dx = 10\cdot\dfrac{4}{\pi}\Big[-\cos\dfrac{\pi x}{4}\Big]_0^2

Use u = πx/4, so dx = (4/π) du (see u-substitution).

= \dfrac{40}{\pi}\left(-\cos\dfrac{\pi}{2} + \cos 0\right) = \dfrac{40}{\pi}(0 + 1)

Plug in 2 and 0.

= \dfrac{40}{\pi} \approx 12.73

Simplify.

Answer: about 12.73 J

4.

k = \dfrac{8}{0.4} = 20

Hooke’s law.

W = \int_0^{0.4} 20x\,dx = 10(0.4)^2 = 1.6

Integrate and plug in.

Answer: 1.6 J

5.

W = \int_{0.1}^{0.3} 50x\,dx = 25(0.09) - 25(0.01)

Integrate to 25x² and plug in.

= 2.25 - 0.25 = 2

Subtract.

Answer: 2 J

6.

2 \text{ in} = \tfrac{1}{6} \text{ ft}, \; k = \dfrac{10}{1/6} = 60

Convert to feet, then use Hooke’s law.

W = \int_0^{0.5} 60x\,dx = 30(0.5)^2 = 7.5

6 inches is 0.5 ft.

Answer: 7.5 ft-lb

7.

\dfrac{k(0.3)^2}{2} = 0.9 \Rightarrow 0.045k = 0.9

Work from 0 to 0.3 is kx²/2.

k = 20, \; F = 20(0.3) = 6

Divide, then use F = kx.

Answer: 6 N

8.

W = \int_0^{20} 3y\,dy = \Big[\tfrac{3}{2}y^2\Big]_0^{20}

A piece y ft down weighs 3Δy lb and is lifted y ft.

= \tfrac{3}{2}(400) = 600

Plug in.

Answer: 600 ft-lb

9.

\int_0^{10} 3y\,dy = \tfrac{3}{2}(100) = 150

The top 10 ft: each piece is lifted y ft.

3 \cdot 10 \cdot 10 = 300

The bottom 10 ft weighs 30 lb and every piece rises 10 ft.

150 + 300 = 450

Add.

Answer: 450 ft-lb

10.

W = \int_0^{50} (40 - 0.2y)\,dy = \Big[40y - 0.1y^2\Big]_0^{50}

The force is the bucket’s weight at height y.

= 2000 - 250 = 1750

Plug in 50.

Answer: 1750 ft-lb

Work done by a variable force FAQ

What is the formula for work done by a variable force?

W = ∫ from a to b of F(x) dx. It is the area under the graph of force against position.

How do you find work done on a spring?

Use Hooke’s law, F = kx, where x is measured from the natural length. Find k from the given data, then integrate kx over the stretch.

Why can’t you just multiply force by distance?

W = Fd only works when the force stays the same. When the force changes, you add tiny pieces F(x) dx, which is an integral.

What are the units of work?

Newtons times meters give joules. Pounds times feet give foot-pounds.

Summary

  • Work by a variable force: W = ∫ₐᵇ F(x) dx, the area under the force graph.
  • Springs: F = kx, with x measured from the natural length.
  • Find k first, then integrate kx between the two stretches.
  • Cables and chains: integrate weight per length times the distance lifted.
  • Add constant-force work for any load: W = Fd.

Previous lesson: Surface Area of Revolution

Next lesson: Pumping Liquid Problems

Back to the Calculus 2 Index