- Orbital mechanics
- First-order kinetics · coming soon
- Radians
Six measurements, many different answers
A student measures the count rate of a radioactive sample every 2 minutes, in counts per minute. Here are the readings. (The data are invented, but real counts scatter in exactly this way.)
| / minutes | 0 | 2 | 4 | 6 | 8 | 10 |
|---|---|---|---|---|---|---|
| / counts per minute | 826 | 690 | 566 | 488 | 402 | 345 |
The last lecture found the decay constant from two measurements. So choose two. The readings at 0 and 2 minutes give a half-life of about 7.7 minutes. The readings at 2 and 4 minutes give 7.0 minutes. The readings at 4 and 6 minutes give 9.4 minutes. Every pair gives a different answer. Which one is right?
None of them is right on its own. Each count has a small random error, and two points carry the error straight into the answer. There is a second, deeper problem. Two points fit every smooth model. A straight line, a parabola and an exponential can all be drawn through any two points. So two points can never test whether the data are exponential at all.
This lecture solves both problems with one idea. It changes the graph until the exponential curve becomes a straight line. Then a ruler does two jobs. It tests the model, and it uses all six points at once.
The eye can test only one shape
Look at the top graph in the figure below. The points fall along a curve. It could be exponential. It could also be part of a parabola, or a curve like . Over a short range, curves of different kinds look very alike.
The eye is very good at one test, though: whether points lie on a straight line. A ruler shows any bend at once. So if we suspect a law, we plot the data in a way that makes that law a straight line. Then the ruler tests it.
Logarithms turn multiplying into adding
Here is the reason a logarithm straightens an exponential. Start with the model from the first lecture of this topic, . Its key property is that equal steps in multiply by equal factors. Each step of 1 in multiplies by .
A straight line behaves differently. Equal steps in add equal amounts to the height. So we need something that turns "multiply by " into "add a fixed amount". The first law of logarithms does exactly that. The logarithm of a product is the sum of the logarithms:
This means that each time is multiplied by , goes up by the same amount, . Equal steps in now add equal amounts to . So the graph of against is a straight line, and its gradient is .
That is it. That is the whole idea. A logarithm turns a law that multiplies into a law that adds, and a law that adds is a straight line.
The algebra says the same thing. Take of both sides of . Use the first law, then the third law, which brings the power to the front:
Compare it with . Here is and is just . The gradient is , and the intercept is .
If , then .
So the graph of against is a straight line with gradient and intercept . Then and .
If the points do not lie on a straight line, the data do not follow .
With e, the gradient is k itself
The last lecture wrote its model as , and found from two measurements. Now we can straighten the same model, and use every measurement. Take the natural logarithm of both sides:
The step is the identity from the lecture on . So the graph of against is a straight line. Its gradient is itself, and its intercept is .
This is why scientists use ln for exponential data. The gradient is the decay constant, with nothing to convert. You can use instead. The points still lie on a line, so the test still works. But the gradient is then , which is , from the change of base rule. You would have to multiply it by to get back.
Now return to the six counts. The bottom graph of the figure plots against . The points lie close to one straight line, so the exponential model fits. Draw the line through the middle of the points, with some above and some below. Read two points from the line, far apart: and . Then
The intercept gives counts per minute. The half-life is minutes. This answer uses all six readings, so their random errors partly cancel. The two-point answers ranged from 7.0 to 9.4 minutes. The line gives one answer that every point has helped to decide.
A logarithm needs a pure number
There is a detail in the axis label of the figure: ln( / counts per minute). A logarithm answers the question "e to the power of what gives this number?" That question needs a pure number. So we divide the measurement by its unit first, and take the logarithm of the number that is left.
The choice of unit does not change the gradient. Suppose you measured in counts per second instead. Every value would be divided by 60. Then every would fall by , because the logarithm of a quotient is the difference of the logarithms. The whole line moves down by the same amount. Its gradient stays the same. So the decay constant does not depend on the unit of , and only the intercept changes.
Try the test yourself in the graph builder below. Each data set has six points. Plot each one in three ways, and see which way gives a straight line.
Choose a data set, then choose how to plot it. The dashed line joins the first and last points. Watch whether the other points sit on it.
The three data sets are: A, = 1, 2, 3, 4, 5, 6 and = 4.0, 6.4, 10.24, 16.38, 26.21, 41.94. B, the same and = 3.0, 8.49, 15.59, 24.0, 33.54, 44.09. C, = 5, 10, 15, 20, 25, 30 and = 70.0, 55.71, 45.51, 38.22, 33.02, 29.3.
The table shows how far the middle points bend away from the line through the first and last points, as a percentage of the vertical range. Zero means a straight line.
| Set | against | against | against |
|---|---|---|---|
| A | 27% | 0% | 21% |
| B | 9% | 21% | 0% |
| C | 20% | 9% | 12% |
A is . B is . C is .
Each law is straight on exactly one kind of graph, or, for C, on none of them.
Data set A is straight only when you plot against , and the readouts recover . Data set B is straight on neither of those graphs. It is straight only on the third: against . Data set C is straight on none of the three. The next section explains B. The traps explain C.
Power laws need logarithms on both axes
Data set B follows a different kind of law, a power law, . Here the variable is not in the index. It is raised to a fixed power . This law has its own pattern. Multiply by 2, and is multiplied by every time, wherever you start. Equal factors in give equal factors in .
So this time both axes need the logarithm. Equal factors in become equal steps in . Equal factors in become equal steps in . Equal steps across and equal steps up make a straight line. The algebra agrees:
If , then .
So the graph of against is a straight line. Its gradient is the power itself, and its intercept is , so .
A graph with a logarithm on one axis only is often called a log-linear graph. A graph with logarithms on both axes is a log–log graph. Notice one difference between the two boxes. On a log–log graph the gradient is the power, with nothing to undo. On a log-linear graph the gradient is , so you must undo the logarithm to find .
The data follow . A student plots against . Will the points lie on a straight line?
Show the answer
No. Here . This is a straight line against , not against . Against , the graph rises steeply at first and then flattens, because grows more and more slowly. The rule is about where the variable sits. A variable in the index needs against . A variable raised to a fixed power needs against .
Practise that rule on the cards below. For each law, choose the graph that makes it straight.
Tap a law, then tap the graph that turns it into a straight line. First ask where the variable sits. Read the reason under each card.
Eight laws, each sorted by the graph that makes it straight, with the reason.
| Law | Straight graph | Reason |
|---|---|---|
| y = 5 × 2ˣ | log y against x | x is in the index: log₁₀ y = log₁₀ 5 + x log₁₀ 2. |
| N = 300e^(−0.2t) | log y against x | t is in the index: ln N = ln 300 − 0.2t, gradient −0.2. |
| P = 1000 × 1.05ⁿ | log y against x | n is in the index: log₁₀ P = 3 + n log₁₀ 1.05. |
| A = πr² | log y against log x | r is raised to the fixed power 2: gradient 2, intercept log₁₀ π. |
| T = 2.0√L | log y against log x | √L = L^0.5, so the gradient is 0.5. |
| F = 36 ÷ d² | log y against log x | 36 ÷ d² = 36d⁻², so the gradient is −2. |
| y = 2ˣ + 10 | Neither | The added 10 stops log y from splitting into a sum. Take it away first. |
| y = x² + 3x | Neither | A sum of two powers is not one power of x. |
Log scales: paper that takes the logarithm for you
On a logarithmic scale, the distance along the axis is proportional to the logarithm of the number. So 1, 10, 100 and 1000 are equally spaced, and 2 sits 0.301 of the way from 1 to 10, because . You plot the raw value, and the scale does the logarithm. Graph paper with one such scale (semi-log paper) straightens exponentials. Paper with two (log–log paper) straightens power laws. The "log scale" option on a computer graph is the same idea. Read each equal step on such an axis as "multiply by the same factor".
Worked examples
Test whether these data follow . If they do, find and .
| 1 | 2 | 3 | 4 | |
|---|---|---|---|---|
| 3.1 | 9.4 | 28.0 | 85.0 | |
| 0.4914 | 0.9731 | 1.4472 | 1.9294 |
Think first. A law of the form has the variable in the index. So plot against .
The rises from one point to the next are 0.482, 0.474 and 0.482. They are almost equal, so the points lie close to a straight line. The model fits.
Gradient, from the first and last points: . So .
Intercept: the line passes through with gradient 0.4794, so at it is at . So .
The model is , which is close to .
Check. At , the model gives , against the measured 28.0. ✓ With real data, use a line drawn through the middle of all the points, not just the end points. Here that line gives almost the same values, and .
Find the law that fits these data.
| 2 | 4 | 8 | 16 | |
|---|---|---|---|---|
| 5.66 | 16.0 | 45.3 | 128 | |
| 0.301 | 0.602 | 0.903 | 1.204 | |
| 0.753 | 1.204 | 1.656 | 2.107 |
Think first. The values double each time. Look at : it is multiplied by about 2.83 each time. Equal factors give equal factors, which is the sign of a power law. So plot against .
Gradient: . So .
Intercept: at , . So .
The law is , which is .
Check. At , . ✓ And , the factor seen in the table. ✓
The table gives each planet's average distance from the Sun and its orbital period , from NASA's Planetary Fact Sheet. Find the law that links and .
| Planet | / million km | / days | ||
|---|---|---|---|---|
| Mercury | 57.9 | 88.0 | 1.763 | 1.944 |
| Venus | 108.2 | 224.7 | 2.034 | 2.352 |
| Earth | 149.6 | 365.2 | 2.175 | 2.563 |
| Mars | 228.0 | 687.0 | 2.358 | 2.837 |
| Jupiter | 778.5 | 4331 | 2.891 | 3.637 |
| Saturn | 1432.0 | 10 747 | 3.156 | 4.031 |
Think first. There is no obvious factor here, and the values cover a wide range. A log–log graph tests for a power law, and it also squeezes a wide range onto one page.
The six points lie on a straight line. Gradient, from Mercury and Saturn: .
So . Square both sides: . The square of the period is proportional to the cube of the distance.
Check. Jupiter is about 5.20 times as far from the Sun as Earth. The law predicts a period times as long, which is about 4340 days. NASA gives 4331 days. ✓
Johannes Kepler found this law in 1618 and published it in 1619, in his book Harmonices Mundi. He wrote it in the language of his time: the ratio of two periods is "one and a half times" the ratio of the distances. That phrase meant a power of 1.5, which is the gradient of our line. Kepler worked with tables of numbers, and graphs like this one came into use much later. But logarithms were new. John Napier had published the first tables in 1614, and Kepler first saw them towards the end of 1616. He was so impressed that he later wrote his own book on them. Some historians think logarithms helped him to see the pattern. That remains a guess, but it is a reasonable one.
A graph of against is a straight line through and , where is a population in thousands and is in years. Find the model, and the population after 12 years.
Think first. A straight line of against means . The gradient is and the intercept is .
Gradient: per year. Intercept: , so .
The model is , with in thousands. After 12 years, , so about 330 000 people.
Check. Read the line itself at : , and . ✓ The data stop at 5 years, so this prediction trusts the line to stay straight. The population is invented.
Three traps
On a log graph, the intercept is or , not . In Worked Example 1 the intercept is 0.0120, but is . Always undo the logarithm at the end, with the same base you used.
For , the gradient of against is . A gradient of 0.4794 means , not 0.48. Only on a log–log graph is the gradient the answer itself, the power . With against , the gradient is , which is the number the model uses.
Data set C was the cooling drink from the last lecture, . Neither log graph is straight, because of the added 20. The part that decays exponentially is the gap above room temperature, . Plot against instead, and the line is straight. When a constant is added, take it away first.
Work each one on paper first. Open a hint only when you are stuck.
-
These data are thought to follow . Use to test this, and find and .
0 1 2 3 5.0 7.5 11.3 16.9 Hint 1
Work out for each point, and look at the rise from one point to the next.
Hint 2
The point at is the intercept itself. The gradient is .
Full answer
= 0.6990, 0.8751, 1.0531, 1.2279. The rises are 0.176, 0.178 and 0.175, almost equal, so the points lie close to a straight line and the model fits. Gradient , so . Intercept , so . The law is . Check: , which rounds to the measured 11.3. ✓
-
A graph of against is a straight line through and , with in minutes. Find , and the half-life.
Hint 1
The line means , with gradient and intercept .
Hint 2
. The half-life is , from the last lecture.
Full answer
per minute. . Half-life minutes. Check: after 20 minutes, the model gives , and , the second point on the line. ✓
-
The light from a small lamp is measured at different distances (in m). A graph of (intensity / W m⁻²) against / m) is a straight line through and . Find the law, and predict at 3.0 m.
Hint 1
A straight log–log graph means a power law, . The gradient is .
Hint 2
The intercept 2.6 is , so .
Full answer
Gradient . . So , an inverse square law. At 3.0 m, W m⁻². Check: , and the line gives . Then . ✓ (The lamp and its readings are invented.)
-
A drink cools in a room at 20 °C. Its temperature is measured every 5 minutes: 90, 70, 55.7, 45.5 and 38.2 °C at = 0, 5, 10, 15 and 20 minutes. Show that against is not straight, but against is. Find , and the time at which the drink reaches 30 °C.
Hint 1
Work out the gradient between each pair of neighbouring points on each graph. A straight line has equal gradients.
Hint 2
The model is . For 30 °C, the gap is 10, so solve .
Full answer
= 4.500, 4.248, 4.020, 3.818, 3.643. The gradients between neighbours are −0.050, −0.046, −0.040, −0.035. They change steadily, so the graph is a curve. = 4.248, 3.912, 3.575, 3.239, 2.901. The gradients are all −0.067, so this graph is straight. So per minute, and the intercept 4.248 gives at . ✓ For 30 °C: , so minutes. Check: . ✓ This keeps the last lecture's model, , and confirms it from the data.
This lecture is one example of a method used across science: change what you plot until the law becomes a straight line. Logarithms straighten exponentials and power laws. Plotting against or straightens other laws. A straight line is the one shape we can test by eye, measure exactly and extend with confidence.
Software now fits curves directly, but the thinking is the one in this lecture, and so is the warning. A straight line shows that a law fits the range you measured. Beyond that range, it is a prediction, not a fact.
- A logarithm turns multiplying by a fixed factor into adding a fixed amount, and that turns some curves into straight lines.
- For , the graph of against is straight, with gradient and intercept .
- For , the graph of against is straight, with gradient and intercept .
- For , the graph of against is straight, with gradient and intercept .
- A line drawn through all the points tests the model and gives better estimates than any two points alone.
- Undo the logarithm at the end, and take away any added constant before you take the logarithm.