Work, Energy & Power

work done by a variable force

The simple formula work = force times distance quietly assumes the force stays the same the whole way. But real forces often change as the object moves: a spring pulls harder the more you stretch it, gravity weakens as you climb away from a planet. Work done by a variable force is how we handle these honest, changing situations, where a single value of F will not do.

The trick is to slice the motion into steps so tiny that, within each one, the force barely changes. Over each little step you can use force times that small displacement, and then you add up all the slices. In the limit of infinitely thin slices this sum becomes the area under the graph of force versus position — written as an integral, W = integral of F dx. Geometrically, work is simply that area, whatever shape the force curve takes.

For a spring obeying F = k x, the force rises as a straight line from 0 to k x, so the area under it is a triangle of height k x and base x, giving W = 1/2 k x^2 — exactly the elastic potential energy stored. The area-under-the-curve idea is completely general; the familiar W = F d is just the special, easy case where the graph is a flat horizontal line and its area is a plain rectangle.

Stretching a spring of stiffness k = 400 N/m from 0 to 0.05 m: the force climbs from 0 to k x = 400 x 0.05 = 20 N. The work is the triangle's area, 1/2 x base x height = 1/2 x 0.05 x 20 = 0.5 J — the same as 1/2 k x^2 = 1/2 x 400 x 0.05^2 = 0.5 J.

Because the spring's force grows steadily, the work is the triangular area under the line — half what a constant 20 N would give.

You cannot just multiply the final force by the distance when the force changes along the way — that overcounts. Use the average force, or equivalently the area under the force-position curve; for a spring that area is a triangle, hence the factor of 1/2.

Also called
變力做功