Select Page

Linear fits are one of the most common types in physics. Let’s take a look at an example where the variable of interest is hidden in the slope, but not exactly equal to the slope.

## Example – Spring and Mass

Let’s imagine hanging a spring from a support, then adding masses to it.  We measure out each mass, calculate its weight, then we measure the stretch of the spring.

The model for this is Hooke’s Law,

$$F=k \Delta y\\$$

We could also put a mass on the spring and then measure the period of its oscillations.

The model for this is T = 2 pi times the square root of the mass over the spring constant.

$$T = 2 \pi \sqrt{\dfrac{m}{k}}\\$$

In each case we plot our findings out on a graph. Note that Hooke’s Law is linear the way it is written. The period equation is not. We would use a power fit for this equation.

## Force and Mass

Let’s look at the force and the mass. Notice where the variables are…

Since we picked the mass that caused the force, we placed the force on the independent axis. The displacement is the result that we measured, so it went on the dependent axis.

The data turns out to look fairly linear, so we add a linear trendline of the form

$$y = m x + b\\$$

This looks like a linear equation, but notice that the displacement is on the y axis and the force is on the x axis. We place these in the slope-intercept in the right spots.

$$\Delta y = (\mathrm{slope}) F + B\\$$

Notice that m is the slope, not the mass. That’s why I’ve written (slope) rather than m.

The intercept doesn’t show up explicitly in our model. That means that it should be close to zero. The fact that it isn’t quite there tells us that we might need to tweak our model.

Now we’re ready to do some fitting…

We start out with our modified Hooke’s law.

$$\Delta y = \dfrac{1}{k} F\\$$

Comparing this to the trendline, we see that the spot with the slope has 1/k. This leads us to the result that the slope is equal to one over k.

$$(\mathrm{slope}) = \dfrac{1}{k}\\$$

Solving for the spring constant gives us

$$k = \dfrac{1}{(\mathrm{slope})} = \dfrac{1}{0.0414 \frac{\mathrm{m}}{\mathrm{N}}} \\$$

Putting it into our calculator and flipping the units into the numerator gives us the final result…

$$k = 24.15 \dfrac{\mathrm{N}}{\mathrm{m}}\\$$

This likely has too many significant digits, but we can fix that later.

## Don’t Be That Student

We can now see that the slope in this situation wasn’t the answer we were looking for.  Many students do this lab and find that their “slope” of 0.0414 m/N is 99.8 percent off of the answer of 25.0 N/m that they were expecting.

They just report this, not realizing that the units of the slope aren’t correct.  They also don’t ask for assistance for this large error.

Don’t be that student.  Always check your model to make sure it matches your trendline.  Also make sure that your results have the right units. Ask for help if you have a large percent error.