MathemagiciansLibraryExplorationsDeep Dives
← Physics · Pre-University
PhysicsPre-University

Work done by a variable force — the integral

PP1 — Mechanics Advanced › PP1.3 — Energy AdvancedLecture 1 of 3~2660 words

Three answers for one spring

A spring has spring constant . You stretch it slowly from its natural length by 0.10 m. How much work do you do?

The force you need grows as you pull. At the start it is zero. At the end it is . Three students give three answers.

Chen is right. But his method is lucky. It works only because the force grows in a straight line. Try it on an elastic cord that stiffens as it stretches, with newtons (an invented cord), stretched from 0 to 2 m. The force goes from 0 to 12 N, so Chen's average gives . The true answer is 8 J. Averaging the ends has stopped working.

W = Fs, from the Upper Secondary lectures, needs one force for the whole path. A changing force has no single value to use. The last lecture integrated Newton's second law over distance and reached . It promised to study the work integral itself. Here it is.

Cutting the path into strips

Split the path into many thin strips, each of width . Inside one thin strip, the force hardly changes. So in that strip, the old rule is almost exact:

Add up the strips along the whole path, from to :

00.511.52036912x / mF / NΔxF = 3x²
The cord's force from 0 to 2 m, cut into eight strips of width 0.25 m. Each strip's area is its force times its width: the work done in that strip. One strip is shaded darker.

Each strip is a thin rectangle. Its height is the force, and its width is . So its area is the work done in that strip. The rectangles here use the force at the left edge of each strip, so they sit a little under the curve. Using the right edge puts them a little over it. Make the strips thinner, and both sums close in on the same number.

Number of stripsLeft edgesRight edges
45.25 J11.25 J
106.84 J9.24 J
1007.88 J8.12 J
10007.988 J8.012 J

In the limit , the sum becomes an integral, and the approximation becomes exact. That is it. That is the whole idea. Work done by a changing force is the area under the force–position graph, and the integral calculates that area.

The same integral checks Chen's spring: . For a straight-line graph, the area is a triangle or a trapezium, and its area is the average height times the width. That is why averaging the two ends works for a spring, and only for a straight line.

Work done by a variable force

, from the start to the end .

is the part of the force along the line of motion. For a force at angle to the motion, that part is , as in .

The work equals the area under the – graph, counted as negative where the force points against the motion.

W = Fs is not wrong. It is the special case of a constant force. The integral of a constant from to is : a rectangle.

Positive work, negative work

The sign of the work tells you which way energy moves. A force along the motion does positive work: it gives the object energy. A force against the motion does negative work: it takes energy away. Friction on a sliding block always does negative work.

The integral handles the sign by itself. Write with its sign, positive along . Integrate from where the object starts to where it ends, even if the end is at a smaller . If the object moves in the direction, is negative, and a force pointing that way (negative ) gives a positive product.

The spring, done properly

A spring that is stretched by pulls back with a force of size . To hold it, or to stretch it slowly, you pull the other way with . The Upper Secondary lectures write for the force on the spring. Some books write for the spring's own force, to show its direction. Both describe the same pair of forces.

The work you do in stretching it from natural length to an extension is

This work is stored in the spring as elastic potential energy, , up to the limit of proportionality. The lecture on elastic potential energy found the same result as the area of a triangle. The integral now does something the triangle could not do easily. It handles a stretch that does not start at the natural length:

Meanwhile, the spring's own force points the other way, so the spring does of work. When you stretch it, the spring does negative work. When it springs back, it does positive work and hands the energy back.

Stop and think

Stretching the spring with from 0 to 0.10 m took 1 J. How much work does the next 0.10 m take, from 0.10 m to 0.20 m?

Show the answer

3 J, not 1 J. The work is . On the graph, the second strip is a trapezium with heights 20 N and 40 N, so its area is . The force is larger all the way along the second stretch, so each centimetre costs more.

Now use the graph to see the sign of the spring's work. A 0.5 kg block on a smooth floor is fixed to a spring with . The position is measured from where the spring is at its natural length, so the spring's force on the block is .

Graph builder — the work done by a spring

Choose where the block starts (x₁) and where it ends (x₂). The shaded area is the spring's work: blue where it is positive, grey where it is negative. Try the presets first.



The graph shows the spring's force on the block, . The shaded strip is the move from 0.20 m to 0.10 m.

−0.3−0.2−0.10.10.20.3−15−10−551015x / mF / N0.75 Jmotion
The block moves from 0.20 m to 0.10 m, towards O. The force is negative (towards O) and the motion is towards O, so the spring does positive work: 0.75 J.
MoveSpring's workSpeed at the end, from rest
0.20 → 0.10 m+0.75 J1.73 m s⁻¹
0.20 → 0 m+1.00 J2.00 m s⁻¹
0.20 → −0.20 m0 J0 (it stops there)
0 → 0.20 m−1.00 Jcannot start from rest

You should have seen three things. Moving towards O, the spring does positive work and the block speeds up. Moving away from O, the work is negative and the block slows down. And from 0.20 m to −0.20 m, the blue and grey areas cancel exactly. The spring gives 1 J and takes 1 J back, so the block stops at −0.20 m, as far out as it started.

The work–energy theorem

The last lecture integrated over distance. For the resultant force on an object, that gave

The left side is the work done by the resultant force. It is also the sum of the work done by every separate force, because the integral of a sum is the sum of the integrals. So

The work–energy theorem

The total work done by all the forces on an object equals the change in its kinetic energy.

This came from Newton's second law with a force that changes, so it does not need constant forces. It has two conditions. The object must move as one piece, like a particle, so that every part has the same speed. And in two or three dimensions, each force counts only through its part along the path.

Now the theorem can answer a question that W = mgh cannot.

Predict — lifting a probe far from the Earth

A 1000 kg probe is lifted slowly from the Earth's surface to a height of 6371 km, one Earth radius. Its weight is 9.81 kN at the surface and gets smaller with height. How much work is done against gravity? Choose before you look.

The figure shows the probe's weight against its distance from the Earth's centre, from the surface (R) to 2R.

02.557.510R2Rdistance from the Earth’s centreweight / kN9.81 kN2.45 kNmgh rectangle
The weight falls from 9.81 kN at R to 2.45 kN at 2R, as 1/r². The work against gravity is the shaded area under the curve, about 31.2 GJ. The dashed rectangle is mgh, about 62.5 GJ, twice as much.

The work done against gravity is about 31.2 GJ, half of mgh. The weight is 9.81 kN only at the surface. Further out it is smaller, so each metre of the lift costs less.

Here is the calculation. The lecture on gravitational field strength showed that falls as the inverse square of the distance from the Earth's centre. So the weight at distance is , where and (NASA's mean radius). The reverse of the power rule gives . So

That is , about 31.2 GJ. The probe starts and ends at rest, so . By the work–energy theorem, the lifting force does +31.2 GJ and gravity does −31.2 GJ. Air resistance and the Earth's spin are ignored. The lecture on gravitational potential builds on exactly this integral.

Power: how fast the work is done

Power is the rate of doing work, . In a short time , the object moves , and the force does work . So

This is true at every instant, for a changing force and a changing speed. is the part of the force along the velocity. For example, a car's engine drives it forward with 1500 N at 20 m s⁻¹. At that instant the driving force delivers . Use the driving force, not the resultant force. At a steady speed the resultant is zero, but the engine is still working hard against air resistance and friction. The next lecture follows that energy through machines.

Worked examples

Worked Example 1 — Work from a graph

The resultant force on a 5 kg trolley rises steadily from 0 to 40 N over the first 4 m, then stays at 40 N up to 6 m. The trolley starts from rest. Find the work done and its speed at 6 m.

0123456010203040x / mF / N80 J80 J
The force–position graph. The area splits into a triangle (0 to 4 m) and a rectangle (4 m to 6 m), 80 J each.

Area. Triangle: . Rectangle: . Total work: 160 J.

Speed. This is the resultant force, so : , so and .

Check. Reading the area off a graph is calculus done by eye. The integral of the first part, , agrees.

Worked Example 2 — An energy account

A 2 kg box is pulled up a 50 m shaft by a rope. It starts and ends at rest. A constant resistive force of 3 N acts against the motion all the way up. How much work does the rope do? Where does it go?

Take up as positive. Three forces do work.

Gravity: (force down, motion up).

Resistance: .

Rope: , unknown.

The box starts and ends at rest, so , and . So , giving .

The account. Of the 1131 J, 981 J goes into the gravitational potential energy store. The other 150 J is transferred to thermal energy by the resistance. Every joule is accounted for.

Worked Example 3 — A stiffening catapult

An invented catapult cord needs a force newtons to stretch it by metres. It is pulled back 0.50 m and fires a 0.15 kg stone. Find the work done in stretching it, and the stone's launch speed.

Work. .

Speed. If all 7.5 J goes to the stone, , so and . This model ignores the cord's own mass and the energy lost as it heats up, so the real stone is slower.

Check. The force at 0.5 m is . Averaging the ends gives , too much, because this curve bends upwards and lies below the straight line joining its ends.

Worked Example 4 — A block on a spring

The 0.5 kg block from the graph builder (, smooth floor) is pulled to m and released from rest. Find its speed at m and at O.

Only the spring does work along the floor. Its work from 0.20 m to 0.10 m is .

So , giving and .

At O the spring's work is , so and .

Check. The first 0.10 m gives 0.75 J, but the second 0.10 m only 0.25 J. That fits the graph: the force is largest far from O and falls to zero at O.

Three traps

Trap 1 — One value of a changing force

W = Fs with the final force, the starting force or the average of the two is wrong for a changing force. The average works only for a straight-line graph. Otherwise, integrate, or find the area under the graph.

Trap 2 — ½kx² for a stretch that does not start at zero

Stretching a spring from 0.10 m to 0.20 m does not take . It takes , three times as much. Square each extension first, then subtract.

Trap 3 — Mixing "work done by" and "work done on"

When you stretch a spring by 0.10 m, you do +1 J on it, and the spring does −1 J on your hand. In the work–energy theorem, add the work done by each force on the object you are studying. Mixing the two changes the sign and the answer.

Try it yourself

Work each one on paper first. Open a hint only when you are stuck.

  1. The resultant force on a 3 kg cart rises steadily from 0 to 30 N over the first 2 m. It stays at 30 N up to 5 m, then falls steadily to 0 at 7 m. The cart starts from rest. Find the total work and the cart's speed at 7 m.

    Hint 1

    Sketch the F–x graph. The area splits into a triangle, a rectangle and another triangle.

    Hint 2

    Then use , since it starts from rest.

    Full answer

    Areas: , , . Total 150 J. Then , so and . Check: the average force over 7 m is , between 0 and 30 N, as it should be.

  2. A force newtons acts along the x-axis. Find the work it does from m to m. Then explain why averaging the two end forces gives the same answer here.

    Hint 1

    Integrate term by term, then put in the two limits.

    Hint 2

    . Subtract the value at 1 from the value at 3.

    Full answer

    . The end forces are 9 N and 17 N. Their average, 13 N, times 2 m is also 26 J. This works because the graph is a straight line, so the area is a trapezium: average height times width.

  3. A spring has . (a) Find the work needed to stretch it from an extension of 0.05 m to 0.15 m. (b) A motor does this stretching at a steady 0.02 m s⁻¹. Find the motor's power at the moment the extension is 0.15 m.

    Hint 1

    (a) Use , not .

    Hint 2

    (b) Power is at that instant. Find the force at 0.15 m first.

    Full answer

    (a) . (b) At 0.15 m, . So . Check: the stretch takes , so the average power is . That is less than 1.2 W, which fits: the force, and so the power, is largest at the end.

  4. A 500 kg probe is to escape from the Moon completely. Using the Moon's surface gravity, 1.62 m s⁻², and mean radius, 1737.4 km (NASA), find the work needed to lift it from the surface to "infinitely far away". Then find the launch speed that provides this energy, ignoring the Moon's spin.

    Hint 1

    Use the probe calculation, with the upper limit replaced by "infinity". What happens to as grows without limit?

    Hint 2

    . Then set .

    Full answer

    , because shrinks towards zero. So . The finite answer is surprising: the weight never quite reaches zero, but it falls so fast that the total area is finite. The launch speed needs , so , about 2.37 km s⁻¹. NASA lists the Moon's escape velocity as 2.38 km s⁻¹; the small difference comes from rounding to 1.62. Notice that the mass cancels: every object needs the same speed.

The bigger idea

The word "work" in this exact sense is younger than Newton's laws. In 1829 the French engineer Gaspard-Gustave de Coriolis published a book on calculating the effect of machines. In it he used the word travail (work) for a force acting through a distance. He also put the factor ½ in front of , which gave kinetic energy its modern form and made the work–energy theorem exact.

The theorem is a bridge between two ways of doing mechanics. In the force world, you follow the motion step by step with . In the energy world, you compare only the start and the end. Sometimes the details in between do not matter: a probe climbing away from a planet, a block released from a spring, a ball on a curved track. Then the energy world is usually quicker. And when a force changes along the way, the integral is what lets you cross the bridge.

Key concepts in this lesson