500 likes | 664 Views
Part 3: Exponential Functions and Logarithms.
E N D
Part 3: Exponential Functions and Logarithms We have seen that the linear function has a constant slope, m = Δy/Δx = constant; and the quadratic function has a slope that depends on the independent variable, x: Δy/Δx = 2ax. Is there a function whoseslope depends on y,the dependent value (or the value of the function at that point),Δy/Δx = ky?
Exponential Functions Consider the ideal case of rabbits(ideal = without limits due to food, disease, or predators). We all have heard that rabbits multiply fast. The number of baby rabbits per time interval, ΔN/Δt, is directly related to the number of rabbits we have, N(t), at that time: ΔN/Δt = k*N (where k is a constant). Money in a savings account earns interest(amount of money increases over time: Δ($m)/Δt), and the amount of money earned depends on the amount of money in the account, ($m): Δ($m)/Δt = k*($m) .
Exponential Functions If we consider rabbits, we know that the population(without food constraints, disease, or predators)doubles in a certain time period. Thus we can see that the population number will be something like:N = No*2a*t where t is the time and a is some constant that specifies how long it takes to double. If it takes 2 months to double, then a = 1/(2 months). Thus, if t = 2 months, then N = No*2[1/(2 months)]*(2 months) = No*21 = 2*No . Six months later, N = No*2 [1/(2 months)]*(6 months) = No*23 = 8*No.
Exponential Functions Quick review of working with exponents: 20 = 1; 21 = 2; 23 = 2*2*2; 27 = 2*2*2*2*2*2*2 (In the above and below, the 2 is called the base, and it can be any number.) 22+3 = 25 = (2*2)*(2*2*2) = 22*23 25-2 = 23 = 25*2-2 = (2*2*2*2*2)*(2-2) = 2*2*2 which means that 2-2 = 1/(2*2) = 1/22 . 22*3 = 26 = 2*2*2*2*2*2 = 64 = (2*2)*(2*2)*(2*2) = (22)3 = 43 = 64 (or 22*3 = 23*2 = (23)2 = 82 = 64) Note that we have been doing this kind of thing when we use scientific notation!
Exponential Functions In the case of real rabbits, we know that we cannot have ½ a rabbit or 0.168 rabbits, we can only have integer rabbits. Time also doesn’t come in just 2 month units, it is continuous. So, can we abstract and consider what 20.5 or 20.168 might be?
Exponential Functions You may know that 20.5 is what we mean by SQRT(2). The SQRT function undoes what the square function does. It is the inverse operation: 21 = 2(2/2) = (22)½ = 4½ = 2 ! In the same way, 2⅓ (called the cube root of 2) undoes what 23 does (2 = 21 = 23/3 = (23)⅓ = 8⅓ = 2). Inverse of multiplication versus inverse of squaring:Note that 2-2 is the multiplicative inverse of 22, (22*2-2)=1, which is different than the inverse operation of squaring: SQRT(22) = (22)½ = 2. But what about 20.168 ?
Exponential Functions What about 20.168 ? Here we use the rational number idea: 20.168 = 2168/1000 where 21/000 undoes what 21000 does. Even with irrational numbers, such as 2π, we can approximate it as 23.14159 and keep getting closer by using more digits. So 20.168 = 2168/1000 = 2168*1/1000 = (2168)1/1000 . Fortunately, your calculator can evaluate this using just the 20.168 form. Try it (use the ^ operation). My calculator gives 20.168 = 1.1235. (Would you expect it to be close to 1?)
Exponential Functions Financial interest rates are a way of allowing money to be used by someone else for a fee. For an interest rate of 6% per year, the basic way would be to calculate it this way (with $m being the symbol for money): $m(1 year) = (1+.06)*$m (so if you lent $1,000, you would receive $60 interest and your new amount would be $1,060; if you are the lendee, you would owe $1,060 after one year.)
Exponential Functions But suppose you wanted to borrow (or lend) the money only for 3 months (¼ year), but still at the interest rate of 6% per year (or ¼*6% = 1.5% per quarter). The new formula would be: $m(3 months) = (1 + 0.06/4)*$m = (1.015)*$m. If you now renewed the loan for 3 more quarters (a full year), the amount would be, applying the factor of 1.015 four times: $m(1 year) = (1.015)4*$m = 1.06136*$m. Note that on a $1,000 loan, the interest would now be $61.36 rather than the even $60.
Exponential Functions This process is called compounding. The amount earned with a 6% interest rate if compounded annually would be 1.06 times the initial amount; if compounded quarterly, it increases to 1.06136 times the initial amount. What would it be if compounded daily?
Exponential Functions At 6% annual interest ratecompounded annually would be 1.06000 *$mcompounded quarterly would be 1.06136 *$m compounded daily, we would have: $m(1 year) = (1+.06/365)365*$m = 1.06183*$m(which is a slight increase over the quarterly compounding). What about compounding it every second? $m(1 year) = (1+.06/31536000)31536000 *$m = 1.06184*$m, (again just a very slight increase over compounding the amount daily!)
Exponential Functions When you search out interest rates (either for investing or borrowing), you will usually see two rates: one is the interest rate (such as 6%), and the other is an APR (annualized percentage rate) that shows you what the percentage gain will be after one year. As we saw earlier, a 6% interest rate compounded yearly will have an APR of 6%, but a 6% interest rate compounded daily will have an APR of 6.183%. [Note that a 12% interest rate compounded daily will have an APR of 12.747%. The higher the interest rate, the bigger difference there will be between the rate and the APR rate when compounded often.
Exponential Functions Consider this table: n(1 + 1/n)n 1 2.00000 10 2.59374… 100 2.70481… 1,000 2.71692… 10,000 2.71815… 100,000 2.71827… 1,000,000 2.71828… In the calculus, we find that as n approaches infinity, the (1+1/n)n value approaches what we call e, the base of the natural logarithms.
Exponential Functions (1 + 1/n)n = e If we replace n with n/a, we get: (1 + a/n)n/a = e , or raising both sides to the power of a: (1 + a/n)n = ea . If a is our interest rate per time period, then ea would be the value of the result after one time period if it is compounded continuously. Example: e0.06 = 1.06184 which is essentially the same as compounding it every second.
Exponential Functions (1 + 1/n)n = e If we replace n with n/a: (1 + a/n)n/a = e If we raise both sides up to the power a: (1 + a/n)n = ea . If we do this for t number of time periods, then our factor of increase happens t times, or N(t) = No(ea)t = Noea*t So far, we have talked about positive exponents for the most part. Can we extend the exponents into the negative region?
Exponential Functions y(x) = Aeax Can we extend this into the region for x<0 ? If we recall what a negative exponent means, we see that: e-1 = 1/e, e-2 = 1/e2 . If we plot y(x) vs x, we then get something that looks like the graph on the next page.
Exponential Functions y(x) = Aeax Note that while the exponential curve increases greatly with x, it also gets much smaller with negative x (that is, gets closer to zero) since we arenow dividing by higher powersof ea . The left (negative x side shows) a horizontal asymptoticbehavior. y x
Exponential Functions y(x) = Aeax What would happen if the coefficient in front of x were negative (replace a with –a)?
Exponential Functions y(x) = Ae-ax All that would happen is that we would switch the positive x withthe negative x (reflect it throughthe y-axis). This is called a dying exponential. y x
Exponential Functions So far, we have seen uses for: 10x scientific notation2x doubling of rabbits (or other things)ex continuous compounding of a rate We could, in principle, use any number in the place of 10, 2, and e. This number, whatever one we choose, is called the base. Of course, the x in the above expressions is called the exponent.
Exponential Functions On your calculator, you can raise any number to a power by using the ^ key. However, there is a special key for ex because it is used so much. With an exponential function, (such as y = 2ax or y = Beax) does the function ever give a negative value (is y ever negative)? (The answer will be important when we start talking about the inverse relation.)
Computer Homework You should be able to do the sixth Computer Homework assignment on Exponential Equations, Vol. 0, #5.
Regular Homework Set #6(continued on next slides) • Given the following function for the number of rabbits per time: N(t) = 50*2(1/2months)*t , find the number of rabbits at: a) t = 0 months; b) t = 2 months; c) t = 12 months; d) t = 12.1 months. • Using your calculator and the above function, find the time graphically when there are: a) 200 rabbits; b) 250 rabbits; c) 12 rabbits.
Regular Homework Set #6(continued) 3. For the following function: N(t) = 50*2(1/2months)*t, calculate the average slope of the function near t=2 months, near t=4 months, and near t=6 months. (Hint: recall the definition of slope = Δy/Δx, use near to mean Δx to be 0.1. Show that the slope is always proportional to the value of N at that point, and find the constant of proportionality.
Regular Homework Set #6(continued) • For a savings account with an initial deposit of $1,000 and an interest rate of 6% compounded daily, assuming no withdrawals or deposits, what will be the amount of the account after: a) 1 year; b) 3 years; c) 10 years. • What is the APR for a loan that has a 15% annual interest rate that is compounded weekly?
Regular Homework Set #6(continued) 6. a) Give one physical or financial example of a linear function: that is, specify a quantity for y, x, m and b where y is related to x in such a way that y(x) = mx+b expresses that relationship.b) Give one physical or financial example of a quadratic function.c) Give one physical or financial example of an exponential function.
Logarithms If we can go forward with exponentials, we should be able to go backwards – that is, we expect that there will be an inverse relation. And since the exponential function is a one-to-one function, its inverse will be a function also. That inverse function has a name, called a logarithm. But just like exponentials can have any base, the logarithms (logs) also need to have a base specified. The most common bases, as we saw before, are base 10, base 2, and base e. log10(10x) = x; log2(2x) = x
Logarithms Can you find the log keys on your calculator? There should be a log key (which is base 10 unless otherwise specified), and an ln key (which is base e). Note: When we write log(x) without specifying a base, we assume the base is 10. When we write loge(x), we usually write it as ln(x).
Logarithms Since logs are inverses of exponentials, we should be able to get a qualitative feel for the function by looking at a graph of the function. If you plot the graph of an exponential, try the simple ex, you can approximately draw the ln(x) curve by recalling that the inverse function should have a graph that is mirrored in the y=x line. Since the exponential function, y(x)=bax is never negative, what does this say about the inverse function, x(y)?
Logarithms y(x) = exln(ex) = xy(x) = ln(x) Check: y(0) = e0 = 1 so blue curve crosses the y axis at 1;y(x) = ln(e0) = ln(1) = 0 so red curve crosses the x axis at 1. Check: y(-10) = e-10 = .000045 so blue curve approaches the x-axis on the left;y(x) = ln(e-10) ≈ ln(.000045) = -10 so red curve approaches y-axis as x approaches zero. Check: y(+10) = e10 = 22,026so blue curve grows much faster than y=x curve;y(x) = ln(e10) ≈ ln(22,026) = 10 so red curve grows much slowerthan y=x curve. Note that ln(-x) is undefined!
Logarithms y(x) = exln(ex) = xy(x) = ln(x) y(x) = e-x = 1/exy(x) = ??? But what about y(x) = e-x ? This function is the mirrorimage of ex through the y axis. For both the growingand the dying exponential, y is always greater than 0. What does the inversefunction look likehere?
Logarithms y(x) = exln(ex) = xy(x) = ln(x) ln(e-x) = -x, so x = -ln(e-x) y(x) = e-x x= -ln(e-x)y(x) = -ln(x) Since e-x is the mirror imageof ex through the y axis,the inverse will be y(x) = -ln(x) which isthe mirror image ofln(x) through the x axis. Note that since y was alwaysgreater than zero for the exponential, the log function only works for x>0.
Logarithms y(x) = exln(ex) = xy(x) = ln(x) What if we replace x with a*x? Should this be true? y(x) = ea*xln(ea*x) = a*x It should! But what does this indicate?ln(ea*x) = ln[(ex)a] = a*ln(ex) = a*x We’ll see in the next slide that this is one of the rules of logarithms. The effect of the constant a is simply to compress or expand the x axis for the exponential, and if a<0, it reverses the direction of the exponential (from growing to decaying)!
Logarithms Rules for logs: Let A = Ba and C = Bc (B=base; a is exponent of B for A, same for c & C), then since A*C = Ba * Bc = Ba+c , logB(A*C) = logB(Ba+c) = a+c = logB(A) + logB(C) . Similarly, since B-c = 1/Bc = 1/C,logB(A/C) = logB(Ba-c) = a-c = logB(A) - logB(C) . Since Aw = (Ba)w = Ba*w, logB(Aw) = logB(Ba*w) = (a*w), but a = logB(A), so logB(Aw) = w*logB(A) .
Logarithms Since we can have different bases (such as 2, e, and 10), there should be a way to convert from one base to another. Note that 2a = 10, so log10(10) = 1 = log10(2a) so 1 = (a)*log10(2), or a = 1 / log10(2) . In general since 2a = 10, we have: (2a)b = 10b= 2a*b= 2c . Log10(10b) = b = log10(2c) = (c)*log10(2) Therefore, we have b = c*log10(2).
Logarithms Let’s do this in general. Instead of using 2 and 10 raised to the a and b powers, let’s useAa = Bb. Log10(Aa) = a*log10(A) = log10(Bb) = b*log10(B), or ln(Aa) = a*ln(A) = ln(Bb) = b*ln(B), Therefore, b = a*log10(A)/log10(B) = a*ln(A)/ln(B) . Example: 27 = 10x , solve for x:x = 7*log10(2)/log10(10) = 2.107x = 7*ln(2)/ln(10) = 2.107
Logarithms Example: log(5x) = 21; find x:To get the x out of the log, we take the inverse log of both sides: 10log(5x) = 1021 = 5x. This means that 1021 = 5x, or x = (1/5)x1021 = 2 x 1020 . Check: log(5 * 2 x 1020) = log (1021) = 21. Example: ln(5x3) = 45: find x:We could work it out similar to the one above, or we could play with some rules:ln(5x3) = ln(5) + 3*ln(x) = 45; ln(x) = [45 – ln(5)]/3 = 14.464, x = e14.464 = 1.91 x 106 . Check: ln(5 * [1.91 x 106]3) = ln(3.48 x 1019) = 45
Logarithms Example: log(2x) + log(3x) = 21. Solve for x:Using log(a) + log(b) = log(ab), we have:log(2x) + log(3x) = log(6x2) = 21. Now we get the 6x2 expression out of the log by taking the inverse log function of both sides: 6x2 = 1021. x = SQRT[1021/6] = 1.29 x 1010 .Note that we can only use the + solution, not the negative one! This comes from the operation: log(a) + log(b) = log(ab); even though (-a)*(-b) = ab, we can’t have log(-a) or log(-b).
Logarithms Example: Given an interest rate of 6% that is compounded continuously, how long will it take for the initial amount to double?
Logarithms Since the interest rate is compounded continuously, we use the exponential function: N(t) = Noea*t where a is related to the rate of 6% per year: a = 0.06/year: N(t) = Noe(0.06/year)*t . We want the time, T, when N(T) = 2(No): Therefore, we have the equation: 2*No = Noe(0.06/year)*T . How do we solve for T since it is in the exponent?
Logarithms 2*No = Noe(0.06/year)*T To bring the exponent down, we use logs, and since we have a base of e, we use the ln function: ln(2) = ln(e(0.06/year)*T) = (0.06/year)*T. Now solving for T: T = ln(2) / (0.06/year) = 11.552 years.This particular time is called the doubling time.
Logarithms A similar kind of thing happens with a decaying exponential. In that case, we call this particular time the half life: (1/2)*N = Noe-a*T Proceeding as we did before, ln(1/2) = -a*T, but we recognize that ln(1/2) = ln(1) – ln(2) and again recognizing that ln(1) = 0, we have T (half life) = ln(2)/a .
Logarithms Example: The voltage across a capacitor connected to a resistor decays exponentially with time according to the equation:V(t) = Vo e-t/RC where Vo is the initial voltage, R is the resistance (in ohms), C is the capacitance (in Farads), and t is the time. a) How long will it take the voltage to reach 5 volts if it started at 25 volts, given that the capacitance is 2 microFarads and the resistance is 50 ohms? b) How long will it take if the resistance is reduced to 10 ohms? (Note on units: an Ohm*Farad = second)
Logarithms (example cont) V(t) = Vo e-t/RCa) 5 volts = 25 volts * e-t/[50*2x10^-6 sec] Divide both sides by 25 volts: 0.2 = e-t/[50*2x10^-6 sec] (note that the units of Volts cancel) Get the t out of the exponent by taking the ln of both sides: ln[0.2] = ln(1/5) = ln(1) – ln(5) ;since ln(1) = 0 we have: – ln(5) = -t/[50*2x10^-6 sec] ;canceling the minus sign on both sides gives: t = ln(5) * [50*2x10^-6 sec] = 1.61 x 10-4 s = 161 microseconds = 0.161 milliseconds = t.
Logarithms (example cont) V(t) = Vo e-t/RC b) To do part b, we could solve it as we did for part a, but we can also just look at the relation. By decreasing R from 50 Ohms down to 10 Ohms, t is going to also have to decrease by the same factor of 1/5 if the exponent is to remain the same. Thus the answer to part b is simply 1/5 that of part a), t = 161 microseconds/5 = 32.2 microseconds.
Logarithms Example: Solve for the following equation for x: log(x+2) + log(2x+3) = 5 . We have x inside two different terms. It would be nice to try to get x inside just one term. Recall that log(a) + log(b) = log(a*b): log(x+2) + log(2x+3) = log[(x+2)(2x+3)] = log(2x2+5x+6) = 5. Now we undo the log: 2x2+5x+6 = 105 = 100,000. Now we can solve this using the quadratic formula. Are there two answers? (Remember that we can’t take the log of a negative number!)
Computer Homework You should be able to do the seventh Computer Homework assignment on Logarithms, Vol. 0, #6.
Regular Homework Set #7(continued on the next slides) • Log (7x3) = 21; solve for x. • Solve for x: a) 211 = 10x ; b) 103 = 2x ; c) 0.2 = 2x. • Solve for x: a) log(x) + log(2x) = 7 ; b) log(x+2) + log(2x+3) = 5 • Given N(t) = 50*2(1/2months)*t , how long will it take for there to be: a) 1,000 rabbits (that is, solve for t when N = 1000 rabbits);b) 20,000 rabbits; c) 2 rabbits? • Given an initial deposit of $1,000 and an interest rate of 6% compounded continuously, how long will it take for the amount of the deposit to reach a) $2,000; b) $4,000; c) $10,125 ?
Regular Homework Set #7(continued from previous page) 6. If you double the interest rate from 6% to 12%, will the doubling time: [double, be only half as long, increase but not double, decrease but not by half, stay the same]. 7. Uranium decays into lead, and it has a half life of 4.5 x 109 years. If a deposit of uranium has 60% uranium and 40% lead, if we assume that the uranium was initially 100% uranium and 0 % lead, how old is the uranium deposit?
WebCT Test #3 You should be able to do the third WebCT test now.