Why Spring Work Requires an Integral
A spring’s force changes as the spring is stretched or compressed. A small displacement near its natural length requires less force than the same displacement near a far-extended or strongly compressed state. Therefore, work cannot generally be found by treating the force as constant throughout the motion.
Hooke’s law gives a simple model for this changing force: the spring’s restoring force is proportional to its displacement from its natural length. Integrating that force over displacement gives the work required to change the spring’s length.
Displacement and Hooke’s Law
Let \(L_0\) be the spring’s natural length: its length when it is neither stretched nor compressed. Let \(L\) be its current length. Define the signed displacement from the natural length by \(x=L-L_0\). Thus, \(x>0\) means the spring is stretched, \(x<0\) means it is compressed, and \(x=0\) means it is at its natural length.
The spring constant \(k\) measures stiffness. If displacement is measured in metres and force in newtons, then \(k\) is measured in newtons per metre, written \(\text{N/m}\). Hooke’s law is an idealization: it applies over the range in which the spring behaves elastically and its force is proportional to displacement.
To move the spring slowly while keeping it in equilibrium, an applied external force must balance the spring’s force. In this quasistatic model, \(F_{\text{external}}=kx\). Work required means the work done by that applied force. Its sign depends on the direction of motion: positive work supplies energy to the spring, while negative work means energy is returned by the spring to the agent moving it.
The Work Formula
Suppose the spring moves from displacement \(x=a\) to displacement \(x=b\). During a small signed displacement \(dx\), the applied force is \(kx\), so the small amount of external work is \(kx\,dx\). Adding these contributions over the motion gives the work integral.
If the motion is described by spring lengths \(L_1\) and \(L_2\), use \(a=L_1-L_0\) and \(b=L_2-L_0\). The same result becomes
This is signed work. It gives the net work done over the stated change of length, not necessarily the total work done if the spring is moved back and forth along a longer path. For example, moving quasistatically from one displacement to another and then returning to the starting displacement gives zero net external work in this ideal model.
Why the Formula Works
The work integral follows from adding the work over small pieces of the displacement. Divide the interval from \(a\) to \(b\) into small subintervals. On a subinterval of width \(\Delta x_i\), the spring’s displacement changes only slightly, so the applied force is approximately \(kx_i^*\) for a sample point \(x_i^*\) in that subinterval. The work on that piece is approximately \(kx_i^*\Delta x_i\).
Summing the pieces gives an approximation to the total work. As the partition is made finer, the approximation approaches the definite integral of the applied force with respect to displacement:
To evaluate the integral, an antiderivative of \(kx\) is \(\frac{1}{2}kx^2\), because differentiating it gives \(kx\). Applying the Fundamental Theorem of Calculus yields
The spring’s own work has the opposite sign. Since its force is \(-kx\), its work over the same motion is \(\int_a^b -kx\,dx=-W_{\text{external}}\). This sign distinction matters: “work required to move the spring quasistatically” refers here to external work, not work done by the spring.
Worked Examples
Worked Example: Stretching a Spring from Its Natural Length
A spring has natural length \(0.25\text{ m}\) and spring constant \(200\text{ N/m}\). Find the work required to stretch it to length \(0.40\text{ m}\), moving quasistatically.
First find the initial and final displacements from natural length:
The applied force is \(F_{\text{external}}=kx=200x\) newtons. Set up the work integral and evaluate it:
Check: differentiating the antiderivative \(100x^2\) gives \(200x\), the applied force. The units are \((\text{N/m})(\text{m}^2)=\text{N}\cdot\text{m}=\text{J}\). The work is positive because the spring is moved farther from its natural length.
Worked Example: Compressing a Spring
A spring has natural length \(0.30\text{ m}\) and spring constant \(500\text{ N/m}\). Find the work required to compress it quasistatically from its natural length to \(0.22\text{ m}\).
The initial displacement is zero. The final signed displacement is negative because the final length is shorter than the natural length:
Use the signed displacement bounds in the integral:
Check: \(\frac{d}{dx}(250x^2)=500x\), as required. The result is positive: during compression, \(x<0\) and the displacement \(dx\) is also negative, so \(kx\,dx\) is positive. The spring’s restoring force points in the opposite direction to the applied compressing force.
Worked Example: Moving Through the Natural Length
A spring has natural length \(0.30\text{ m}\) and spring constant \(400\text{ N/m}\). Find the quasistatic external work required to move it from length \(0.28\text{ m}\) to length \(0.35\text{ m}\).
Convert both lengths to signed displacements:
The spring begins compressed and ends stretched. Applying the work formula:
Check: differentiating \(200x^2\) gives \(400x\). The units reduce to joules. The negative-displacement portion of the motion contributes negative external work as the spring moves from compression toward its natural length; the subsequent stretching requires more positive work. The net work is \(0.42\text{ J}\).
Sign, Units, and a Common Mistake
The sign can be checked directly from the integral. When the spring is stretched farther, \(x>0\) and motion has \(dx>0\), so \(kx\,dx>0\). When it is compressed farther, \(x<0\) and motion has \(dx<0\), so \(kx\,dx>0\) again. Both actions require positive external work. In contrast, moving a displaced spring toward its natural length can involve negative external work because the spring assists the motion.
Work has units of force times distance. Since \(k\) has units \(\text{N/m}\) and \(x^2\) has units \(\text{m}^2\), the formula \(\frac{1}{2}kx^2\) has units \(\text{N}\cdot\text{m}\), or joules. Retaining the signed displacement is essential for setting the integral bounds correctly, even though the endpoint formula contains squared displacements.
For example, stretching the spring in the first worked example by \(0.15\text{ m}\) gives a final force of \(200(0.15)=30\text{ N}\). The incorrect constant-force calculation would be \(30(0.15)=4.5\text{ J}\). But the force rises from \(0\text{ N}\) to \(30\text{ N}\), so its average over this linear increase is \(15\text{ N}\). The correct work is \(15(0.15)=2.25\text{ J}\), matching the integral. The integral accounts for the changing force; the final force alone does not.
A Reliable Setup
Record \(L_0\) and \(k\), with consistent units.
For each endpoint, calculate \(x=L-L_0\); do not use the length itself as the displacement.
For a quasistatic move from \(a\) to \(b\), use \(W_{\text{external}}=\int_a^b kx\,dx\).
Verify the bounds, sign, force antiderivative, and units of joules.
This method applies to an ideal Hooke-law spring over a displacement range where the linear force model is valid. If a problem instead asks for the work done by the spring, reverse the sign. If the motion is not quasistatic or the model does not specify that the applied force balances the spring force, the work of the actual applied force cannot be determined from Hooke’s law alone.
Check Your Understanding
Use signed displacement measured from natural length, and state whether each requested work is external work or work by the spring.
- A spring has \(k=80\text{ N/m}\). What external work is required to stretch it from its natural length by \(0.10\text{ m}\)?
- A spring has \(k=300\text{ N/m}\). Find the external work to compress it quasistatically from \(x=0\) to \(x=-0.04\text{ m}\).
- A spring moves quasistatically from \(x=0.06\text{ m}\) to \(x=0.02\text{ m}\). Is the external work positive or negative? Explain using the force and direction of motion.
- Why is multiplying the final spring force by the full displacement generally not a valid work calculation?
- For a quasistatic change from \(x=a\) to \(x=b\), how is the spring’s work related to the external work?