LearnViz Physics

Home / Topics / Work, Energy & Power

Work done by a variable force

Intermediate

Integrate force over displacement.

Key relationW = ∫F·dx

When the force varies, W = ∫F dx. For a spring this gives ½kx², for gravity far from Earth −GMm(1/r₂ − 1/r₁).

Worked example

F = 3x² N from 0 to 2 m: W = 8 J.

Common mistake

Use F's component along the path.

In more detail

When a force varies with position, the work is the integral of force with respect to displacement, W = ∫F dx. This generalises the constant-force formula.

Real-world uses

Open the interactive lesson, with simulation and quiz →

Frequently asked questions

Do I need calculus for variable forces?

Yes, or a graphical area estimate. The integral is the exact method.

What if the force is constant?

The integral reduces to F times d, the constant-force formula.

When do I need an integral for work?

When the force changes during the motion, such as a spring or a gas, so the simple formula W = Fd no longer applies.

Related topics in Work, Energy & Power

Units of work and energy · Positive, negative and zero work · Work from a force–displacement graph · Work done by a spring · Kinetic energy · Work–energy theorem

← All Work, Energy & Power topics