+ All Categories
Home > Documents > Lec 2 Graphing Log Functions

Lec 2 Graphing Log Functions

Date post: 04-Jun-2018
Category:
Upload: bwahahaha
View: 223 times
Download: 0 times
Share this document with a friend

of 7

Transcript
  • 8/13/2019 Lec 2 Graphing Log Functions

    1/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    IVIL RCHITECTURAL AND NVIRONMENTAL NGINEERINGC , A E ECAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    1 | P a g e

    Slopes and Intercepts on Logarithmic Graph Paper

    If we have a graph in which we wish to plot the logarithm of a value we can save time by using

    special graph paper. Semi-log paper has a logarithmic scale on one axis and a linear scale on theother; log-log paper has logarithmic scales on both axes. The logarithmic scale has numbers (1,2, 3...) printed on the axis. These numbers are spaced in proportion to the logarithms of thenumbers. A cycle refers to one complete set of numbers from 1 to 10. We can have severalcycles along one axis. It is important to purchase paper with the correct number of cycles foryour application.

    Remembering logarithmic the basic functions:

    Logarithmic Identities

    Slope and intercept for semi-log graph.

    Exponential functions can be equated with semi-log plots.

    Exponential Functions:y = ax

    Common forms: Base 10 y = 10x Base e y = ex

    Suppose we expect our data to match a theoretical curve Y = A eM X. The slope, M, on a semi-logplot is computed by taking the natural log of both sides:

    MXAY += lnln

    What if we have a base-10 log? We want to linearize Y = A 10MX. We take the log of both sides:

    MXAY += 1010 loglog

    Note that the above equation is in the form of a line. The slope, M, on a semi-log plot has unitswhich are the inverse of the units on the X-axis. Natural logs must be used here. The intercept,A, is the value where the line intersects the vertical axis at X = 0. It has the units of Y. It isimportant that when reporting values of A and M that the base is also given, for example: A =0.2 m/s (base e).

  • 8/13/2019 Lec 2 Graphing Log Functions

    2/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    IVIL RCHITECTURAL AND NVIRONMENTAL NGINEERINGC , A E ECAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    2 | P a g e

    Example: Graphing on a semi-log plot

    Data in following table are plotted below on semi-log paper. The slope is found to be 0.0854 s-1

    and the intercept is found to be 0.150 cm/sec. The equation for the rocket speed is given as

    tcecS 21=

    Time, s Speed, cm/s

    4.0 0.20515.0 0.53030.0 1.9143.0 5.9054.0 15.3

    66.0 41.5

    Taking the natural log ofboth sides we get:

    S lnln = tcc 21 +

    Again, notice that this is in

    the equation of a line, withyvalue equal lnS, interceptlnc1, and slope c2.The hand drawn graph isshown below.

  • 8/13/2019 Lec 2 Graphing Log Functions

    3/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    IVIL RCHITECTURAL AND NVIRONMENTAL NGINEERINGC , A E ECAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    3 | P a g e

    Plotting using an Excel spreadsheetwe get:

    Speed vs Time

    y = 0.1341e0.0878x

    0.1

    1

    10

    100

    0 20 40 60 80Time, s

    Speed,cm/s

    This chart was created by double-clicking on the y-axis and selecting the logarithmic scale boxat the bottom of the scale page. Also, the minor tick marker was selected and a value of 0.1was used for x-value crosses the axis at. The fitted line was created by right-clicking a datapoint and selecting add trend line. In the trend line box select the type as exponential, underoptions select display equation on chart, and set the forecast back 6 units so that the trendline will touch the y-axis.

  • 8/13/2019 Lec 2 Graphing Log Functions

    4/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    CIVIL,ARCHITECTURAL AND ENVIRONMENTAL ENGINEERINGCAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    4 | P a g e

    Example: Graphing on a log-log plot

    Suppose you were presented with the set of data shown below. A graph ofxvs. tis also shown,

    and you can see it's a smooth curve. But other than that, it's not very informative. Suppose,however, in addition, there were reasons to believe that this data obeyed a power-law,x = ktn.How could you find if this were true and, if it were, evaluate the constants kand n?

    Perhaps this function isx = t2, orx = 5t4. Actually, it is probably impossible to determine theexponent n and constant kby looking at this graph.

    Table 1

    x vs. t

    0

    5000

    10000

    15000

    20000

    25000

    3000035000

    0 20 40 60 80 100 120

    t

    x

    ere is a slick technique to solve this dilemma. Lets take the log of both sides of our function:

    log (x) = log (k t ) Eq. (1)

    [Recall: log (AB) = logA + logB and log (A ) = n logA]

    o equation (1) becomes:

    g x = n log t + log k Eq. (2)

    ut this has the form: y = m x + b (a straight line!)

    his means that we can just take the log of each data point and plot it on regular graph paper:

    t (s) x ( m)1 3

    2 123 274 485 756 1087 1478 1929 243

    10 30020 120050 7500

    80 19200100 30000

    H

    n

    n

    S

    lo

    BT

  • 8/13/2019 Lec 2 Graphing Log Functions

    5/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    IVIL RCHITECTURAL AND NVIRONMENTAL NGINEERINGC , A E ECAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    log x vs. log t on regular paper

    y = 2x + 0.4771

    0

    1

    2

    3

    4

    5

    0 0.5 1 1.5 2 2.

    log t

    log

    x

    5

    *** Note that the axes are log xand log t***

    ow we have a straight line whose slope is the exponent n and whose x-intercept is log k.e

    o look at the second graph and locate where the line crosses logxaxis. This occurs when log x

    o you have now found the constants kand nfor the functionx = k tn. You can now state that

    he easy way

    aking the log of all the data and re-plotting it is tedious and time consuming. Fortunately there

    log t log x

    0 0.4771210.3 0301 1.079181

    0.4771211.4313640.60206 1.6812410.69897 1.8750610.7781512.0334240.8450982.1673170.90309 2.2833010.9542432.3856061.00000 2.4771211.30103 3.0791811.69897 3.8750611.90309 4.283301

    2.00000 4.477121

    NYou can use this data table to show that the slope is 2. Thus n = 2. Notice that since logs havno units, then the slope has no units. The constant k is a little bit trickier. Just as you would findthe y-intercept iny = mx + bby settingx = 0, you would find kbysetting n log t = 0in equation(2). So equation (2) becomes log x = n log 1 + log k, or log x = 0 + log k, thus log x = logk.

    S= 0.477121. (* Remember, that value isnotx, its logx). So log x = log k, and we have 0.477121= log k. Solving for kyields k = 3.

    Sthe data ofxvs. tcan be described by the functionx = 3t2.

    T

    Tis an easier way! Instead of using your calculator to take the log of each data point, we can usespecial graph paper called logarithmic graph paper. Since the log of both variablesxand tareneeded, we can use log-log paper it is just graph paper in which both axes are ruledlogarithmically.

    5 | P a g e

  • 8/13/2019 Lec 2 Graphing Log Functions

    6/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    CIVIL,ARCHITECTURAL AND ENVIRONMENTAL ENGINEERINGCAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    6 | P a g e

    otice that the log axes runs in exponential

    e

    cle,

    ow we will plot our original data from Table (1) on log-log paper to see if has the form:

    N

    cycles. Each cycle runs linearly in 10's but thincrease from one cycle to another is anincrease by a factor of 10. So within a cyyou would have a series of: 10, 20, 30, 40, 5060, 70, 80, 90, 100(this could also be 1-10, or0.1-1, etc.). The next cycle actually begins with100and progresses as 200, 300, 400, 500, 600,700, 800, 900, 1000. The cycle after that wouldbe 1000, 2000, 3000, 4000, 5000, 6000, 7000,8000, 9000, 10000and so on. So you see, thegraph paper actually takes the logfor you!

    N log x = n log t + log k

    x vs. t on lo g-log paper

    1

    10

    100

    1000

    10000

    100000

    1 10

    t

    x

    100

    A

    BC

    ince this produces a straight line, we know that the data must describe a function of the formx =kt

    nwith slope nand vertical intercept log k. Care must be taken when calculating the slope. Anynumber taken from the graph comes off the graph paper as the log of that number.

    S

    og- og paper

  • 8/13/2019 Lec 2 Graphing Log Functions

    7/7

    NORTH CAROLINA AGRICULTURAL AND TECHNICAL STATE UNIVERSITY

    IVIL RCHITECTURAL AND NVIRONMENTAL NGINEERINGC , A E ECAEE 363 Engineering Fluid Mechanics & Hydraulics Lab

    7 | P a g e

    Pick two pointson your line.. For this example, I will use points A and B to calculate the slope.

    (* Remember that your data points may not all be on the line. Even so,you

    must pick two pointson your line!)

    log (1200) log (27)

    Calculation of the slopen:

    log (1200/27)Slope n = log (20) log (3) = log (20/3) = 2

    Calculation of the constant k:

    Just do the same as you would when solving for biny = mx + b. We have log x= n log t + log k

    So setting n log t= 0leaves log x = log k. Recall log t = 0when t = 1! So look to see whereyour line intercepts the x-axis when t = 1(not when t = 0, since log 0is undefined there!)In the graph above, the line intercepts the x-axis at point C. Thus the x-intercept is log 3.Remember that it is notjust 3 since the vertical axis is logarithmic, so log x = log kbecomes log 3= logk, and thus k = 3. Therefore, we can write that this data fits the equationx = 3t2.

    You must include the proper units with the value of k. To find them, simply rearrange the equationx = kt

    nto solve for k, in other words, k = x/tn. Sincex has units of meters and thas units ofseconds, the units for kmust be m/sn. In this exercise where n = 2, khas units of m/s2. So to fullyexpress the function, we have:

    x = 3m/s2t2.

    I hope you agree that the method of graphing your data on log-log paper greatly simplifies theprocess of determining the functional dependence between two variables.

    The techniques of graphing on logarithmic paper are valuable tools that you will need in yourcareer as a scientist or engineer. You will be expected to make these types of graphs several timesthroughout this semester.


Recommended