Physics Lab: Hooke’s Law and the Pendulum — Data Table, Uncertainties, Graph and Error Analysis (7 Exercises)
This week in physics lab, we have to find the spring constant k of a spring from a graph, and some teams do a simple pendulum instead to measure g. The lab itself isn't hard; what costs points is the report: units, uncertainties, significant figures, the graph and the error analysis. Here are my study notes, with a complete example from start to finish and 7 solved exercises.
Topics: Hooke's law, linearization, slope of a graph, simple pendulum, absolute uncertainties, significant figures, maximum/minimum slope method, percent difference, error analysis
Formulas: \(F=kx\), \(m=\dfrac{k}{g}\,x\), \(T=2\pi\sqrt{\dfrac{L}{g}}\), \(g=9.81\ \text{m/s}^2\)
Table of Contents
- Theoretical background
- Procedure and instructions
- The data table and uncertainties
- The graph and calculating k
- The uncertainty on k: maximum and minimum slopes
- The pendulum: measuring g
- Error analysis: what effect on k?
- 7 solved exercises
- Lab report checklist
1. Theoretical background
Hooke's law
The force exerted by a spring is proportional to its stretch:
- \(F\): force (N)
- \(k\): spring constant (N/m). The larger k is, the stiffer the spring.
- \(x\): stretch, i.e. the stretched length minus the rest length (m)
Why plot m as a function of x?
At equilibrium, the weight of the hanging mass equals the spring force:
This is the equation of a straight line through the origin, of the form \(y=ax\), with \(y=m\), \(x=x\) and a slope \(a=k/g\). So:
This is the key idea of almost every CEGEP lab: rewrite the formula to get a straight line, then get the quantity you want from the slope.
2. Procedure and instructions
- Attach the rod to the stand near the edge of the table (never sticking out over the edge), with a folded mat under the setup.
- Hang the spring with no mass and line up the zero of the ruler with the bottom of the spring.
- Don't touch the spring or the ruler again for the whole series.
- Weigh each mass and record its actual value, instead of relying only on the label.
- Add the masses one by one (at least 5 values) and read the stretch at eye level, with the spring at rest.
- Repeat each measurement 3 times and calculate the average.
- Check that the spring stays vertical and returns to its initial length when the masses are removed.
Pendulum: time 10 oscillations, then divide by 10 to get the period T. Repeat for at least 5 lengths L, with a small release angle (less than 15°).
3. The data table and uncertainties
Each column heading shows the quantity, unit and uncertainty. The values below are a made-up example (for a spring of about 25 N/m) that shows the expected layout.
| Mass m (kg) ± 0.001 | Trial 1 x (cm) | Trial 2 x (cm) | Trial 3 x (cm) | Average x (cm) ± Δx |
|---|---|---|---|---|
| 0.050 | 2.0 | 1.9 | 2.0 | 2.0 ± 0.1 |
| 0.100 | 3.9 | 4.0 | 3.9 | 3.9 ± 0.1 |
| 0.150 | 5.9 | 5.9 | 5.9 | 5.9 ± 0.1 |
| 0.200 | 7.8 | 7.9 | 7.9 | 7.9 ± 0.1 |
| 0.250 | 9.8 | 9.8 | 9.9 | 9.8 ± 0.1 |
Rules to remember
- Instrument uncertainty: usually half of the smallest division (ruler in mm → ± 0.05 cm), or the value your teacher gives. Here we used ± 0.1 cm to account for how hard it is to read a spring.
- Uncertainty on the average: \(\Delta x=\dfrac{x_{max}-x_{min}}{2}\). For the 0.200 kg mass: \((7.9-7.8)/2=0.05\ \text{cm}\).
- Three identical trials? The uncertainty is not zero: keep the instrument uncertainty (the 0.150 kg row).
- Significant figures: the value stops at the same decimal place as its uncertainty. The exact average of 7.8, 7.9, 7.9 is 7.8667, but you write 7.9 ± 0.1, not 7.867 ± 0.1.
- SI units for calculations: convert g to kg and cm to m before plotting the graph.
4. The graph and calculating k
- Axes: stretch x (m) on the horizontal axis, mass m (kg) on the vertical axis, each with its quantity and unit.
- Title: "Hanging mass as a function of spring stretch".
- Points: each point with its error bars (± Δx horizontally, ± Δm vertically).
- Linear trend line (Excel: Add Trendline → Linear → Display Equation on chart). It should pass close to the origin.
With the data in metres, Excel gives \(m=2.55\,x-0.0005\). The y-intercept is almost zero, as the theory predicts. The slope is \(2.55\ \text{kg/m}\), so:
Unit check: \(\text{kg/m}\times\text{m/s}^2=\text{kg/s}^2=\text{N/m}\) ✓
5. The uncertainty on k: maximum and minimum slopes
Draw the steepest line and the least steep line that still pass through the error bars (dashed and dotted on the graph). In practice, run them through opposite corners of the uncertainty "boxes" of the first and last points.
- Max slope: from the bottom-right corner of the 1st point \((0.021,\ 0.049)\) to the top-left corner of the last \((0.097,\ 0.251)\): \(\dfrac{0.251-0.049}{0.097-0.021}=2.66\ \text{kg/m}\)
- Min slope: from the top-left corner of the 1st point \((0.019,\ 0.051)\) to the bottom-right corner of the last \((0.099,\ 0.249)\): \(\dfrac{0.249-0.051}{0.099-0.019}=2.48\ \text{kg/m}\)
Final result: \(k=(25.0\pm0.9)\ \text{N/m}\). The uncertainty has one significant figure, and the value stops at the same decimal place.
Percent difference, if your teacher gives a reference value:
6. The pendulum: measuring g
For small angles (less than 15°), the period depends only on the length of the string:
So plot \(T^2\) as a function of \(L\): it's a straight line with slope \(4\pi^2/g\), and \(g=\dfrac{4\pi^2}{\text{slope}}\). Careful: plotting T against L would give a curve, not a straight line!
| L (m) | Time for 10 oscillations (s) | T (s) | T² (s²) |
|---|---|---|---|
| 0.20 | 9.0 | 0.90 | 0.81 |
| 0.40 | 12.7 | 1.27 | 1.61 |
| 0.60 | 15.5 | 1.55 | 2.40 |
| 0.80 | 17.9 | 1.79 | 3.20 |
| 1.00 | 20.1 | 2.01 | 4.04 |
(Made-up data, for the example.)
Percent difference with 9.81 m/s²: \(\dfrac{|9.80-9.81|}{9.81}\times100\,\%=0.1\,\%\). Excellent!
Why 10 oscillations? Your reaction time on the stopwatch (about 0.2 s) happens only once at the start and once at the end. Dividing by 10 makes this error 10 times smaller on T.
7. Error analysis: what effect on k?
In the report, it's not enough to name a source of error: you must say whether it makes k larger or smaller, and suggest an improvement. The reasoning always goes through the slope \(m/x\).
| Source | Effect | Improvement |
|---|---|---|
| Ruler not parallel to the spring (tilted) | x reads too large → smaller slope → k underestimated | Check the vertical with a plumb line or a set square |
| Actual mass larger than the label (if using the label) | m used is too small → smaller slope → k underestimated | Weigh each mass on the balance |
| Ruler zero misaligned | Every x shifted by the same amount → the line moves, but the slope doesn't change: k unaffected. Clue: the line no longer passes through the origin. | Line up the zero before the series and don't touch the ruler again |
| Parallax, spring still oscillating | Random error: x too large or too small depending on the reading → scattered points, larger uncertainty | Read at eye level, wait until it's still, do 3 trials |
| Spring permanently deformed (mass too heavy) | The spring no longer returns to its initial length; the last points move away from the line | Stay below the elastic limit; check the return to zero |
| Pendulum: release angle too large (over 15°) | Actual T longer than the formula → larger slope → g underestimated | Measure the angle with a protractor, stay below 15° |
8. 7 solved exercises
Try each exercise before opening the solution.
Exercise 1 — Average and uncertainty
For one mass, three trials give x = 4.1 cm, 4.3 cm and 4.2 cm. Write the average with its uncertainty.
Show the solution
Average: \((4.1+4.3+4.2)/3=4.2\ \text{cm}\). Uncertainty: \((4.3-4.1)/2=0.1\ \text{cm}\).
Answer: x = 4.2 ± 0.1 cm, or 0.042 ± 0.001 m for calculations.
Exercise 2 — Significant figures
Correct how these results are written: a) 12.347 ± 0.05 cm b) 25.0128 ± 0.9 N/m c) 3.2 ± 0.25 s
Show the solution
- a) 12.35 ± 0.05 cm (the value stops at the hundredths, like the uncertainty).
- b) 25.0 ± 0.9 N/m.
- c) First round the uncertainty to one significant figure: 0.25 → 0.3. Then: 3.2 ± 0.3 s.
Exercise 3 — From the slope to k
A team gets a slope of 3.06 kg/m, with an uncertainty of 0.08 kg/m. Give k with its uncertainty.
Show the solution
Answer: k = (30.0 ± 0.8) N/m.
Exercise 4 — Percent difference
The manufacturer gives \(k_{ref}=26.0\ \text{N/m}\) for the spring in our example (\(k_{exp}=25.0\ \text{N/m}\)). Calculate the percent difference. Is the reference value inside the uncertainty range?
Show the solution
The experimental range is 24.1 to 25.9 N/m. The 26.0 N/m value is just outside it: there is probably a small systematic error (for example, a slightly tilted ruler, which underestimates k). That's a good lead to discuss in the analysis.
Exercise 5 — The cm trap
A student plots m (kg) as a function of x in cm and gets a slope of 0.0255. He writes k = 0.0255 × 9.81 = 0.25 N/m. What's wrong?
Show the solution
His slope is in kg/cm. To convert to kg/m, multiply by 100 (1 m = 100 cm): 0.0255 kg/cm = 2.55 kg/m.
So k = 2.55 × 9.81 = 25.0 N/m. A 0.25 N/m lab spring would be almost as floppy as a very thin rubber band: a strange order of magnitude should always make you check the units.
Exercise 6 — The misaligned zero
After the series, a team realizes the ruler's zero was 0.5 cm too high: every measured x is 0.5 cm too large. Do they have to redo the lab?
Show the solution
No! Every point is shifted to the right by the same amount. The line moves parallel to itself: its slope doesn't change, so k is correct. Only the y-intercept changes (the line no longer passes through the origin). The team mentions it in the error analysis, and that's exactly the advantage of using the slope rather than a single point.
Exercise 7 — The pendulum
A team measures 15.8 s for 10 oscillations with a 0.620 m string. Calculate T, then g from this single measurement. Why is it better to plot T² against L with several lengths?
Show the solution
\(T=15.8/10=1.58\ \text{s}\).
With a single measurement, any error in it goes straight into g. With a graph of several lengths, the trend line averages out the random errors, and a constant error (for example, on the string length) only affects the y-intercept, not the slope.
9. Lab report checklist
- ☐ Theoretical background with Hooke's law and the relation \(m=(k/g)\,x\)
- ☐ Table with units and uncertainties in the headings
- ☐ Three trials per mass and their average
- ☐ Significant figures consistent with the uncertainties
- ☐ Graph with a title, labelled axes, units and error bars
- ☐ Equation of the line and slope displayed
- ☐ Calculation of k with its uncertainty, in N/m
- ☐ Sources of error explained, with their effect on k and an improvement
- ☐ Conclusion that answers the objective: the final value of k
Keep Reviewing
- Centre of Mass and Moment of Inertia: 2 Class Exercises Solved Step by Step
- Exam 2 Mechanics Correction: Torque, a Beam and Cable, Friction
- Three Masses, Friction and Apparent Weight
StudyGroup AN — Mathematics, physics and chemistry exercises and solutions for CEGEP students.
Review: Yootak Hong, PhD

