Home / Topics / Work, Energy & Power
Work done by a variable force
Intermediate
Integrate force over displacement.
W = ∫F·dxWhen the force varies, W = ∫F dx. For a spring this gives ½kx², for gravity far from Earth −GMm(1/r₂ − 1/r₁).
F = 3x² N from 0 to 2 m: W = 8 J.
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
- Calculating the work needed to stretch a spring by a given amount.
- Finding the energy needed to launch a rocket from Earth, where gravity weakens with height.
- Engineers calculate the work needed to compress a gas in a piston, where the pressure changes as the volume shrinks.
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