LabRefCh10 Power Law and Log
LabRefCh10 Power Law and Log
LabRefCh10 Power Law and Log
Although many relationships in nature are linear, some of the most interesting
relationships are not. Power-law dependences, of the form
y ( x) = kx n
(10.1)
are particularly common. In many cases, we might suspect that two experimental variables are
related by a power-law relationship, but are unsure of what k or n are. For example, we might
suspect that the period T of a simple harmonic oscillator might depend on the mass m of the
oscillating object in some kind of power-law relationship, but we might be unsure of exactly
what the values of either n or k. If we knew n, then we could plot y vs. xn to get a straight line;
the slope of that line would then be k. But if we dont know n, it would seem at first glance that
the best we could do would be simply try different possible values of n to see what works. This
could get old fast.
We can, however, take advantage of the properties of logarithms to convert any
relationship of the type given by equation 10.1 into a linear relationship, even if we do not know
either k or n! The most basic property of logarithms (for any base, but lets assume base-ten
logs) is that
10.2a)
( )
n
(10.2b)
(This is actually true even for non-integer n.) Also, in the case of base-ten logarithms, this
means that
( )
(10.2c)
which shows that raising 10 to a power is the inverse operation to taking the (base-ten) log.
100
With this in mind, let us take the (base-ten) logarithm of both sides of equation 10.1 and
use the properties described by equation 10.2. If we do this we get
( )
( )
(10.3)
Now define log x u and log y v . Substituting these into 10.3 and rearranging, we get
v = nu + log k
(10.4)
Now, this is the equation of a straight line. This means that if we graph v vs. u (that is, log y vs.
log x), we should end up with a straight line, even if we do not know what n and k are.
Furthermore,the slope of this line is the unknown exponent n in equation 10.1. We can
therefore find the value of n by calculating the slope in the usual way. That is,
n=
v v2 v1 log y2 log y1
=
=
u u 2 u1 log x2 log x1
(10.5)
The value of the intercept (which is the value of v = log y when u = log x = 0 ) is log k , so if we
can find the intercept and its uncertainty, we can find k and its uncertainty.
In summary, we can take any relationship of the form given in equation 10.1, take the
logarithm of both sides, and convert it to a linear relationship whose slope and intercept are
related to the unknown values of n and k. This is, therefore, a very powerful way of learning
about unknown power-law relationships (and displaying them). A graph that plots log y versus
log x in order to linearize a power-law relationship is called a log-log graph.
10.2 AN EXAMPLE OF A LOG-LOG GRAPH
Period (sec)
2.42
3.76
4.75
5.52
5.87
Table 10.2
log(Mass)
-0.903
-0.488
-0.280
-0.140
-0.084
log(Period)
0.384
0.575
0.677
0.742
0.769
101
log(Period)
Period (sec)
0
0
0.2
0.4
0.6
0.8
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-1
Mass (kg)
-0.8
-0.6
-0.4
-0.2
log(Mass)
We can see that the graph of the period vs. the mass does not yield a very good straight
line; if the uncertainties are smaller than the dots representing the data points, we would have to
say that a straight line is inconsistent with the data. On the other hand the plot of log T vs. log M
is a very nice straight line, suggesting that the period T and the mass M have a power-law
relationship.
What are n and k according to this experiment? We can easily get a quick estimate from
the graph. For the sake of round numbers, consider the points marked with squares in Figure
10.2. The slope of this graph (rise over run) is thus
n=
log T2 log T1
0.72 0.43
=
= 0.48
log M 2 log M 1 0.80 0.20
(10.6)
The two points that you choose to compute the slope need not correspond to actual data points:
simply choose convenient points on your drawn line near the ends of the line. I chose the points
so that the denominator of the expression above would be simple. Since exponents in physical
situations are most often integers or simple fractions, we might guess that the actual value of n is
. (This turns out to be the theoretical value as well, as we will see chapter N12 in the class
text.)
The intercept is the place where the line crosses the log M = 0 grid line. According to the
graph, this is roughly where log T = 0.82 (note that the log M = 0 line is the right edge of the
graph here, not the left!). So the intercept is 0.82 = log k, which means that
k = 100.82 = 6.6 s/kg1/2.
102
(10.7)
where in this expression we are considering and to be the unitless parts of T and M
respectively. The intercept is the point where the line crosses the vertical grid line corresponding
to log = 0: we see from the graph that log has the value log 0 = 0.82 there. Therefore
equation 10.7 implies that
log 0 + log(sec) = n 0 + n log(kg ) + log k log k = log 0 + log(sec) n log(kg)
(10.8)
When we take the antilog of (that is, 10 to the power of) both sides of this, all the items in logs
get multiplied together, so we get (assuming that n is really 1/2):
k=
(10.9)
Keeping track of these unit terms when working with logarithms involves a lot of work,
however, and less often pays off the way that keeping track of units in normal equations does.
Therefore, people generally ignore the units associated with logarithmic quantities, and fill in the
units of quantities after taking the antilog (as we did with k in the last section) to make them
103
consistent across the master equation 10.1. But if you ever get confused about units and want to
make sure that things work out correctly, this is how to do it.
10.4 A PROCEDURE FOR EXPLORING POWER-LAW RELATIONSHIPS
Log-log graphs are most useful when you suspect your data has a power-law dependence
and you want to test your suspicion. Sometimes your suspicion is based on a theoretical
prediction, sometimes a previous low-level Cartesian plot. Figures 10.3(a) through 10.5(a) are
typical Cartesian graphs that could be power laws. Whatever the source of your suspicion, your
next step is to plot the logarithms of your data as a low-level graph. If this graph looks like a
pretty good straight line (within your experimental uncertainties) you can proceed to the next
steps.
y=x^a, a > 1
y=x^a, a > 1
40
40
2.5
30
30
20
20
10
10
2
1.5
1
0.5
0
6
x
Fig. 10.3(a)
10
Fig. 10.3(b)
10
10
Fig. 10.3(c)
Once you have plotted the points, you should use a ruler to draw the straight line that you
think best fits your data. You can then use this line to estimate the slope n using equation 10.6.
You can also estimate the value of the constant k in equation 10.1 by extrapolating your straight
line back to the vertical grid line where the value of the independent variable (lets call it x) is
equal to 1 (and thus log x = 0 ): the value of log k is the vertical scale reading where your best fit
line crosses this vertical grid line where log x = 0 . Note that this vertical line may not correspond
to the left edge of your graph! In Figure 10.2, for example, it happens to be at the right edge of
the graph, and on a general log-log graph, it could be almost anywhere. (If the line log x = 0 is
off the edge of your graph, you can often bring it onto the graph by changing the units of x. For
example, if x is a distance ranging from 20 cm to 200 cm, the place where log x = 0 is when x =
1 cm, which will probably be off the left side of your graph. But if we change the units of x to
meters, then the place where log x = 0 is where x = 1 m, which is right in the middle of your
data.)
To estimate the uncertainties of these quantities, draw a new line with the largest slope
that you think might be consistent with your data, and another line with the smallest slope
consistent with your data, and find the slope and intercept for each of these lines. The greatest
and least slope will then bracket the uncertainty range of n and you can use the greatest and least
values of log k determine the greatest and least values of k, which bracket the uncertainty range
of k.
104
To go further than crude estimates, one needs the help of a computer. The program
LinReg, which is discussed in Chapter 8 of this manual, makes it very easy to plot log-log graphs
and find the best-fit slope (with its uncertainty) and the best-fit intercept (and its uncertainty).
EXERCISES
Exercise 10.1
The table below gives the orbital periods T (in years) of the planets known to Newton as a
function of their mean distance R from the sun in AUs (where 1 AU = the earths mean orbital
radius). Plot a log-log graph of the period versus the distance on the graph paper provided as
Figure 10.6 on the next page.
Table 10.3: Planetary Periods vs. Mean Orbital Distances
Planet
Distance (AU)
Period (yr)
Mercury
0.39
0.24
Venus
0.72
0.62
Earth
1.00
1.00
Mars
1.52
1.88
Jupiter
5.20
11.86
Saturn
9.54
29.46
log(Distance)
log(Period)
Exercise 10.2
Assuming that the period and distance are related by a power-law of the form T = kR n , where n
is an integer or simple fraction, what does your graph suggest is the likely value of n?
Exercise 10.3
Find the value of k (with appropriate units) for the data of Table 10.3 from the intercept of your
log-log graph. Combine this with the result of exercise 10.1 to find the power-law equation (of
the type given in equation 10.1) that seems to fit this data.
Figure 10.6
105
106
If you have more than five or ten data points, calculating the logarithms quickly gets
tedious even with a calculator. To reduce this tedium (which would have been particularly
gruesome in the era before computers and calculators), someone invented a special kind of graph
paper called log-log paper. In effect, this kind of graph paper calculates the logarithms for you.
Imagine that you have data for an independent variable x that ranges from, say, 0.01 m to
about 10 m. The values of log x would then range from about 2.0 to 1.0, and a useful horizontal
scale might look something like this:
log x
-2.0
-1.5
-1.0
-0.5
0.0
0.5
Now, imagine that we were to also draw a scale immediately above this scale that showed the
corresponding values of x. The two scales together would look like this:
0.01 0.02
0.05
0.1
0.2
0.5
1.0
2.0
5.0
10.0
x
log x
-2.0
-1.5
-1.0
-0.5
0.0
0.5
(Note how the pattern of the spacing between marks on the upper scale is identical for each
power of 10.) Now, note that if we had graph paper that had its axes pre-labeled as shown in the
upper scale, then we could locate points on the plot directly according to their value of x rather
than having to compute the value of log x for each data point.
The way that the pattern repeats for each power of 10 makes it possible to create general
and flexible graph paper with essentially pre-labeled scales. You can repeat the pattern as
frequently as necessary in each coordinate to cover the range of your data. The graph paper for
Exercise 10.4 is an example of log-log paper which has 3 cycles of the pattern horizontally and
vertically, making it possible to display data points whose x and/or y values span up to three
powers of ten or decades. If you compare this graph paper to the double-axis shown above, you
will see that only the equivalent of x scale is displayed on this paper: the log x scale has been
suppressed for the sake of clarity, but should be considered implicit. Also you will note that the
publishers of the graph paper do not commit you to particular powers of 10: each decade is
labeled as if it spans from 1 to 10. You can cross out the numbers shown to adapt the graph paper
to the particular ranges of your data points. Figure 10.7 shows how you would do this for the
harmonic oscillator data given in Table 10.1.
The point is that with just a little relabeling you can use graph paper like this to construct
quickly a log-log graph without having to do any actual calculations of logarithms. This is great
for doing low-level, quickie graphs of a set of data that you think might reflect a power-law
107
relation y = kx n . You can even read the value of k directly from the graph by finding the point
where your best-fit line crosses the vertical line corresponding to x = 1 unit and reading the
vertical coordinate of this point according to the vertical axis.
But how can you compute the slope n of data drawn on such graph? Remember each axis
has an implicit linear scale that reflects the log of the value displayed. Linear means that the
change in the value of log x or log y is proportional to the physical distance on the sheet of
paper. So to find the slope, all that you have to do is measure the rise of your line (in cm on the
sheet of paper!) and divide by the run (in cm).
Using log-log paper is optional in this course; normally you will be able to use a
computer program. But you can purchase sheets of log-log paper from Connie (the department
secretary) for 10 per page if you would like to use it for quick low-level graphing.
Figure 10.7: A log-log plot of the harmonic oscillator data in Table 10.1. Notice that the paper
has only one decade in each coordinate to match the range of the data.
10.0
Time(sec)
1.0
0.10
Mass (kg)
1.00
108