Math 1525 Excel Lab 3 Exponential and Logaithmic Functions 1 Math 1525 Excel Lab 3 Exponential and Logaithmic Functions Sping, 21 Goal: The goals of Lab 3 ae to illustate exponential, logaithmic, and logistic models, as well as applications using these models such as Newton s Law of Cooling. Pat 1: Exponential Models Exponential models ae useful fo descibing changing situations in which the ate of change is diectly popotional to (in othe wods, a multiple of) the oiginal function. Exponential models have two equation foms. They ae: y = be x and y = b(m) x = b() x The two foms ae intechangeable, but Excel will always give tendlines using the fist fom. Conveting fom one fom to anothe To convet fom one fom to anothe, use the fomulas = ln m and m = e. Example 1: Convet y = 3.268e.21x into the fom y = b(m) x. Solution: Since m = e = e.21 = 1.23, the equivalent fomula is 3.268(1.23) x. Example 2: Convet y = 46.258(.36) x into the fom y = be x. Solution: Since = ln m = ln (.36) = 1.2, the equivalent fomula is y = 46.258e 1.2x. The fom y = be x The fom y = be x is most commonly used in situations when the change is continuous and gadual. Notice that if x = then y =be = b, so b is the y intecept. The value of denotes whethe the function is gowing o shinking: If is positive, the function is gowing (inceasing). The geate is, the faste the function gows. If is negative, the function is shinking. The moe negative is, the faste the function deceases.
Math 1525 Excel Lab 3 Exponential and Logaithmic Functions 2 Examples: Example 1: y =1e.5x Example 2: y =2e.5x Example 3: y =1e 1.5x Example 4: y =1e -.5x 5 1 1 5 4 8 8 4 3 6 6 3 2 4 4 2 1 2 2 1-3 -2-1 1 2 3-3 -2-1 1 2 3-3 -2-1 1 2 3-3 -2-1 1 2 3 The fom y = b(m) x The fom y = b(m) x is most commonly used in situations when the change is discete; that is, the change takes place intemittently at given intevals. Again notice that b denotes the y-intecept (the point whee the gaph cosses the y-axis). The value of m denotes whethe the function is gowing o shinking (think of m as a pecentage): If m is geate than 1 (i.e., ove 1%), the function is gowing (inceasing). The geate m is, the faste the function gows. If m is less than 1, the function is shinking. The smalle m is, the faste the function deceases. Examples: Example 1: y =3(1.15) x Example 2: y =1(1.15) x Example 3: y =3(1.65) x Example 4: y =3(.45) x 5 4 3 2 1-3 -2-1 1 2 3 16 14 12 1 8 6 4 2-3 -2-1 1 2 3 16 14 12 1 8 6 4 2-3 -2-1 1 2 3 35 3 25 2 15 1 5-3 -2-1 1 2 3 Impotant thing to emembe: Both foms, y = be x and y = b(m) x,ae intechangeable! Regadless of which fom you use fo a paticula poblem, thee is an equivalent fomula in the othe fom that gives exactly the same data and exactly the same gaph! If you get stuck on a poblem, ty conveting it to a diffeent fom and see if that gets you unstuck. How can you tell if a model will be exponential? The test we use to see if a function is exponential is simila to the test we use to see if a function is linea. Instead of subtacting one y-value fom the next and finding the fist diffeences, we ll divide one y-value into the next. These ae called gowth factos. Example 3: In the table on the next page, both the fist diffeences and the gowth factos ae shown fo compaison. You should note that the gowth factos ae not exactly the same, and theefoe an exponential model will only be an appoximation to the function (but as we ll see, it s a vey close one!) The fist diffeences, on the othe hand, ae all ove the place! A linea model would be a teible fit fo this data!
fist gowth x y diffeences factos 2.5 1.25 1.5 1 3.75 1.88 1.5 2 5.63 2.25 1.4 3 7.88 3.94 1.5 4 11.81 5.91 1.5 5 17.72 8.86 1.5 6 26.58 13.29 1.5 7 39.87 27.91 1.7 8 67.77 33.89 1.5 9 11.66 5.83 1.5 1 152.49 What exponential models look like: This is the gaph of the table above, with an exponential tendline. (See? It is a good fit!) Exponential models ae easy to ecognize. They have a hoizontal asymptote on one side only, and they neve change diection. Question: Why do the fist diffeences and gowth factos stop one ow shot fom the end? Note: Ty econstucting this table in Excel. You ll notice the fist diffeences and gowth factos will be slightly diffeent because of ounding. y 2. 15. 1. 5.. Math 1525 Lab 3 Example of Exponential Tendline y = 2.386e.4116x 2 4 6 8 1 12 x Question: Excel always gives exponential tendlines in y = be x fom. Convet the tendline equation above into y = b(m) x fom. Compound Inteest As we mentioned in the intoductoy paagaph, compound inteest is an example of an exponential model. The fomula used fo compound inteest appeas in two foms (notice how they e the same as the foms we just coveed, only with diffeent lette names fo the vaiables:) A = P(m) t = P(1 + ) t gives peiodic compound inteest. Peiodic means the inteest is computed and/o posted at given, fixed time intevals. When you hea a ate of, say, 6%, compounded quately, that means the inteest is peiodic. P is the pincipal the amount you put into the bank. is the inteest ate. Two things you should note: 1. must be conveted fom a pecentage to a decimal befoe using it in this fomula. 2. Inteest ates ae always given as annual ates, even if the peiod is not in yeas. So, fo example, if the inteest is 6% compounded quately, then =.6/4 is only 1.5%, o.15, because thee ae fou quates in a yea. If the inteest is 3% compounded monthly, then =.3/12 is only.25%, o.25. t is the time. The units must be the same as the peiod of the inteest. So, if you invested money fo 1 yea in a bank that compounded inteest daily, then t would equal 365. Finally, A is the total amount of money at the end of t time.
A = Pe t gives continuous compound inteest. This means that the inteest is always being compounded (vey gadually). Few financial institutions actually use this method of geneating inteest, but the fomula is still useful because it s simple, and gives a close appoximation to the peiodic fomula. Just as befoe: P = pincipal = inteest ate. Since the inteest is no longe peiodic, you may use the annual ate hee, but you still have to convet it to a decimal. t = time (in yeas) A = compounded amount at the end of that time. Example 4: Set up only: I ve invested $7, in the bank, at 12% inteest, compounded monthly. Eventually, it gew to $13,. How long did it take? Solution: The inteest is peiodic (because it s compounded monthly), so we use the fomula A = P(1 + ) t. We know that P = $7, and A = $13,. The inteest ate is.1 (because 12% is only 1% pe month, and 1% as a decimal is.1). The time t is unknown (that s what we e solving fo.) So the equation is: 13 = 7(1 +.1) t. Example 5: Set up and solve: My cedit cad balance is $7, and the inteest ate is 18.9% and it s compounded continuously. If I make no payments fo the next six months, what would my balance be? Solution: Since the inteest is continuous, we use the second fomula: A = Pe t. We know that P = 7, =.189, and t is only.5 (because six months is half a yea). The balance A is unknown. So, (.189)(.5) A = 7e.945 = 7e = 7(1.991) = $769.38 Thee ae moe examples in the book in section 2.2. A wod about Excel: When you gaph e x in Excel, you cannot simply type =e^(a2). This is because Excel intepets an e to mean column E in the woksheet! Instead, you have to use the Excel commamd =EXP(A2) o emembe that e = 2.718 and type in the equation =b*(2.718)^a2. Example 6: Do not tun in Example 6. But ead it thooughly, because you will need it fo Execise 1. You have an oppotunity to invest money now at 7.5% inteest, compounded continuously. You would like to have $25, in the fund in 4 yeas, fo when you gaduate. How much money would you need to invest today in ode to meet you goal? Technique: Since the inteest is compounded continuously, you fomula will be A = Pe t. You know the inteest ate ( =.75), the amount of time (t = 4 yeas), and the amount you want to finish with: (A = 25). What you don t know is the pincipal. Let P be the input vaiable in this poblem, and A be the output vaiable. Ceate a table fo diffeent values of P. Using common sense, you know that P should be less than $25,. Let s stat at $15, and move up in $5 incements. (See the table on the next page).
In cell B2, ente the fomula fo compound inteest: =A2*EXP(.75*4). (This is the = Pe t pat of the fomula, tanslated into Excel.) The answe tuns out to be $2,247.88. Using the daggingdown technique we leaned in Lab 1, dag you fomula down to fill out the est of the column. Then gaph you data, using a smooth, connected chat sub-type: We can see fom using the table and the chat that we ll each an ending balance of $25, if we invest somewhee between $18,5 and $19,. Execise 1: Impove upon this estimate. Repeat Example 6, but instead of using the table above, make a table of moe pecise values between $18,5 and $19,. By using $25 incements in you table, you should come up with a much close estimate than the one we got. In class, we ll discuss a way to get a vey pecise answe by hand. Execise 2: Suppose you only had $1, to invest? How long would you have to wait in ode to have a balance of $25,? (Note that you input vaiable has changed! You ll need to make a new table and gaph to solve this poblem. Hint: You input vaiable should always go in the fist column.) It s okay to estimate you answe, but you answe should be accuate to within 6 months.
Pat 2: Logaithmic Models Logaithmic functions ae the inveses of exponential functions. Theefoe, thee ae some similaities in thei appeaance. Instead of having a hoizontal asymptote like thei exponential countepats, logaithmic functions have a vetical asymptote on one side only. This makes the functions easy to ecognize. But it also makes the functions tickie to gaph, because Excel does not handle vetical asymptotes well. Example 7: We ll use Excel to gaph the function on the domain. Ente the x-values into column A and the fomula =LN(A2-3) into cell B2. Dag down to fill the column: Oops! The message #NUM! is Excel s way of saying, I undestood you equest, but the answe is undefined. The poblem is that the function y = ln(x 3) is defined only when x 3 is positive, and the fist fou values in the table violate that ule since x - 3 > means that x > 3. If you gaph a table with an eo in it, you will get an incoect gaph! The following gaph is not the coect gaph of y = ln(x 3): Math 1525 Lab 3 This gaph is NOT y =ln(x D 3) Thee ae two steps you need to take to esolve this, then you will be a whiz at gaphing logaithmic functions! Fist, blank out the x-values in the ows containing eos. y 2.5 2 1.5 1.5 -.5 2 4 6 8 1 12 x In Windows, you can do this by highlighting those cells and pessing the Delete button (not the backspace key). On the Mac, you can do this by highlighting the cells and pessing apple-b. If you ty this youself, you ll see that the gaph changes on the fly to eflect the changes you made! We now have pat of the gaph, but we e missing the vetical asymptote. The next step will take cae of that.
Then, fill in those missing cells with values that will wok with this function. We know that values less than 3 give us an eo, but thee ae plenty of values geate than 3 that we can use. Let s ty 3.1, 3.1, 3.5, and 3.8. Type those values whee the blank cells ae in the woksheet. You do not need to etype the fomula in B2. When you do this, you ll find that the gaph updates to match what you ve typed. It s easy to see now the vetical asymptote in this function is at x = 3. Execise 3: Using the example we ve just coveed, gaph the following functions. You gaphs should not contain any eos, and should clealy show the function as it appoaches the vetical asymptote and as it begins to flatten out. Except fo these estictions, you may choose any easonable domain. (a) y = ln (x + 4) (b) y = 2 + ln (3x 6)
Pat 3: Exponential Applications This pat of the lab coves vaious uses fo exponential functions. We ve aleady seen compound inteest as an application whee exponential functions ae used. Hee ae a few othes. The examples fom this section ae moe difficult than othe examples, because we e using by-hand techniques to solve them pecisely, instead of Excel techniques to solve them appoximately. Radioactive Decay Radioactive decay also follows the model A = Pe t (just like compound inteest and population gowth), but since the adioactive matte is decaying, you gowth ate will be negative (in othe wods, a decay ate). In most cases, you will be given the half-life of you adioactive substance instead of the decay ate. To convet, use the fomula: ln 2 = half - life So, fo example, if the half-life of a substance is 13 yeas, then its decay ate would be ln 2 =.693 = = =.533. Once you ve found the decay ate, you e locked into you units 13 13 fo time. Any poblem you solve using that decay ate will be in yeas. Example 8: The half-life of Empoium-1 is 23 yeas. If I have 8 milligams of Empoium- 1 now, how much will I have in 6 months? Solution: The decay ate is ln 2.693 = = =. 31. Since I m stating out with 8 milligams, 23 23 and I ve got 6 months to let it decay, my solution will be: (.31)(.5).155 y = 8e = 8e = 7.88 milligams. Note that I had to ente the time as.5 yeas and not 6 months, because once I found the half-life, I was locked into using yeas as my units. Example 9: In how many months would I have 5.9 milligams? Solution: The equation is 5.9 = 8e.31t, and we need to solve fo t:.31t 5.9 = 8e 5.9.31t = e 8.31t.7375 = e ln.7375 =.31t.345 =.31t t = 1.12 So the answe is 1.12, but this is in yeas! So we need to multiply by 12 to get the final answe: 121.4 months. Logistic Models M The fom of a logistic equation is y =. The exponential pat of the model is in the 1 x + Ae denominato and this causes the function to behave diffeently. This is a function whose gowth is limited thee s a ceiling that detemines how high this function could get.
Example 1: Chalotte, NC (population 6,) is stuck by a devastating epidemic. At fist, 1, people ae infected. By the end of the fist day, 5, people ae infected. How many people ae infected by the end of the week? Solution: This is a logistic gowth poblem, because no matte how fast the epidemic speads, thee is a ceiling of 6, people. To solve: (1) Find M. This one s easy: M is always the value of you ceiling. In this case, M = 6. (2) Find A. To find A, you plug in fo x, and you stating value fo y. In this case, the epidemic stated with 1 people: 6 1=? Ae 6 1= A 6 A = 1 1 + A = 6 A = 599 (3) Find. To find, you use the emaining data point (the fist day, 5 people ae infected so x=1 and y=5.) 6 5=? 1 599e 6 5= 599e 6 599e = 5 599e = 12 599e = 119 e =.19866 = ln.19866 = 1.616 (4) Finally, solve the oiginal poblem. = 6 y 1. 616 + 7 1 599e = 595642 people! Newton s Law Of Cooling: This law applies in a situation whee you have a definite stating point and ending point, and you want to gadually shift fom one to the othe. Fo example, if oom tempeatue is 7, and I take a pie out of a 4 oven, then the pie s tempeatue will gadually shift fom 4 to 7, but once it eaches 7, it s not going to get any coole!
The fomula fo Newton s Law of Cooling is y = a + be x. In othe wods, it s just the egula exponential model, plus a constant. a = oom tempeatue. In ou example, a would be 7 degees. b = the amount of cooling to be done. Since ou pie stated out at 4, and needs to cool down to 7, b = 33 degees. It s the diffeence between you stating point and you ending point. If heating is done instead of cooling, fo example, if you took a chicken out of the feeze to thaw, then b will be negative. = the ate at which the object loses heat this will depend on the type of object, as well as on how insulated its containe is. To solve fo, you need to know one intemediate piece of data somewhee between the stating point and the ending point. x = the amount of time that s elapsed. y = the tempeatue at the end of x units of time. Example 11: The police find a dead body at midnight in a 6 oom. The tempeatue of the body at the time they found it is 88, and it s 84 one hou late. What was the time of death? Solution: We know the following: a = oom tempeatue. So a = 6. b = the diffeence between the stating point and the ending point (oom tempeatue). This body was found at 88, so b = 28. = the ate at which the victim loses heat, and we need an intemediate point to solve fo :? 1 When x = 1, y = 84, so: 84 = 6 + 28e 24 = 28e 24 28.857 = e = e = ln.857 =.15415 Now that we know these values, we can solve to see when the body died. At the time the body died, its tempeatue was still 98.6! So:. 15415 x 98.6 = 6 + 28e 38.6 = 28e 1.379 = e.15415 x = ln 1.379 x =.15415.321. 15415.15415 x = 2.8 x x. So the victim died 2.8 hous befoe we found it, o at 9:55 pm.
Execise 4: Execise 4 is completely woked out in this lab. Howeve, you still need to submit you complete wok though of Execise 4. You manage a small business with sales aveaging $1, pe day. Afte a huge advetising blitz, you sales shoot up to $3, pe day, but a week late, they e aleady back down to $2,2 pe day. What is the ate of cooling? Solution: Believe it o not, advetising heats up you business and boosts sales. But once that advetising is ove, you sales cool down to thei usual level. Newton s Law of Cooling woks well fo modeling these situations. The fomula is y = a + be x. a = oom tempeatue. In othe wods, how much ae ou sales usually? In this poblem, a = 1. b = the amount of cooling to be done. The ad blitz heated up ou sales to $3 pe day, when they e usually $1 pe day. So thee s $2 woth of cooling to be done befoe things etun to nomal. b = $2. = the cooling ate. This is ou unknown. Ou input values will be diffeent cooling ates, to see which one woks. Remembe, will be negative, because ou sales ae deceasing following the blitz. x = the amount of time. We e told that a week late, the sales ae $2,2 pe day. So the time is one week. Howeve, we have to use x = 7, because ou sales ae measued pe day. y = the tempeatue at the end of that time. In othe wods, what ae ou sales afte one week? $2,2 pe day. So ou fomula will be 22 = 1 + 2e 7. Set up a table using diffeent negative cooling ates. Remembe that ou cooling ate is a pecentage, so the decimal values will be faily small (fo example, 12% is only.12). You don t want big numbes in this table. This table goes fom 1% to 5% in.5% incements: Ente the fomula in cell B2: =2*EXP(A2*7). Then dag down the fomula to fill the column, and gaph the esulting function. The gaph is shown at ight. (You gaph will pobably look zoomed out compaed to this one. The scale on the x- and y-axes may be diffeent.) Looking at the gaph and the table, we can tell that sales each $2,2 pe day when the cooling ate is between 7% and 7.5%. We ll split the diffeence, and estimate the tue cooling ate to be 7.25% ( =.725). 1 sales pe day Math 1525 Lab 3 (?7) y =2e 25 24 23 22 21 2 -.1 -.9 -.8 -.7 -.6 -.5 cooling ate 1 The actual cooling ate is.7298, so ou estimate is vey close.
Execise 5: Based on the estimate we made in Execise 4, what will be the sales pe day afte two weeks? (You may be able to do this without using Excel. If so, explain what you did and how you got you answe.) Execise 6: Based on the estimate we made in Execise 4, how many days will it take fo the sales to cool down to $15 pe day. (Estimate you answe to the neaest day.) Execise 7: This execise will intoduce you to the foecasting capabilities of Excel, compae linea and exponential tendlines, and apply these skills to ecent eal-life events. Ealie this month, Califonia esidents expeienced a seies of blackouts because thei electic company was not able to poduce enough powe to meet demand. (Fo a news aticle on the stoy, see http://www.cnn.com/21/us/1/19/powe.woes.3/index.html). The following tables show the amount of electicity poduced in Califonia (in gigawatt-hous) and the population of Califonia. yea electicity poduction population 198 181,348 23,782, 1981 188,51 24,278, 1982 183,972 24,85, 1983 187,589 25,337, 1984 21,42 25,816, 1985 28,86 26,43, 1986 29,389 27,52, 1987 219,821 27,717, 1988 23,596 28,393, 1989 237,767 29,142, 199 246,62 29,944, 1991 24,53 3,565, 1992 245,647 31,188, 1993 246,252 31,517, 1994 248,778 31,79, 1995 249,846 32,63, 1996 258,575 32,383, 1997 266,28 32,957, 1998 27,55 33,494, (souce: 1999Califonia Depatment 274,648 of Enegy, U.S. Census 34,36, Bueau) (a) Gaph the electicity poduction (align the yeas fist), and fit a linea tendline to the model. (b) Gaph the population on a sepaate gaph, and fit an exponential tendline to the model. You should measue the population in thousands of people. (c) Fo each tendline, do the following: Click on the tendline to highlight it, then click on Fomat and dag down to Selected Tendline. Unde the Options tab set the tendline to foecast fowad 5 yeas. (See bottom ight.) (d) n a paagaph, descibe the diffeence between the linea tendline and the exponential tendline. Explain how the diffeent types of gowth affect the electicity industy s ability to meet demand. Include both gaphs with the extended tendlines with you paagaph.