Linear graphs and linearization of curved graphs

Linear graphs and linearization of curved graphs
1. Straight-line graphs.
If the trend of the data is a straight line, then the graph is called linear.
y
b
0
y  ax  b
x
Here, there is a linear
relationship between y and x
y
y  ax
0
x
This one is a special type of linear
relationship between y and x, because b=0 so
the line passes through the origin (0,0).
Variable y is directly proportional to x.
(Here, doubling x will double y.)
Data from experiments will never lie exactly on a line, but it is usually clear to the eye if the
trend is linear or curved. If there is a linear relationship, the next step is usually to find (i) the
slope a and (ii) the y intercept b. These two quantities fully describe the line.
Guidelines for plotting the points
a. Each graph must have your name, and the date
b. The graph must have a title
c. “widgets versus gizmos” means widgets on the vertical axis and gizmos on the horizontal
axis
d. The axes must each be labeled with the name of the variable (eg. speed), the symbol for
the variable (eg. v), and the units of the variable (eg. m/s)
e. The scale of each axis must be chosen so that it’s easy to plot the points and to read off
the coordinates of points. Use only multiples of 2 or 5 to label the bold grid lines on the
graph paper. (eg. 8, 10, 12, 14,…, but not 8, 10.5, 13, 15.5,…)
f. The axes don’t have to start at zero; the range should start near the value of the first point
g. Use one side of graph paper for each graph. The range of values for each axis must be
selected so the data points use at least half of the extent of the axis.
h. The points must be tiny. Draw a circle around them to clarify where they are.
1
The best line:
To obtain the slope and y intercept, the best line must be drawn through the data. Although the
slope can be calculated from the data points (using the method of least-squares), it can be done
quite well by eye. Use a sufficiently long ruler and construct a single line that approximates the
trend of the data points as accurately as possible. A transparent ruler is best. Don’t pick up the
pencil. Note that the line need not touch any of the actual data points. Sometimes, a point lies so
far from the trend of the other points that it must be incorrect. This is called an outlier and should
be ignored in finding the best line. Think: since you use all the acceptable points to interpolate
the best line, it represents information “crystallized” from all the data.
The slope:
a. Select two new “slope points” on the best line. Indicate them by putting a square around
each and number them 1 and 2. They must not be data points.
b. The slope points must be near the ends of the best line – ie. far apart. Don’t select them
by looking for a point where the best line intersects with the grid lines
c. On the graph, label the slope points with their coordinates and units
d. The slope formula is:
a
y2  y1
x2  x1
e. Show the slope calculation (on the graph if possible) by first writing the above equation,
then substituting the slope-point coordinates with units, and only then giving the answer.
f. The slope will be wrong if you leave out the unit. This is a common mistake!
The y intercept:
After you have the calculated numerical value of the slope a (with its unit), you can calculate the
y intercept b of the point by solving the straight-line equation for b:
b  y  ax .
To evaluate the right-hand side, use the coordinates (x,y) of any point on the best line, and not a
data point.
Why do we never use the data points after the best line is found? The idea is that all the
information comes from the best line, which contains more information than any one data point.
2
2 Example: Linear plot
Height h
(meters)
.20
.40
.60
.80
1.00
1.20
1.40
1.60
1.80
2.00
Gravitational
potential energy U
(Joules)
.49
1.04
1.33
1.96
2.48
3.21
3.43
3.93
4.54
1.73
We will plot a graph of gravitational potential energy versus height. Then, we will find the slope
and the intercept.
3
4
3. Curved graphs
Often the plotted data will be curved. The eye can’t tell one type of curve from another just by
looking.
Y
X
For example, it could be one of …
𝑌 = 𝑘𝜃 𝑛 (power-law relationship)
Y  kecX (exponential relationship)
In the first equation, the plotted variables are Y and θ, and the other two quantities, k and n, are
constants. In the second equation, the plotted variables are Y and X, and the constants are k and c.
Also, recall that e is the base of the natural logarithm and has value 2.71828…
If the data is related by one of these curves, then the goal is to find the numerical values of the
constants k, n, or k, c. The technique used involves plotting a new graph that converts the data
into a straight line. The constants can then be found by calculating the slope and intercept of this
new best line. We consider each case below.
In the first equation, the variable θ is dimensionless, and so 𝜃 𝑛 is also dimensionless. It follows
that the units of Y and k must be identical. The second equation contains an exponential. The rule
for exponentials is that the input (cX) and the output are dimensionless. So, if X is in meters, then
c must have units of 1/m = 𝑚−1, and the units of Y and k are identical.
3.1 Power-law curves
Suppose the data has the form
𝑌 = 𝑘 𝜃𝑛 ,
where Y and k are dimensionless. The method involves taking the natural logarithm of both sides
of the equation:
𝑙𝑛(𝑌) = 𝑙𝑛(𝑘 𝜃 𝑛 )
Then, use the rules of logarithms to expand the right-hand side of this:
ln 𝑌 = ln 𝑘 + 𝑙𝑛(𝜃 𝑛 )
5
= 𝑛 𝑙𝑛 𝜃 + 𝑙𝑛 𝑘
So, we have the following relationship between the experimental variables X and Y:
[𝑙𝑛 𝑌] = 𝑛 [𝑙𝑛 𝜃] + 𝑙𝑛 𝑘.
Compare this with the equation of a straight line (written with parentheses for clarity):
[𝑦] = 𝑎 [𝑥] + 𝑏.
We line up and match the two variables and the two constants in these equations. A plot of [ln Y]
versus [ln θ] should be a straight line with slope equal to n and y intercept equal to ln(k). The
constants n and k that we would like to find can be obtained:
i) By comparing slopes, the power n can be found:
𝑛 = 𝑎.
ii) By comparing intercepts, we have 𝑙𝑛 𝑘 = 𝑏. If we exponentiate both sides (take the e to the
power of the left hand side and equate this with e to the power of the right-hand side), we
effectively solve for k and find:
𝑘 = 𝑒𝑏.
Since the linear graph was obtained by plotting the natural logarithm of Y versus the natural
logarithm of θ, this case is sometimes called a “log-log” plot.
3.2 Exponential curves
Suppose the data has the form
Y  kecX , or equivalently, Y  k exp(cX ) .
Let’s assume for simplicity that Y and k are dimensionless. The goal is again to find the constants
k and c from the experimental data, and the procedure is as before: take the natural logarithm of
both sides of this equation:
ln Y  ln( kecX )
Use the rules of logarithms to expand this into a form that resembles a straight-line equation:
ln Y  ln k  ln( e cX ),
ln Y  ln k  cX
Re-ordering the right-hand side, the experimental variables are related by
[ln Y ]  c[ X ]  ln k
Compare this to the equation for a straight line with a = slope and b= intercept:
[𝑦 ] = 𝑎 [𝑥 ] + 𝑏 .
A plot of lnY versus X will give a straight–line relationship from which the constants c and k can
be found as follows:
6
i)
ii)
c = a, the slope of the new plot
Using ln(k) = b, solve for k to get
k  eb
Since this plot involves the logarithm of the one variable but not of the other, it is sometimes
called a “semi-log” plot.
Note: For exponential and power-law curves, the first step is always the same:
Take the natural logarithm of both sides of the equation
3.3 Properties of the natural logarithm function
In mathematics, functions take a dimensionless numerical input and produce a dimensionless
numerical output. For example, the sine function takes an angle as input and produces a ratio (the
length of the side opposite to the angle divided by the length of the hypotenuse of a right-angled
triangle) as the output. The input to a function is often called the argument. So if we consider
sine (30 degrees) = 0.5, the angle 30 degrees is the argument of the sine function. The natural
logarithm function has a number of important properties that we will need to know by heart. In
the following, let 𝐴, 𝐵, and 𝑛 be arbitrary numbers. Then we have:
1. ln(𝐴 𝐵) = ln 𝐴 + ln 𝐵
2. ln(𝐴/𝐵) = ln 𝐴 − ln 𝐵
3. ln(𝐴𝑛 ) = 𝑛 ln 𝐴
4. ln(𝑒 𝐴 ) = 𝐴
5. 𝑒 ln 𝐴 = 𝐴
Your calculator probably has two different logarithm buttons. For the natural logarithm that we
want, it will say something like “ln” and ex . The other one is the logarithm to the base ten and
will probably say “log” on it.
Note that the last two properties involve the exponential function, and show that it is the inverse
of the logarithmic function.
7
Mathematically, you can only take the logarithm of a dimensionless number – one without a unit.
However, when we do log analysis, we will make use of a shortcut, which can be stated as
follows:
a. choose a single set of units for length, for time, for mass, etc, and stick with those
throughout.
b. pretend all the quantities are dimensionless, so that you can take logs of both sides of the
equation.
c. at the end, reinsert the chosen units into the calculated values for the constants you are
trying to find.
For a), note that if you choose cm for the length unit, and seconds for the time unit, then you
must use cm/s for speed, and you must use cm/s2 for acceleration. For c), you have to look at the
original equation to figure out what the units of the constants are.
The following example handles the units without the shortcut. It takes more work to write it out,
but if you study it, you will see that the shortcut does the same basic thing, and you should get a
better understanding of how to reinsert the units at the end.
3.4 Example. Logarithmic Analysis
The following table lists speed and distance data for Danica Patrick’s Indycar as it takes off from
rest down the main strait of the Indianapolis Speedway. Since she gets steadily faster, the plot of
distance versus speed is not a straight line. Let’s suppose that the equation relating the two
numbers has the form
𝑣𝑛
𝑋=
2𝐴
where A is the acceleration, and n is an unknown power of the speed.
Speed v
(m/s)
5.00
10.22
14.84
19.99
24.90
29.81
35.44
Dist X
(m)
1.68
6.19
15.64
27.77
42.87
59.71
82.37
We will do the following graphing exercise to determine the power n and the acceleration A of
Danica’s car:
i)
Do a logarithmic analysis calculation to figure out how we can produce a straight-line
plot. This will tell us what new table needs to be produced, and which quantities go
on the horizontal and vertical axes.
8
ii)
iii)
iv)
Use this information to create the straight-line plot
Calculate the slope and intercept of the straight line
Use the slope and intercept to figure out n and A
Before proceeding, we point out that there is a potential problem with the units of the given
equation. The units on both sides of any equation must be the same, but since n can take any
value, the quantity A might have a very complicated unit, and will not necessarily be the
acceleration of the car.
The solution is to start from an equation where the units of each quantity are fixed. Consider the
following version of the above equation:
𝑣 𝑛
( −1 )
𝑥
(
) = 𝑚𝑠
2𝐴
𝑚𝑒𝑡𝑒𝑟
( −2 )
𝑚𝑠
Each of the three quantities in parentheses is a dimensionless ratio: length divided by length,
speed divided by speed, and so on. Since the logarithm function can only operate on
dimensionless quantities, we must keep these ratios intact.
i) Logarithmic analysis:
First, take the natural log of both sides. You should find that:
𝑋
𝑣
2𝐴
[ln ( )] = 𝑛[ln ( −1 )] − ln ( −2 )
𝑚
𝑚𝑠
𝑚𝑠
The key to finding n and a lies in understanding how to read this as a straight-line equation. So,
compare this to the equation of a straight line with slope a (unrelated to capital A) and intercept
b:
[𝑦] = 𝑎[𝑥] + 𝑏.
To make the comparison clearer, we use square brackets around the variable quantities. This
matching process shows that we will get a straight line if we plot ln(𝑋/𝑚) on the vertical axis
and ln(𝑣/𝑚𝑠 −1 ) on the horizontal axis. Matching the constants, we see that
𝑎=𝑛
and
𝑏 = −ln(2𝐴/𝑚𝑠 −2 ).
Once we have the plot, the values of the slope a and the intercept b, are found in the usual way
for a straight line. We can then find n (using the first equation) and Danica’s acceleration A
(using the second equation).
ii) So, we need to plot ln(𝑋/𝑚) versus ln(𝑣/𝑚𝑠 −1 ). Remember, this means ln(𝑋/𝑚) is put on
the vertical axis. Using a hand calculator, we obtain the following new data table. Note that we
keep only 3 significant figures since we can’t do hand plots better than that. Also note that we
are keeping all distances in meters and all times in seconds. In some exercises, you may have to
do a conversion to keep consistent units.
9
ln(speed in m/s)
1.61
2.32
2.70
3.00
3.22
3.39
3.57
ln(dist in m)
0.52
1.82
2.75
3.32
3.76
4.09
4.41
Now plot this data. Note that the only way to know that ln(𝑣/𝑚𝑠 −1 ) goes on the horizontal axis
is by doing the logarithmic analysis in part i) before you plot.
iii) From the calculations shown on the plot (next page), we see that the slope is 𝑎 = 2.04 and
the intercept is 𝑏 = −2.81s. These quantities have no units, since the graph is a log-log plot,
which has no units on either axis.
iv) To find the power in our original equation, we use 𝑎 = 𝑛 and solve for n. So we immediately
find that the power is
𝑛 = 2.04.
As you will learn in lectures, this is very close to the value expected when the acceleration is
constant.
To find Danica’s acceleration, we use the intercept value (𝑏 = −2.81) and the equation
𝑏 = −ln(2𝐴 in 𝑚𝑠 −2 ). To solve for A, we use the inverse log function:
(2𝐴 in 𝑚𝑠 −2 ) = 𝑒 −𝑏 = 𝑒 2.8056 = 16.536.
Now multiply both sides by a half, and then multiply both sides by the unit m/s2. So it follows
that the acceleration is
𝐴 = 8.27𝑚𝑠 −2.
Note that we used a few extra digits when we computed the exponent, since we want to avoid
rounding errors in the calculation.
10
11
4.1 Exercise: Power law
θ (no unit)
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
6.0
6.5
i)
Name: _________________ Day____ Time____
F (wiblets)
12.90
8.65
6.23
4.72
3.71
3.00
2.48
2.09
1.79
1.55
ii)
iii)
Calculate the new column(s) in the table needed to get a straight line if the data
appears to follow the equation 𝐹 = 𝑘𝜃 𝑛
Plot the straight line graph: 𝑙𝑛(𝐹/𝑤𝑖𝑏𝑙𝑒𝑡) versus 𝑙𝑛(𝜃).
Find the slope and intercept : slope = ______________ int = ____________
iv)
Calculate k and n
k = _____________
n = _______________
4.2 Exercise: Exponential graph
Time t (s)
.05
.10
.15
.20
.25
.30
.35
.40
.45
.50
Number of decays
17.33
21.92
27.73
35.07
44.36
56.11
70.98
89.78
113.57
143.65
ii)
Assuming an exponential relationship, N = k e ct, calculate the new column(s) in the table
needed to get a straight line.
Plot the straight-line graph (t on the horizontal axis)
iii)
Find the slope and intercept: slope = _______________
iv)
Calculate k = ____________ and c = _______________.
i)
12
int = ____________