Two Forces, Two Work Values
A spring can exert a force on an object while an external agent, such as a hand, also exerts a force on it. The work done by the spring and the work done by the external agent are different quantities. They can have opposite signs even though they describe the same motion.
For example, when a spring is stretched slowly from its equilibrium position, the external agent pulls in the direction of motion and does positive work. The spring pulls against the motion and does negative work. When the stretched spring is released and moves back toward equilibrium, those signs reverse: the spring does positive work, while an agent that restrains the spring does negative work.
To make these statements precise, let \(x\) denote the signed displacement from the spring’s equilibrium position, with positive \(x\) in the direction of stretching. Hooke’s law says that a spring with spring constant \(k>0\) exerts the force \(F_{\mathrm{s}}(x)=-kx\). Work over a displacement is found by integrating the force along the motion.
Work Done by the Spring
Suppose the spring moves from position \(x=a\) to position \(x=b\). In one dimension, the work done by a force \(F(x)\) over this displacement is \(\int_a^b F(x)\,dx\). Applying this definition to the spring force gives the spring’s work.
The sign depends on the change in the square of the displacement. Moving farther from equilibrium increases \(x^2\), so the spring does negative work. Moving toward equilibrium decreases \(x^2\), so the spring does positive work. The formula applies whether the spring is stretched (\(x>0\)) or compressed (\(x<0\)).
Work Done by a Slowly Applied External Force
Now suppose an external agent moves the spring slowly and in a controlled way. In the idealized slow-motion model, the agent adjusts its force so that it balances the spring force at each position. Thus \(F_{\mathrm{ext}}(x)=-F_{\mathrm{s}}(x)=kx\). This is the condition that allows the object to be moved without appreciable acceleration in the model.
Integrating the external force over the same displacement gives
The equality \(W_{\mathrm{ext}}=-W_{\mathrm{s}}\) requires the controlled-motion assumption: the external force balances the spring force throughout the displacement. It is not a claim that the work of every possible external force is always the negative of the spring’s work. If an object is accelerated, for example, the forces need not balance. The calculation here concerns slow, controlled stretching, compression, or return.
The quantity \(\frac12kx^2\) is the energy stored in the spring at displacement \(x\). The difference between its final and initial values is \(\frac12 k(b^2-a^2)\). In this controlled setting, the external agent’s work equals that change, while the spring’s work is its negative.
Why the Formulas Work
The derivation follows directly from the work definition and Hooke’s law. The spring force at each position is not constant: its magnitude depends on \(x\). Therefore, the work must account for the changing force over the whole interval, rather than multiplying one force value by the total displacement.
Hooke’s law gives \(F_{\mathrm{s}}(x)=-kx\). For slow, balanced motion, the external agent supplies \(F_{\mathrm{ext}}(x)=kx\).
For motion from \(a\) to \(b\), integrate each force with respect to \(x\) from \(a\) to \(b\).
The spring integral is \(-\frac12k(b^2-a^2)\), and the external-force integral is \(+\frac12k(b^2-a^2)\). They are opposites under the stated balance condition.
This also explains why direction matters. Work is signed: it is positive when a force acts in the direction of displacement and negative when it acts against the displacement. For spring work, the integral handles both the force direction and the displacement direction.
Signs for the Main Spring Motions
The following sign patterns assume slow, controlled motion by an external agent. The agent balances the spring force, so its work has the opposite sign to the spring’s work.
| Motion | Spring work | External work |
|---|---|---|
| Stretch from equilibrium to \(x>0\) | Negative | Positive |
| Compress from equilibrium to \(x<0\) | Negative | Positive |
| Release from a stretch and move toward \(x=0\) | Positive | Negative |
| Return from a compression and move toward \(x=0\) | Positive | Negative |
For compression, the displacement is negative, and the spring force points in the positive direction. Their opposing directions make spring work negative as the spring is compressed. The external agent pushes in the negative direction, along the displacement, so its work is positive. On a slow return from compression, the spring force and displacement are both positive, so the spring does positive work.
Worked Examples
Worked Example: Slowly Stretching a Spring
A spring has \(k=200\ \mathrm{N/m}\). Find the spring work and external work when it is stretched slowly from equilibrium to \(x=0.15\ \mathrm{m}\).
Here \(a=0\ \mathrm{m}\) and \(b=0.15\ \mathrm{m}\). The spring work is
The external agent balances the spring force throughout the slow stretch, so its work is the opposite:
Check: \(W_{\mathrm{s}}+W_{\mathrm{ext}}=-2.25\ \mathrm{J}+2.25\ \mathrm{J}=0\), as required by the balanced-motion model. The signs also match the directions: the spring opposes the stretch, and the external force acts with it.
Worked Example: Compressing a Spring
Let \(k=300\ \mathrm{N/m}\). Find the spring work and the external work for a slow compression from equilibrium to \(x=-0.10\ \mathrm{m}\).
Use \(a=0\ \mathrm{m}\) and \(b=-0.10\ \mathrm{m}\). Then
The external work is the opposite under slow, balanced compression:
Check the force directions at the compressed endpoint: \(F_{\mathrm{s}}=-kx=-300\ \mathrm{N/m}(-0.10\ \mathrm{m})=+30\ \mathrm{N}\), while the external force is \(-30\ \mathrm{N}\). During compression the displacement is negative. The spring force points against it, while the external force points with it, agreeing with the calculated signs.
Worked Example: Releasing a Stretched Spring
A spring with \(k=250\ \mathrm{N/m}\) is moved slowly from \(x=0.12\ \mathrm{m}\) back to equilibrium. Find the work done by the spring and by the restraining external agent.
Now \(a=0.12\ \mathrm{m}\) and \(b=0\ \mathrm{m}\). Therefore,
The external agent restrains the spring and moves it slowly, so \(W_{\mathrm{ext}}=-1.80\ \mathrm{J}\). Check: \(W_{\mathrm{s}}+W_{\mathrm{ext}}=1.80\ \mathrm{J}-1.80\ \mathrm{J}=0\). The spring force points toward equilibrium, along the return displacement, which confirms that spring work is positive.
A Common Mistake: Treating the Endpoint Force as Constant
Work for a variable force is not generally the endpoint force multiplied by the total displacement. Consider compressing a spring with \(k=400\ \mathrm{N/m}\) from equilibrium to \(x=-0.10\ \mathrm{m}\). At the endpoint, the spring force is \(F_{\mathrm{s}}=-kx=+40\ \mathrm{N}\). Using that endpoint force as if it acted throughout the compression produces this incorrect calculation:
The multiplication is dimensionally a work value, but the assumption is wrong: the spring force is not constantly \(+40\ \mathrm{N}\) over the interval. It varies from \(0\ \mathrm{N}\) to \(+40\ \mathrm{N}\). The correct calculation integrates that changing force:
The result is half the magnitude of the incorrect endpoint-force estimate because the force increases linearly from zero to its endpoint value. The integral, rather than a constant-force multiplication, is the appropriate method for this variable force.
Why the Distinction Matters
Asking “How much work is done?” is incomplete unless the force doing the work is identified. During a slow stretch, the external agent supplies energy to the spring, while the spring does negative work on the moving object. During a slow return, the spring does positive work, while the restraining agent does negative work. The same displacement interval can therefore be described by two different work values with opposite signs.
For any slow, controlled move from \(a\) to \(b\), calculate the spring work from the spring force and then take its negative for the external work. Keep the signed values of \(a\) and \(b\), use metres for displacement and \(\mathrm{N/m}\) for \(k\), and check that \((\mathrm{N/m})(\mathrm{m^2})=\mathrm{N\,m}=\mathrm{J}\). These steps keep the direction, physical agent, and units clear.
Check Your Understanding
For each question, assume the spring is moved slowly and the external agent balances its force throughout the motion.
- A spring is stretched from \(x=0\) to \(x=0.08\ \mathrm{m}\). Is the spring’s work positive or negative? Is the external work positive or negative?
- A spring is compressed from \(x=0\) to \(x=-0.06\ \mathrm{m}\). Which force does positive work?
- For motion from \(x=0.10\ \mathrm{m}\) to \(x=0.04\ \mathrm{m}\), is the spring moving toward or away from equilibrium, and what is the sign of its work?
- Why can the spring force at the endpoint not usually be multiplied by the full displacement to find work?
- For controlled motion from \(x=a\) to \(x=b\), state the relationship between the external work and spring work.