Tutorials › Calculus I › Spring Work Under Hooke’s Law

Work and Geometric Applications · Tutorial 1312 of 1495

Spring Work Under Hooke's Law

Model a spring’s force with Hooke’s law and integrate it to find the work required to move the spring between specified lengths.

Advanced 10 min read

What You'll Learn

  • Define displacement from a spring’s natural length and distinguish applied force from spring force.
  • Set up a work integral for stretching or compressing a spring under Hooke’s law.
  • Calculate work when the initial and final lengths lie on either side of the natural length.
  • Interpret the sign and units of spring work.
  • Identify why using the final force as a constant gives an incorrect result.

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.

Definition: Hooke’s law models the spring’s force along its axis as \(F_{\text{spring}}=-kx\), where \(k>0\) is the spring constant and \(x\) is signed displacement from the natural length. The minus sign means the spring force points toward the 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.

Theorem: For an ideal spring obeying Hooke’s law, the work done by a quasistatic applied force in moving the spring from displacement \(a\) to displacement \(b\) is
$$ W_{\text{external}} = \int_a^b kx\,dx = \frac{1}{2}k\left(b^2-a^2\right). $$

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

$$ W_{\text{external}} = \frac{1}{2}k\left((L_2-L_0)^2-(L_1-L_0)^2\right). $$

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:

$$ W_{\text{external}} = \lim_{\max \Delta x_i\to 0} \sum_i kx_i^*\Delta x_i = \int_a^b kx\,dx. $$

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

$$ \int_a^b kx\,dx = \left[\frac{1}{2}kx^2\right]_a^b = \frac{1}{2}kb^2-\frac{1}{2}ka^2 = \frac{1}{2}k(b^2-a^2). $$

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:

$$ a=0.25-0.25=0\text{ m}, \qquad b=0.40-0.25=0.15\text{ m}. $$

The applied force is \(F_{\text{external}}=kx=200x\) newtons. Set up the work integral and evaluate it:

$$ \begin{aligned} W_{\text{external}} &=\int_0^{0.15}200x\,dx\\ &=\left[100x^2\right]_0^{0.15}\\ &=100(0.15)^2-100(0)^2\\ &=100(0.0225)\\ &=2.25\text{ J}. \end{aligned} $$

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:

$$ a=0.30-0.30=0\text{ m}, \qquad b=0.22-0.30=-0.08\text{ m}. $$

Use the signed displacement bounds in the integral:

$$ \begin{aligned} W_{\text{external}} &=\int_0^{-0.08}500x\,dx\\ &=\left[250x^2\right]_0^{-0.08}\\ &=250(-0.08)^2-250(0)^2\\ &=250(0.0064)\\ &=1.6\text{ J}. \end{aligned} $$

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:

$$ a=0.28-0.30=-0.02\text{ m}, \qquad b=0.35-0.30=0.05\text{ m}. $$

The spring begins compressed and ends stretched. Applying the work formula:

$$ \begin{aligned} W_{\text{external}} &=\int_{-0.02}^{0.05}400x\,dx\\ &=\left[200x^2\right]_{-0.02}^{0.05}\\ &=200(0.05)^2-200(-0.02)^2\\ &=200(0.0025)-200(0.0004)\\ &=0.50-0.08\\ &=0.42\text{ J}. \end{aligned} $$

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.

Common mistake: Treating the spring’s final force as if it acted over the entire displacement. For a spring stretched from its natural length, the force starts at zero and increases, so it is not constant.

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

1
Identify the natural length and spring constant.
Record \(L_0\) and \(k\), with consistent units.
2
Convert lengths to signed displacements.
For each endpoint, calculate \(x=L-L_0\); do not use the length itself as the displacement.
3
Integrate the applied force.
For a quasistatic move from \(a\) to \(b\), use \(W_{\text{external}}=\int_a^b kx\,dx\).
4
Check the result.
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.

  1. 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}\)?
  2. 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}\).
  3. 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.
  4. Why is multiplying the final spring force by the full displacement generally not a valid work calculation?
  5. For a quasistatic change from \(x=a\) to \(x=b\), how is the spring’s work related to the external work?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon