Academy
Formulas/physics/Work Energy Power/Work Done by Spring Force

Work Done by Spring Force

Work done by the spring on the body as it is compressed or stretched by x from natural length.
Class 11Class JEE
Derivation

Setup

A spring of spring constant kk is attached to a wall. A body is attached to the free end. The natural (unstretched) length position is x=0x = 0.

When the body is displaced by xx from the natural length (either stretched or compressed), the spring exerts a restoring force:

Fspring=kxF_{spring} = -kx

The negative sign means the force always opposes the displacement — it pulls back when stretched, pushes back when compressed.

Derivation

Work done by the spring force as the body moves from x=0x = 0 to x=x0x = x_0:

Wspring=0x0Fspringdx=0x0(kx)dxW_{spring} = \int_0^{x_0} F_{spring} \, dx = \int_0^{x_0} (-kx) \, dx

Wspring=kx220x0=12kx02W_{spring} = -k \cdot \frac{x^2}{2}\Big|_0^{x_0} = -\frac{1}{2}kx_0^2

Wspring=12kx2\boxed{W_{spring} = -\frac{1}{2}kx^2}

Why the work is negative

As the body moves away from equilibrium (stretching or compressing the spring), the spring force opposes this motion. Force and displacement are in opposite directions — negative work.

The spring takes energy from the body and stores it as elastic potential energy.

Work done by spring over a general displacement

If the body moves from x1x_1 to x2x_2:

Wspring=x1x2(kx)dx=12kx22+12kx12=12k(x12x22)W_{spring} = \int_{x_1}^{x_2} (-kx) \, dx = -\frac{1}{2}kx_2^2 + \frac{1}{2}kx_1^2 = \frac{1}{2}k(x_1^2 - x_2^2)

  • If x2>x1|x_2| > |x_1|: spring does negative work (stores energy)
  • If x2<x1|x_2| < |x_1|: spring does positive work (releases energy)

Work done when spring returns to natural length

If body is released from x=x0x = x_0 and returns to x=0x = 0:

Wspring=12k(x020)=12kx02W_{spring} = \frac{1}{2}k(x_0^2 - 0) = \frac{1}{2}kx_0^2

Positive — the spring releases all the stored energy back to the body. This is why springs are useful as energy storage devices.

Connection to elastic potential energy

The elastic potential energy stored in a spring at extension xx:

U=12kx2U = \frac{1}{2}kx^2

Work done by spring = decrease in elastic PE:

Wspring=ΔU=(UfUi)=12kxi212kxf2W_{spring} = -\Delta U = -(U_f - U_i) = \frac{1}{2}kx_i^2 - \frac{1}{2}kx_f^2

Consistent with the general formula above.

Remember
Work done by the spring on the body and work done by external agent on the spring are equal and opposite. To stretch a spring by $x$, an external agent must do work $+\frac{1}{2}kx^2$ (positive — agent puts energy in). The spring does work $-\frac{1}{2}kx^2$ on the body (negative — takes energy from body).