<<

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 y y  ax y  ax  b

b 0 x 0 x

This one is a special type of linear

Here, there is a linear relationship between y and x, because b=0 so

relationship between y and x 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 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:

y2  y1 a  x2  x1

e. Show the slope calculation (on the graph if possible) by first writing the above , 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 Gravitational Height h potential energy U (meters) (Joules) .20 .49 .40 1.04 .60 1.33 .80 1.96 1.00 2.48 1.20 3.21 1.40 3.43 1.60 3.93 1.80 4.54 2.00 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) cX Y  ke (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 . 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 , 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 cX Y  ke , 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: cX ln Y  ln( ke ) Use the rules of logarithms to expand this into a form that resembles a straight-line equation: ln Y  ln k  ln( ecX ),

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) c = a, the slope of the new plot ii) Using ln(k) = b, solve for k to get b k  e

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 In , 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 Dist X (m/s) (m) 5.00 1.68 10.22 6.19 14.84 15.64 19.99 27.77 24.90 42.87 29.81 59.71 35.44 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) Use this information to create the straight-line plot iii) Calculate the slope and intercept of the straight line iv) 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 ( )] − ln ( ) 푚 푚푠−1 푚푠−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) ln(dist in m) 1.61 0.52 2.32 1.82 2.70 2.75 3.00 3.32 3.22 3.76 3.39 4.09 3.57 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 Name: ______Day____ Time____

θ (no unit) F (wiblets) 2.0 12.90 2.5 8.65 3.0 6.23 3.5 4.72 4.0 3.71 4.5 3.00 5.0 2.48 5.5 2.09 6.0 1.79 6.5 1.55

i) Calculate the new column(s) in the table needed to get a straight line if the data appears to follow the equation 퐹 = 푘휃푛 ii) Plot the straight line graph: 푙푛(퐹/푤푖푏푙푒푡) versus 푙푛(휃). iii) Find the slope and intercept : slope = ______int = ______

iv) Calculate k and n k = ______n = ______

4.2 Exercise: Exponential graph Time t (s) Number of decays .05 17.33 .10 21.92 .15 27.73 .20 35.07 .25 44.36 .30 56.11 .35 70.98 .40 89.78 .45 113.57 .50 143.65 i) Assuming an exponential relationship, N = k e ct, calculate the new column(s) in the table needed to get a straight line. ii) Plot the straight-line graph (t on the horizontal axis) iii) Find the slope and intercept: slope = ______int = ______iv) Calculate k = ______and c = ______.

12