Stony Brook MAT 122 Fall 2017
Lecture 25: Exponentials and logarithms
October 25, 2017

Start   Ok, so, wrote the midterm.
I sent the midterm to the three TAs, said, "What do you think?" Two of them, they all think it's fine.
One of them thinks it's a little long, that's the way it goes.
It's too late, we already copied it.
So, I hope the midterm isn't too difficult.
I don't think it's difficult. I think, yes, a couple of the questions are long.
It's basically a bunch of derivatives, do a couple of graphs, couple of tangent lines.
So, what we've been covering.
So, we have one more new topic to do today, and then
0:32Friday and Monday I'll review stuff.
Okay?
As I said, in theory, we'll have that page up Friday that you can look at over the weekend.
But I can't promise, because it's really not under my control.
Depends on what the guy does tomorrow.
Okay, any questions?
Alright, so let's learn something new.
This is one of the easier things we're gonna learn.
I know it'll make you happy.
1:00So, remember I told you, exponential functions are one of the most common functions you run into in the business world.
Things really aren't very often linear In fact, they usually don't, there's not an easy function to describe them all together.
Well, one of the functions that we use is exponential.
So exponential growth, something that's an exponent, exponential growth is a number raised to x.
And, exponential growth is characterized by the amount that you'll have at time 2 depends on the amount that you had
1:30at time number 1.
And the amount that you'll have at time 3 depends on how much you had at time number 2.
So, it's always sort of adding onto itself, or multiplying by itself.
Or dividing. So, if if you have, like, a pond and it has bacteria on it, there's a certain amount of bacteria and then the amount of bacteria you have later depends on how much bacteria you had before.
And then, the amount of bacteria you have at another time will depend on how many you have at a different time.
That makes sense. Alright, so you got reproduction,
2:00what do you call it. Baby. It gets bigger and bigger.
However many cells the baby has at any moment depends on how many it had the previous moment.
Compound interest So a lot of financial functions use exponential functions.
Since finance is a big part of business, you'll get very comfortable with that.
And of course, you'll be using a calculator when the time comes, but you don't really need it for some of this stuff in calculus.
So, exponential functions are y = something, some base raised to the x.
2:34And of course, with mathematicians, you often use the base as e, where e is about 2.718 and so on.
e is one of those magic numbers like pi.
It just seems to show up all over the place.
So you go to the bank, and you get a quoted interest rate at the bank.
What the banks do these days is they do something called "continuous compounding".
3:04So, your money is always earning interest.
It's a tiny amount, but it's always earning.
And, it can be turned into an annual rate.
But it's a, like I said, it's a continuous rate.
And that's calculated with e, which we'll get back into in a minute.
Okay?
But you can do interest annually, semi-annually, quarterly, and so on.
3:30So for example, hang on, I need my calculator for this, So, we have a formula for how you do compound interest.
So, basically all of finance in one minute.
So, the formula for compound interest We're not gonna test this, so you don't really have to write this down.
But you can, or you can just watch.
This is F is how much you'll have in the future.
P is how much you have in the present.
4:02R is your interest rate, and t is time.
Usually years. Okay?
So, you go to the bank, and they say we give you 8 percent annually. Good luck getting that.
Then 0.08 would be your interest rate, and t would be number of years.
If they say we give you 2% quarterly, which is not the same as 8% annually, then your interest rate would be 0.02,
4:32and your period would be in quarters.
So, in fourths of a year.
That make sense?
And we're not gonna do this complicated calculation, because you don't use calculators in the exams and stuff.
But you should understand what's going on.
So, for example, let's say you deposit 1000 dollars in a fund that earns
5:01you can get 6% for the [???].
6%, compounded annually.
And you're gonna leave it there until you graduate, so for 4 years.
Assuming you're a freshman.
Okay?
And say, well, If I put it in for 4 years, the amount I'll end up with
5:30will be 1000 bucks times 1 + 0.06 because my interest rate is 6% for four years.
And that's 1262 dollars and 48 cents.
So you put it in this fund, you do nothing, you come back 4 years later, and you've got 1262 dollars and 48 cents.
That's nice.
You got money for doing nothing except waiting.
6:00Which is, they teach you in finance class there's a value to your time.
So, you valued your time at 6%.
Now, let's say a different fund offers 6% compounded semi-annually.
6:38Okay?
So, for those of you whose English isn't perfect, semi: half a year.
Now, what happens?
Well, the amount you'll have is 1000 dollars, and the semi-annually means is you get your interest twice a year.
In the old days, you did not get your interest until the year had passed.
If you went and you took your money out early, you got nothing. You had to wait
7:01for a full year to get your interest. That's what annually meant.
So semi-annually meant you could get it half a year.
So they give you 3%.
So what we did is we cut the 6% in half, and double the number of years, because it's 4 years. So, that's 8 half-years.
And you got a little more money!
7:34You got 1266 dollars and 77 cents.
So, that's not a lot more money but remember: If it's a billion dollars, it will be a lot more money.
But, it's better than $1262.48; it's 1266.77.
So now, you're smart, and you say, well okay, I'm gonna find a bank that does quarterly.
Four times a year.
So, now my rate is 1000(1 + 0.06)
8:02four times, divided by 4, four times a year.
This make sense?
One person nods their head. Everybody else just looks blankly.
This is 1268 dollars and 99 cents.
So that's even better.
The reason it's better is, each time you get interest,
8:32you're getting interest on money that you have in the bank at that moment.
So, the interest is now earning interest.
In other words, here, you didn't get anything until the end of the year.
And then you got 6%.
Here, at the end of half a year, you got 3%.
So, 30 bucks.
So, the second half of the year, you're getting interest on that 30 dollars.
Now this is quarterly, so at the end of one quarter, you get 15 dollars. In the second quarter, you're earning interest on that 15 dollars.
In the third quarter, you earn interest on two sets of $15.
9:02And so on.
So, you earn a little bit more interest.
You say, alright, I'm smart, I'll find a bank that does daily interest.
By the way, up until the 90s, banks often used a 360 day year.
9:32They used 12 months of 30 days each.
Which, you say, how's that possible?
Well, just play with the numbers. There were days when you didn't earn any interest.
February, you got an extra two days of interest.
But over the course of the year, you only got 360 days, instead of 365.
Banks make billions of dollars off of that number Remember, they're not your friends.
Okay?
It's kind of like when you go to Las Vegas.
They don't build those casinos because you're going to win.
10:00This, you made it all the way to 1271 dollars and 22 cents.
Ok. So now the magic thing.
So, somebody else comes along and says, I'll just pay you interest all the time.
It'll be infinite.
So, this will become infinity.
And then you sort of have a problem, because what you're doing is you're taking your rate, and you're doing it infinitely often, to an infinite amount of time.
So what happens?
10:30Because if this is infinity, and you do the limit, right? You do the limit as n goes to infinity But if n goes to infinity, this becomes 0.
And 1 + 0 is just 1.
So, 1 to the anything is 1, even if it's infinitely often.
So, there is a tiny little piece there.
So, how do you figure that out?
So, Euler, E-U-L-E-R, that's why we call this e, Some time, I guess, in the late 17, early 1800s, he figured out what this goes to.
11:01And it always does the same thing, so he said, we'll make up some magic number, and people decided to name it e after his honor.
He may have done it himself, because, you know, he developed it.
So, this will become a new formula Some people call it the "Pert formula".
And that says, now you use e for your compounding.
So you get 1000 dollars e^0.06 for 4 years.
11:33And now, it's just a little bit bigger than 1271 dollars: $1271.25 You go, yay, an extra 3 cents, but as I say, if you add this up long-term, and you had bigger numbers, that 3 cents turns into a real number.
Okay, so that's where e comes from.
And e shows up all the time in
12:00the kind of math you're going to do in the business world.
So, we're going to need to learn how to do the derivative and the integral of e.
Well, integrals later. The derivative of e.
So, calculus time.
This is very difficult, so you're probably going to have to have it tattooed to your body to memorize it.
Ready?
f(x)=e^x. The derivative of f(x) is e^x.
12:36Can you remember that?
You need to write that down?
I hope you can remember.
So, e^x is the function where the derivative is itself.
The second derivative is e^x.
The third derivative is e^x. It's always e^x.
It never changes.
Okay.
So, because mathematicians said, look, we need to find a function, we could use a function where the derivative is itself.
Because mathematicians give us all this complicated stuff.
13:03And it turns out to be e^x.
So that the curve, the tangent line to the curve, wherever you look on the curve e^x, the tangent line at that spot is e^x.
You could prove it, but that's not what we do in this class.
Okay?
And then, there's chain rule. So if we had f(x) = e^(function times x), the derivative is (e^kx) times k.
13:34I'm sorry, if it's a constant. And if it's f(x) = e to some other function, which we call u, this is e^u times du/dx.
We'll do some examples.
You'll have to do a couple of these on the midterm.
14:03f(x) = e^(2x) And the derivative is e^(2x) times 2.
Not too hard. It's because it's chain rule.
So, the outer function is e to the whatever.
So, it's e^(2x). The inner function is 2x.
The derivative of the inside function is 2.
14:30Easy? Not very hard.
What if I gave you f(x) = e^(x^2)?
The derivative is e^(x^2) times the derivative of x^2: 2x.
2x*e^(x^2) So, how do I make this more annoying?
You can't do too much with e, in a good way.
15:00Because you keep getting the same function over and over again.
But let's have you guys practice.
Suppose I said, f(x) = e^x + e^(-x).
Or, I said, f(x) = x^3 times e^(x^3).
Let's figure those out.
Alright, the first one,
15:31derivative.
Okay, first one, the derivative is very straightforward.
Derivative of e^x is e^x.
The derivative of e^(-x) is e^(-x) times -1. Times the derivative of -x.
So it's minus e^(-x).
That's not too difficult, right?
Second one, now you have to use the product rule.
16:05You have x^3, and the derivative of e^(x^3) is e^(x^3) times 3x^2.
So you're gonna multiply by the derivative of the power.
That's a 2.
Oh, we're not done yet. So, product rule.
16:30So first we leave the first function alone, the derivative of the second is e^(x^3) times 3x^2.
And now we do the other way.
Derivative of x^3 is 3x^2, then times e^(x^3).
So, notice, the e^(x^3) sort of survives the derivative.
It doesn't get changed in any way.
They say that e^x is "indestructible", is the phrase. Okay?
So, we could factor that out, and you could have
17:00e^(x^3) times (3x^5 + 3x^2).
You could also factor out a 3x^2.
So if, say, you were finding zeroes, cause we do that, right?
You could pull the e^x out, and the good thing is that e to a function is always positive.
As long as it's a real function.
So, e^(x^3) is always positive, which means it'll never be 0, never be negative. It's always positive.
17:33So if you're finding zeroes, you would only care where (3x^5 +3x^2) is 0.
You wouldn't care about the rest.
Yes. So, you could also, you could pull this out.
This is just the derivative.
That's fine if all we asked for is the derivative.
If we were looking for zeroes, we would probably do this:
18:01Then you have a zero at 0, and you have a zero at -1.
You also have some imaginary zeroes, and complex zeroes.
I'm not going to give you any graphs with e.
It's too hard, so it's not necessary for this course.
Okay?
So you'll be able to do the derivative.
Good. Let's do a quotient rule one.
Suppose we had
18:37something like that.
Remember, even if I don't ask you to graph it, I still might ask you to find the zero.
Or, you might have to find a second derivative.
If you have to find the second derivative, say with this, this form would probably be the best.
19:00Because it's 2 terms, and you just do product rule.
Here, this is the triple product rule, which is, messy.
So, it would probably be better to go with the top one.
In the first one, you have 2 sets of product rules. That's not fun.
Alright, quotient rule.
f'(x) equals bottom function times derivative of the top function minus top function times derivative of the bottom function,
19:34which is just e^x.
Over (e^x)^2, also known as e^(2x).
So far so good?
And what can you do with that? Well, you can pull an e^x out of the top, and you'd be left with (3x^2 - x^3 + 1).
20:04And on the bottom, we have (e^x)^2, so we can cancel an e^x.
And our derivative will be (3x^2 - x^3 +1)/(e^x).
So if I had to do the second derivative, you could take it from there.
Remember: why do we do first derivative?
To find out if a function is increasing or decreasing.
20:30Second derivative for concavity.
It has other uses too.
Finance uses a lot of third derivatives.
So far so good?
e^x is not more difficult than this.
I mean, I could do a really messy derivative, if I wanted to.
But the derivative of e^x is very straightforward.
So, now we're going to do the other way.
We're going to do the derivative of natural log of x.
21:01So for those of you who your logarithms, which might be negative.
If you know that the log base B of x equals A, that's the same thing as saying B^A will give you x.
21:34You use logs. Logs are when you want to work with the power of a function, rather than the function itself.
Which is very useful.
So, the decibel scale. So, your decibels for hearing is a logarithmic scale.
So, if you have something that's 50 decibels, and you have a noise that's 60 decibels, the 60 decibel is 10 times louder than the 50 decibels.
22:04Not 10 more, it's 10 times.
70 decibels would be 100 times louder.
80 decibels would be 1000 times louder, and so on.
So, you're dealing in powers of 10.
And since, it's very hard to graph 10 and a billion on the same axis, right?
That's just, a million is 10^6. Instead, you graph the logarithm.
So you put 1 and you put 6 on the axis.
22:30You just use the powers of things.
It's very useful, because I don't know how much you guys know about decibels Decibels are the intensity of sound So, conversation, I think it's about 60.
So, this is about 60 decibels voice.
You can hear a very, very loud decibel.
You can drop a paperclip, and you can hear it.
Although, you guys, with the plug in your earphones, it's pretty loud.
At 120 decibels, that's about all you can stand.
23:01A jet plane taking off is like 130 or something.
A Led Zeppelin concert is about 120. It gets pretty bad at that point.
So, when you take your earbuds, and you put them in, and you turn them all the way up.
So you're on the subway, and you want to hear, because the subway's loud, it's about 120 decibels.
Which is, sort of, the most you can do without pain.
Your eardrum will start to separate from your ear, once you get to that level and you do it for too long.
23:30That's okay. You can hear the music, which is good, and you're young. So later you'll be deaf, but you got to enjoy the music while you were young But we'll cure that, with stem cells.
But just in case, my hearing is better than the average 20 something year olds, in terms of decibel response.
Not because I'm so good, but because you guys, on the average now, have gotten so bad.
And it's the earbuds. If you were only ears, it's not so bad.
It's the fact that the sound is now that close to your eardrum.
That's the problem.
But, you, know, the buds are very convenient.
24:00Because they're really small.
And now they have those wireless ones that look really cool.
You can lose those at an incredible rate, but they're really cool.
And, when you turn them all the way up, it's really, really a lot of energy very close to that membrane there that's your eardrum.
And, since I was your age once, is that going to affect any of you?
No.
You're just going to keep doing exactly what you're doing.
Which is why the cigarette companies make a lot of money off of cigarettes.
And so on. But, nonetheless, that's decibels.
Earthquakes.
24:31Earthquakes: the Richter scale is a logarithmic scale.
So, an earthquake... We had one here a few years ago.
It was about a level 3, Richter 3.
And so you're sitting in the office, it kind of did this.
So not much is going on.
But you notice. I was like, hmmm... the room is moving.
That's about a 3. A 4 is 10 times as much energy.
So, a 4, the room's gonna move, you're gonna fall over.
5, things start to fall down.
Because a 5 is two numbers more than 3, but it's 10^2, it's 100 times more energy.
25:01Level 6, a 6 Richter is a serious earthquake That's 1000 times more energy than an earthquake of 3.
So, you're being shook 1000 times as much.
Richter 7 is 10000 times as much energy.
You don't ever want to be in a Richter 7 earthquake.
Or 8, God forbid. That's 100000 times.
I mean, mountains fall down with that kind of earthquake.
It looks like a small number, but it's very big.
Because it's 10 to the power each time.
25:31Acids and bases, if you take chemistry.
Fortunately, almost none of you won't have to take chemistry.
7 is neutral, 6 is acidic, 5 is more acidic.
Again, it goes up by 10 each time you change the number.
So that's the logarithmic scale.
It's really just for convenience.
Because otherwise, you have to graph these tremendous numbers all in one graph.
It's very difficult.
So, we use logarithms a lot in math.
And, I won't really derive them.
Natural log is what we use.
26:01So, natural log is base e.
So instead of writing log base e of x, we write ln, which is the French "log naturel".
The natural log.
It's pronounced log, but you guys will pronounce it with something like "lean".
Because you tend to mangle it.
You can pronounce it however you want.
In general, if you say "log" to me, I will be thinking log base e.
26:31Not log base 10.
But, now, by the way, decibels and earthquakes and stuff are in base 10.
But, most of what you will encounter in the business world or the physical world that's logarithmic will use base e.
You'll see why in a second.
And you can convert any log to base e.
And when we do a little more with e^x.
Again, you can convert anything, from different base to e^x.
It just takes a little fiddling. Okay?
So, natural log of x shows up in lots of applications as well.
27:03Alright, let's do some derivatives.
If f(x) is the natural log of x, then f'(x) is 1/x.
That's not too hard.
27:30And now to make it more entertaining, if f(x) is ln of a function, we'll use u to stand for a function, then the derivative.
The simplest way to do it is, write a fraction bar, put the function on the bottom and the derivative of the function on top.
For example,
28:04say f(x) is ln(x^2 +1) Oh, some handy things about logs.
You cannot take ln(0), you cannot take the log of a negative number.
So what you're taking the log of always has to be positive.
The log can be negative, so what comes out can be negative.
But what goes in always has to be positive.
28:34And, by the way, fun fact: ln(1) is 0.
So ln, natural log, and e^x are inverses of each other.
I'll go back to that in a minute. Okay?
So, x^2 +1 is always going to be positive.
So we're safe.
So, the derivative is I draw the fraction bar x^2 +1 on the bottom, derivative of x^2 + 1 goes on top.
29:07If I had that, ln(x^3 - x^2), the derivative is function on bottom, derivative on top.
29:33Which can be simplified, though. You can pull some x's out and cancel.
Suppose I want to do ln(sqrt(x)).
30:00Well, here's something you've probably forgotten from your precalculus days.
But the log of the square root is the same as saying the log of x^(1/2).
And if you remember your log rules, that's 1/2 times ln(x).
And we haven't done the derivative yet.
You can use the rules of logarithms to rewrite this as something easier.
So, now the derivative is just 1/2 times 1/x.
30:36So if you did this the hard way, you would end up in that spot with more work.
Som one of the nice things about logarithms is this power formula or rule: one of the log laws.
It enables you to take something messy, and turn it into to something simpler.
Alright, so a few things about logs and e:
31:03As we said, logs and e^x are inverses of each other.
You should know that ln(e^x) gives you x, and e^(ln(x)) gives you x.
So, for example,
31:30ln(e^5) is 5.
And e^(ln(2)) just comes out 2.
So they invert each other.
It's kind of like square and square root.
So, when you have an equation and you want to go the other way, say you have the equation
32:00e^x = 10, you want to get rid of that e.
You take the log of both sides, and the log and the e cancel, and you get x = ln(10).
Good?
It's well, because they're inverses of each other.
32:30Right. Like I said, the log of e^x just gives you x.
So, if you take the number x, and you do e to it, and you take the natural log, you get back where you started.
So, inverse function is, you have some function, and then you do the inverse of that function, you get back the x.
So, like cube and cube root.
You take 5, you cube it, You get 125.
You take the cube root of 125,
33:02You get back to 5.
So, e^x an ln will undo each other.
Makes sense? If you had ln(x) = 20, then this would become x is e^20.
You do e^x of both sides.
33:31How we doing on these?
A couple of other things to know, as I said a minute ago, ln(1) is 0, so e^0 is always 1.
The natural log of e is 1 because that's just the rule where x is 1.
I think that's all the ones you have to memorize.
But make sure you know it, talking about memorization.
34:01Alright, so one last thing about logs and e, logarithms and exponentials.
I know I'm going a little fast, that's so we'll have more time to do reviews.
What if they don't give you e^x?
What if they give you some other number to the x?
They just gave you B^x.
Can you do the derivative?
34:33It's just B^x, just like before, times ln(B).
So, for example, if I had f(x) is 10^x, then the derivative is 10^x times ln(10).
And what's the natural log of e?
ln(e) is 1, so that's why with e^x,
35:00you don't have this second term.
So, you can take any base other than e, and just by playing with the logarithm, you can end up back with a function of e.
That's why you don't really need the other bases.
So, we don't really spend any time on them.
I won't test that.
And similarly, if you have log base B of x, and you want to do the derivative,
35:32it's 1/x * 1/(ln(B)).
So as I keep saying, with a little adjusting, you can take anything else and turn it into base e.
So, if you wanted to take the Richter scale, you could re-do the Richter scale in terms of e.
By the way, the hurricanes an the tornadoes, that is not a logarithmic scale.
36:00The damage might be logarithmic, but the Category 1, 2, 3, 4, 5, that's linear.
You just break a certain wind speed, and you move up a Category.
And the Fujita scale for tornadoes, F1 through F5, you go up one and it just a linear scale.
But, I said, I don't know the damage difference.
So, a hurricane with 90 mile per hour winds, and a hurricane with 100 mile per hour winds, it's 10 more miles per hour, but it's a lot more damage.
36:30Ok, so, say we had f(x) is ln(x).
Then the derivative is, I mean common log. Sorry. It's 1/x times 1/ln(10).
So we're going to use e in a bunch of ways.
We're going to use exponentials in a bunch of stuff after the midterm, but not before the midterm. I don't think it's necessary.
There's already enough material to cover.
37:01How do you feel about this stuff so far?
Not too bad? One of the easier things we've done.
Still, the worst stuff is still graphing.
Well, you'll see that get worse. Maximum and minimum.
Alright, that's enough for today.
We'll see everybody on Friday.