hello class i wanted to spend some time with you talking about section 4.1 in chapter 4. so in chapter 4 we are going to shift gears away from the things that we've been talking about in the class and focus on exponential and logarithmic functions you're going to find that these functions are highly useful in science and engineering and they're quite unique so let's start by talking about what is an exponential function some graphs and a co a application of exponentials called compound interest so an exponential is essentially something of the form such that i have a base and i have an exponential okay a variable term that is found in the exponent of the function so in essence as oppo instead of having something of the form like f of x equals two times x which is linear in nature okay now what we're doing is we're taking the variable term and we're putting it into the exponent and what you're going to find is is that this type of behavior is very common in science and engineering there are many many many applications some of which we're going to talk about in this session okay now what's important about these the way that you read these really quick before i move on is that all of these functions here have what we call a base of two and the base is going to mandate how the exponential function is going to grow okay and or decay okay whether it grows or decays depends on the sign of the exponential the sign in front of the x whether it's positive or negative the base is what mandates the rate at which it grows okay that's one way of thinking about it so for example okay if i were to have a function of 2 to the x and i were to rate and i were to make x 30 this would give me a huge number over 1 billion however if i were to take x squared this would give me 900. so the point is is that exponentials have a much different growth rate than functions where i have an exponent that is a constant so the variable term is the base for an an exponent or a quadratic in this case x squared okay now what i'm doing is i'm basically saying that the variable for the variable part of the function is going to be the exponent itself as opposed to the base so this is something that we haven't really looked at up until this point so basically in order for something to be an exponential function it has to be something of the form a to the x and specifically a must be greater than zero okay typically i want x to be a rational number okay sometimes x is going to be something that is irrational okay and we're going to talk about situations like that so you know for example if i wanted to i could find 5 to the root 3 or i could find 2 to the pi that's perfectly plausible i most certainly can do that mathematically there's nothing that prevents me from doing that but from an exponential standpoint as far as how to process the exponential it's just going to give me an irrational number so let me prove to you that this will work if i take 2 and i raise it to the pi power you can see that i do indeed get a value okay but this value is irrational okay and in order for me to really effectively operate on exponentials i really want that exponent to be something like a rational number or something that that i can easily operate on so you can see here that as i approximate root three for example okay in essence what i'm doing is i'm making my result my exponential result more accurate okay so you could argue okay that instead of doing uh you know a to the root 3 you could do a to the 1.7 and then a to the 1.73 and then a to the 1.372 732 and then eventually that number is going to become more and more accurate okay now how accurate do we want to be with exponentials that really just depends on what you're doing however a good rule of thumb is that we do not want to round prematurely or intermittently when we're doing exponential types of calculations where exponentials and logarithms are concerned we want to carry out as many digits as we possibly can so that we are able to fend off round off error okay which is going to be something that you're going to see as a potential source of issues as you're doing these problems so keep as many decimals as you possibly can in your intermittent calculations so for example if i wanted to do 5 to the root 3 i can easily do that i can take 5 and i can raise this to the 3 and then of course take the square root of that and then of course that's going to give me 6.24245082 however if i were to instead look at 5 and then raise that to the 1.732 which is an approximation for the square root of 3 you can see that after two decimal places my results begin to diverge okay so just recognize that when i'm working with exponentials the potential for skew on the accuracy or precision of my answer can become more apparent very quick very quickly okay and that's one of the reasons why we really want to maintain all of our decimals so as a general form my function f of x is going to be a to the x okay and of course we don't really want to look at a situation where a is equal to one okay that's kind of a trivial situation one to any number is just going to be one right so that's kind of an uninteresting type of situation we want a to be greater than zero but we don't want a to be one okay it is possible that a can be a fractional number okay and in those situations we typically have some sort of decay occurring as opposed to growth so that's very possible where we could have a decay situation and we will discover that exponential decay is actually something that we can model very effectively based on the decay of radioactive elements coincidentally if you are a csi and you're investigating a murder or something like that you can use exponential functions to determine the time of death to a very uh you know very precise moment and you'll of course be doing that in order to build a case okay so this is say for the sake of argument you're trying to build a case to establish you know when somebody could have been you know maybe available to do something really bad things like that so of course the choice of my base is entirely up to me you can see that if i have base 2 it's going to be 2 to the x base 3 3 to the x base 10 10 to the x and the choice of the base is going to translate over into what we call a logarithm and we're going to be talking about logarithms later on in this chapter so in order for me to be able to fully understand the logarithm i have to fully understand the exponential and it turns out i'm going to explain this to you later there's actually a connection between exponentials and logarithms that's one of the reasons why we're presenting both of them in this chapter at the same time so let's just kind of do some examples here just to see what happens suppose i want to find f of 5 and f is 3 3 to the x power so this is just going to be what 3 to the 5th and i can do these on my calculator very quickly 3 and then raise that to the 5th power and that gives me 243. i can do f to the pi so i can do 3 and i can raise this to the pi power and of course i'm going to get 31.54 for some irrational number i can even do a negative number okay now be very careful about this okay this is a negative in the exponent okay so this negative does not mean a negative result okay so that's a very very important distinction here that i want to make sure you're aware of so if i take two and or actually if i take three and i raise this to the two to the six six six six six six seven and then i need to change that sign to make it negative point six six six six six seven is two thirds okay in decimal form and that's going to give me 0.4807 so it's going to be very important that we make sure that we are keeping track of not only the decimal but also the sign because that's going to change the answer dramatically if i had done you know three and then raised that to the point six six six six six seven you can see i got 2.08 that's a much different number so the sign of the exponent changes the result dramatically but you'll notice that in both situations i did not get a negative answer and that's what i would expect why because the negative is in the exponent it is not being multiplied by the exponent that's a completely different thing and then finally let's do three and let's raise this to the root two and that's gonna give me four point seven two eight eight seven two eight eight there we go okay so here are my results okay and again calculator is going to be absolutely essential for questions like this and you can see that i'm able to arrive at these results very effectively okay now when i graph an exponential function okay basically the base is what's going to actually mandate the shape of the curve so in the interest of of trying to explain this in the in the most effective manner allow me to do this in excel okay so in essence what i'm going to do is i'm going to graph 3 to the x and then i'm going to graph one-third to the x okay and i want you to see what happens when i do this so let me open a new file here and oh by the way i have no expectation that you're going to be able to do this in excel that is not part of this assignment at all i'm simply doing this for illustrative purposes to show you how the function behaves so let me just set a range of values here and i'm just going to basically do this where i'm adding an increment of 0.1 and i'll go ahead and copy this down so like so okay and now what i'm going to do is let me add a row here at the top i'm going to make this 3 to the x and then i'm going to make this one third to the x okay and these are just labels okay so now let me do 3 and then raise this to this power here and then let me over here do one divided by three and then raise this to this zone and now i can just copy these down the page like so and now let me graph these so you can see what they look like okay so this is the x values this is going to be the value on the horizontal line the first column is the x value the value on the horizontal axis and then i'm going to graph each of these curves just so you can see what they look like in comparison to each other okay and there you go okay so as we expect okay if the number is greater than one the base is greater than 1 i expect to see exponential growth that's the blue curve that you see on the screen if the number is between 0 and 1 then i expect to see exponential decay that's the orange curve you see on the screen so what you see here makes perfect sense okay 3 to the x is going to explode and 1 3 to the x is going to decay to 0. okay so this is exactly what we expect to happen so it's important for us to recognize okay how the curve is going to hay behave based on the base okay the base is kind of what is kind of kind of the driving factor behind the behavior that i'm going to see so here are my curves right here so i so they just kind of created these for me okay and you can see that in these situations here they actually did this a little bit differently than the way i did it you'll notice that on my example i didn't use negative x values okay but on this example they did and that's perfectly okay there's nothing wrong with that so you can see what happens here you can see that this thing basically starts to decay as x gets positive the blue curve okay and then x explodes okay or excuse me f of x explodes for the 3 to the x okay as x gets positive okay so this is exactly what we would expect to happen so the portion of the curve that i did was kind of this portion right here right that's what i did on my picture so it works exactly the same way okay now one of the things that you need to recognize okay when you're looking at comparing the bases is that if i look at three and then i look at one-third i can write one-third as three to the negative one right so in essence what are we doing here if i take 1 3 and i raise this to the x power that's the same as 3 to the negative 1 to the x power and remember when we raise a power to a power we multiply exponents so this is the same as 3 to the negative x so in essence whether it's the base or the sign in front of the exponent remember i talked to you about that earlier that is what's going to mandate our behavior okay so whether whether it's you know the base being something that's between zero and one or the addition of a negative in the exponent that is what's going to mandate what's going on and your and as you can see okay there's a connection between the magnitude of the number okay a number between zero and one as compared to a number that's greater than one and the sign in front of the exponent so if i have 1 3 to the x power that's the same as 3 to the negative x okay so whether the base is going to be something between 0 and 1 or am i going to have a negative exponent okay the result is the same okay i'm just basically looking at it from two different perspectives okay but it did as far as the end result it doesn't matter okay so that's one of the powerful things about exponentials whether i'm looking at it in terms of changing the base the value of the base or i'm looking at putting a negative in front of the sign in the exponential okay so that can too can drive things for me so what happens as i change the magnitude of the base well you can see what happens here okay and this makes sense right as the base gets bigger okay my explosion the positive infinity becomes faster and faster do you see that so here's two here's three here's five here's ten and this is doing exactly what i expected to do as i make this number in the base bigger and bigger as a gets bigger and bigger and bigger my explosion to positive infinity gets faster and faster and faster which is exactly what i expect to see and you see it works the same way with negatives too okay if it's fractional bases you can see here one-half one-third one-fifth one-tenth okay you can see the same sort of behavior okay the smaller the the smaller the fraction again same result the faster i explode to positive infinity okay but i'm going in the opposite direction so this is not a coincidence okay this is what we expect to see so again remember okay by definition if i have a number and i raise it to the zero power the answer's one okay so that's just kind of a definition and then of course we don't allow the number to ever be zero okay so basically if i'm between zero and one okay i'm going to decrease exponentially in a very rapid fashion okay if a is greater than 1 i'm going to increase exponentially in an ever so rapid fashion again this speed at which i explode to positive infinity is going to be based on the magnitude of a the size of a that's what's going to dictate this so this kind of further explains what i just tried to tell you in words okay and you can see here what's happening okay as a of x goes to zero uh a of x is going to zero as x goes to negative infinity so basically um the other extreme works here okay as i as i get closer and closer out here you can see that i'm getting closer and closer to this horizontal line the horizontal axis is what we call an asymptote okay so exponentially speaking will i ever reach the horizontal axis no i won't never okay but i'm going to get so close to it that it becomes indistinguishable so this one here is just more of the same explanation here okay remember that when terms of domain and range okay let's just kind of talk about this in general form if i have a to the x okay what is the domain well the domain is going to be anything right i can put in negative infinity to positive infinity okay however what's the range so this is the domain so what's the range well the range is going to be always 0 to positive infinity right regardless of the exponential okay unless of course i were to introduce a negative in front of here something that is outside the exponential but if i'm only looking at the exponential itself then regardless of whether a is between 0 and 1 or bigger than 1 it doesn't matter my range is always going to be between 0 and positive infinity if i were to introduce a num a negative in front of here well then all bets are off okay so i'm assuming that with regard to this context i am solely talking about a to the x okay so the domain is basically negative infinity to positive infinity and the range is 0 to positive infinity so again this is just another illustration for you again if a is greater than 1 i'm going to explode if a is between 0 and 1 i'm going to decay so we've kind of talked about that so now let's actually determine what the exponential function would be okay so suppose i know i have an exponential function a to the x and i'm given a curve and i'm given points on the curve let's find out what the exponential relationship is so here what what we're being told is that when f of x is 25 okay then a to a to the two x is two and you can see right away what's the answer well a has to be five right okay so therefore this exponential relationship for this function f of x is going to equal to 5 to the x over here same idea okay i'm going to have f of x equals 1 8 and that's going to equal to a and then to the third x is three so now i can write eight as eight to the negative one right and then i can write this as a to the third and now raise both sides to the one-third power okay like so and therefore a is going to equal to one-half so therefore this exponential relationship g of x is going to be one half to the x power and if you try it you see it works if i let x equal three one cubed is one two cubed is eight so i get one eighth it works so the relationship here is between the exponential and the output okay as opposed to the base and the output which is what we've seen in previous examples in the course so this is just an explanation of of how those results come about so let's look at this example here so we have rates of growth for the exponential function 2 to the x and the power function x squared and we want to compare these two by drawing both functions in the following ranges of values okay so now what they want me to do and we can do this in excel okay this is actually very easy to do in excel so and this actually is very intuitive okay because even though we're talking about two varieties of exponentials they are completely different in every respect right so again let me let me copy these x values here like these will come in handy for this exercise and this is going to be x squared and this is going to be 2 to the x so these are completely different so here i'm going to take this value here and i'm going to square it and then here i'm going to take 2 and i'm going to raise it to the x power okay so you can see right off the bat i get a different result so let's copy this down the page there we go and now let's plot these two curves so we can see what's happening and you'll notice okay that i picked some very uh limiting a very very limited range of values here okay why because the exponential is going to explode extremely fast and i want to be very careful about that so basically here is x squared the blue curve is x squared and then x 2 to the x is like this now it turns out that i probably would benefit from from changing this increment slightly so i can see a little bit more of what's going on here so let me actually copy this down the page and give myself a little bit more of a range of values here and let me recreate this graph with this full range of values all the way to three so we can see exactly what's happening here and there we go okay and so you can see what's happening here the blue curve is x squared and then the orange curve is 2 to the x okay so what's happening here well you can see okay that at some point these two curves are going to cross each other right okay when x equals 2 okay they are indistinguishable they're identical two to each other okay which is as we would expect it to but look at what happens afterwards okay notice that the x squared okay starts to take over and starts to increase and the exponential does this now if i were to increase this even more okay i'm going to see an even different behavior so let me copy this down and go even further okay and let me redo the graph with the rest of the values so now i have even more values here to chart and let me create a graph here and look at what happens here now this starts to make more sense to me okay and you can see that down in here i can't even see they're not they're not even distinguishable do you see that but i wanted to show you this okay so that you could see as we would expect that the exponential is eventually going to take over and explode much faster than the x squared which is what we would expect to see okay and if i were to zoom up on this okay i don't know if you can see this or not but can you see what's happening here okay there's actually two points where the curve crosses each other do you see that one is it two and then it looks like it crosses again someplace up here so let's see if we can actually determine exactly where it's crossing the second time so let me remove this and let me scale this back and get rid of these results right here okay because essentially that's that's the problem that we run into okay is that when we're trying to compare two different functions we have to be very careful about what range of values that we pick otherwise it's going to be extremely difficult to see the true behavior of what's happening so this is far more illustrative do you see what's happening here let me expand this out okay and i think you can see what's happening okay the x squared is clearly lagging behind the 2 to the x you see that but then once i reach x equals 2 they cross each other and now the x squared is bigger you see that the blue curve is actually larger than the exponential but then again at 4 look at what happens they cross again you see that and now the exponential starts to take over and the x squared lags behind okay this is what we expect exponentials will always grow faster than quadratics or cubics or any other type of constant exponential form polynomial form that's what i'm talking about exponentials go faster than polynomials is essentially what i'm saying so i expect this behavior so you can see here's what they did here so they actually stop this at two this is the first point where we cross but we know it's going to cross again someplace else and you can see here's where it is at four so again these two cross each other and then the exponent the exponential takes over and explodes much faster so this is kind of the end result of what you see this is actually quite intuitive okay and very useful okay it's very important for me to understand how exponentials behave compared to polynomials they are not the same okay so i'm gonna see a much different behavior so let's talk about an application okay and this is something that um you should all be very familiar with compound interest okay when you buy a house or you buy a car or anything like that if you're if you're doing a loan a home loan or or excuse me a student loan for tuition you're doing compound interest okay back in the 50s and the 40s and 30s they use something called simple interest simple interest is nothing more than i equals p times rate times time the principal amount times the rate that i borrow times the time of my loan but now we use a thing called compound interest compound interest is basically how we loan today okay so perhaps maybe you're aware of how this works if you look at your credit card for instance you'll notice that there's a little area on your credit card where it says if you pay if you wait two months this is how much you pay if you weigh you know if you if you if you only make the minimum payment this is how much you're going to pay and so on right okay so in essence what they're trying to do they're required by law to put that on there now because so many people were waiting and just making the minimum payment and the credit card companies were making a fortune okay so the more the story is is that you want to pay your bill as in in its entirety if you can okay otherwise you're giving money to the credit card company okay credit card companies also make money off of penalties so be careful about that as well so you can see here that basically i have an exponential form here that's going to be based on my interest rate and then it's going to and then of course i multiply by the principle to get the amount of money i'm going to pay so if i let the interest rate be the rate divided by the number of compounding periods okay what i end up getting is my final form which looks just like this so this is basically the compound interest formula okay p is the principal amount r is the interest rate n is the number of times i compound per year and t is the number of years so for a typical car loan or a typical home loan okay the n is going to be 12. i compound monthly and most home loans are for t equals 30 years okay and the interest rate varies okay right now i think the interest rate's like what 3.5 or something like that so the interest rate is awesome right now so if you're interested in buying a home now's the time to do it okay but the banks are very very nervous because of because of the things that are going on in the world right now okay so you're what you'll discover is is that banks will put up financial barriers that will prevent you from actually coming through with the loan so in other words they'll charge you points in order to be able to initiate the loan so just be prepared for issues like that so let's look at this example we have a thousand dollars and we've invested it in an enter in an interest rate of 12 per year that's a great rate by the way you can get 12 per year take it okay especially for an investment not for a loan i'm talking about a situation where it's paying you so that's the great thing about compound interest it works both ways okay you can either have a loan and you pay money out okay you make monthly payments or you loan money you're the bank you loan money and they pay you okay so in situations like that you want the maximum interest rate so you can see how it works here so if i compound and annually then n equals one and you can see that after three years i get 140 1404. if i compound semi-annually that means two compounding periods and it increases to 14 18. quarterly it goes up to 14 25 monthly it goes up to 14 30 and then daily it goes up to 14 33 you'll notice that as i break it into more compounding periods the amount of money that i get paid goes up the amount of money that i get at the end of the loan goes up and that makes sense why because i am building and i'm doing interest on top of interest on top of interest more times one compared to two compared to four compared to 12 compared to 365. now you're probably asking yourself well gee david does that mean that if i have infinite compounding periods that i'm going to make even infinite amount of money well no it's not there's a limiting case there okay there is such a thing as continuous compound okay and continuous compounding is also based on an exponential behavior but there's a limiting case what happens well in essence the amount of change that you see between each period is so teeny tiny in dollar amount that you actually don't make very many gains in terms of increasing your money okay and the reason why is because the change is so small so you do make a game it does make a difference but it doesn't explode the way people think it would so compounding continuously is not the the magic result as you would think it would be so if i have an investment that earns compound interest then i can actually calculate an annual percentage rate okay so this is nothing more than a simple rate of interest okay but basically over one year okay so if i want to do that okay then basically my annual interest rate so if i have a simple interest rate of six percent then my annual interest rate is going to be this number right in here so in essence it's the rate of interest adjusted for the amount of compounding periods so if you look at your credit card your credit card will typically say something like you know seven percent simple interest or seven percent uh simple interest simple rate or something like that it's not simple it's not simple interest rate okay but seven percent but then they'll tell you something like it compounds monthly okay so what is the equivalent uh comp the the equivalent annual percentage rate okay or actually it's not apy it's actually apr right okay that's typically what it is the annual percentage rate okay so what would i do in this case well it's going to be 1 plus 0.07 divided by 12. so i can actually calculate this so let's do it very quickly 0.07 divided by 12. and then if i add that to 1 so basically what's happening here okay i'm getting an apr or annual percentage yield of 1.0058 okay so that's essentially how my money is growing okay so it's not seven percent it's actually much less okay why because it's compounding 12 times during the year so this is the the and the the kind of the equivalent or the annual percentage yield that you're going to see so if i only have what's called simple interest okay notice that there's no exponent okay so simple interest basically means that the exponent is one okay that's the difference so when i compound that's when i add some number here okay and it's actually a function of nt okay the number of compounding periods and the number of years that you have the loan so if it's simple interest okay then it's just going to be okay something where it's just going to be more like a linear behavior as opposed to an exponential behavior okay so i hope this was useful and we will see everybody uh in the class for questions talk to you soon bye-bye