Home » Courses » Mathematics » Single Variable Calculus » Video Lectures » Lecture 38: Taylor's Series
Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
Topics covered: Taylor's series
Note: This video lecture was recorded in the Fall of 2007 and corresponds to the lecture notes for lecture 37 taught in the Fall of 2006.
Instructor: Prof. David Jerison
Lecture 38: Taylor's Series
Lecture Notes (PDF)
PROFESSOR: Last time we left off with a question having to do with playing with blocks. And this is supposed to give us a visceral feel for something anyway, having to do with series. And the question was whether I could stack these blocks, build up a stack so that I'm going to try here up. I'm already off balance here, see. The question is can I build this so that the-- let's draw a picture of it so that the first block is like this. The next block is like this. And maybe the next block is like this. And notice there is no visible means of support for this block. It's completely to the left of the first block. And the question is, will this fall down? Or at least, or more precisely, eventually we'll ask you know, how far can we go?
Now before you answer this question, the claim is it that this is a kind of a natural, physical question, which involves some important answer. No matter whether the answer is, you can do it or you can't. So this is a good kind of math question where no matter what the answer is, when you figure out the answer, you're going to get something interesting out of it. Because they're two possibilities. Either there is a limit to how far to the left we can go-- in which case that's a very interesting number-- or else there is no limit. You can go arbitrarily far. And that's also interesting and curious. And that's the difference between convergence and divergence, the thing that we were talking about up to now concerning series.
So my first question is, do you think that I can get it so that this thing doesn't fall down with, well you see I have about eight blocks here or so. So you can vote now. How many in favor that I can succeed in doing this sort of thing with maybe more than three blocks. How many in favor? All right somebody is voting twice. That's good. I like that. How about opposed? So that was really close to a tie. All right. But I think the there was slightly more opposed. I don't know. You guys who are in the back maybe could tell. Anyway it was pretty close.
All right. So now I'm going-- because this is a real life thing-- I'm going to try to do it. All right? All right. So now I'm going to tell you what the trick is. The trick is to do it backwards. When most people are playing with blocks, they decide to build it from the bottom up. Right? But we're going to build it from the top down, from the top down. And that's going to make it possible for us to do the optimal thing at each stage. So when I build it from the top down, the best I can do is well, it'll fall off. I need to have it you know, halfway across. That's the best I can do. So the top one I'm going to build like that. I'm going to take it as far to the left as I can. And then I'm going to put the next one down as far to the left as I can. And then the next one as far to the left as I can. That was a little too far. And then I'm going to do the next one as far to the left as I can. And then I'm going to do the next one-- well let's line it up first-- as far to the left as I can. OK? And then the next one as far to the left as I can.
All right. Now those of you who are in this line can see, all right, I succeeded. All right, that's over the edge. All right? So it can be done. All right. All right. So now we know that we can get farther than you know, we can make it overflow. So the question now is, how far can I get? OK. Do you think I can get to here? Can I get to the end over here? So how many people think I can get this far over to here? How many people think I can get this far? Well you know, remember. I'm going to have to use more than just this one more block that I've got. Right? Obviously I'm thinking, actually I do have some more blocks at home. But, OK. We're not going to. But anyway, do you think I can get over to here? How many people say yes? And how many people say no? More people said no then yes. All right. So maybe the stopping place is some mysterious number in between here. All right? Well OK.
So now we're going to do the arithmetic. And we're going to figure out what happens with this problem. OK? So let's do it. All right, so now again the idea is, the idea is we're going to start with the top, the top block. We'll call that block number one. And then the farthest if you like to the right, that you can put a block underneath it, is exactly halfway. All right well, that's the best job I can do.
Now in order to make my units work out easily, I'm going to decide to call the length of the block 2. All right? And that means if I start at location 0, then the first place where I am is supposed to be halfway. And that will be 1. OK so the first step in the process is 1 more to the right. Or if you like, if I were building up-- which is what you would actually have to do in real life-- it would be 1 to the left.
OK now the next one. Now here is the way that you start figuring out the arithmetic. The next one is based on a physical principle. Which is that the farthest I can stick this next block underneath is what's called the center of mass of these two, which is exactly halfway here. That is there's 1/4 of this guy, and a 1/4 of that guy balancing each other. Right? So that's as far as I can go. If I go farther than that, it'll fall over. So that's the absolute farthest I can do. So the next block is going to be over here. And 1/4 of 2 is 1/2. So this is 3/2 here. All right so we went to 1. We went to it 3/2 here. And then I'm going to keep on going with this eventually. All right so we're going to figure out what happens with this stack. Question?
AUDIENCE: How do you know that this is the best way to optimize?
PROFESSOR: The question is how do I know that this is the best way to optimize? I can't answer that question. But I can tell you that it's the best way if I start with a top like this, and the next one like this. Right, because I'm doing the farthest possible at each stage. That actually has a name in computer science that's called the greedy algorithm. I'm trying to do the best possible at each stage. The greedy algorithm starting from the bottom, is an extremely bad strategy. Because when you do that, you stack it this way, and it almost falls over. And then the next time you can't do anything. So the greedy algorithm is terrible from the bottom. This is the greedy algorithm starting from the top, and it turns out to do much better then the greedy algorithm starting from the bottom. But of course I'm not addressing whether there might not be some other incredibly clever strategy where I wiggle around and make it go up. I'm not addressing that question. It turns out this is the best you can do. But that's not clear.
All right so now, here we have this thing. And now I have to figure out what the arithmetic pattern is, so that I can figure out what I was doing with those shapes. So let's figure out a thought experiment here. All right? Now the thought experiment I want to imagine for you is, you've got a stack of a bunch of blocks, and this is the first N blocks. All right? And now we're going to put one underneath it. And what we're going to figure out is the center of mass of those N blocks, which I'm going to call C sub N. OK. And that's the place where I'm going to put this very next block. I'll put it in a different color here. Here's the new, next block over. And the next block over is the N plus 1st block.
And now I want you to think about what's going on here. If the center of mass of the first N blocks is this number, this new one, it's of length 2. And its center of mass is 1 further to the right than the center of mass that we had before. So in other words, I've added to this configuration of N blocks, 1 more block, which is shifted. Whose center mass is not lined up with the center of mass of this, but actually over farther to the right. All right so the new center of mass of this new block-- and this is the extra piece of information that I want to observe-- is that this thing has a center of mass at C sub N plus 1. It's 1 unit over because this total length is 2. So right in the middle there is 1 over, according to my units.
All right now this is going to make it possible for me to figure out what the new center of mass is. So C sub N plus 1 is the center of mass of N plus 1 blocks. Now this is really only in the horizontal variable, right? I'm not keeping track of the center of mass. Actually this thing is hard to build because the center of mass is also rising. It's getting higher and higher. But I'm only keeping track of its left and right characteristic. So this is the x-coordinate of it.
All right so now here's the idea. I'm combining the white ones, the N blocks, with the pink one, which is the one on the bottom. And there are N of the white ones. And there's 1 of the pink one. And so in order to get the center of mass of the whole, I have to take the weighted average of the two. That's N times C sub N plus 1, times the center of mass of the pink one, which is C sub N plus 1. And then I have to divide if it's the weighted average of the total of N plus 1 blocks, by N plus 1. This is going to give me the new center of mass of my configuration at the N plus 1st stage.
And now I can just do the arithmetic and figure out what this is. And the two C sub Ns combine. I get N plus 1, times C sub N plus 1, divided by N plus 1. And if I combine these two things and do the cancellation, that gives me this recurrence formula, C sub N plus 1 is equal to C sub N plus, there's a little extra. These two cancel. That gives me the C sub N. But then I also have 1 over N plus 1. Well that's how much gain I can get in the center of mass by adding one more block. That's how much I can shift things over, depending on how we're thinking of things to the left or the right, depending on which direction we're building them.
All right, so now I'm going to work out the formulas. First of all C sub 1, that was the center of the first block. I put its left-ended 0, the center of the first block is at 1. That mean that C sub 1 is 1. OK? C sub 2, according to this formula-- and actually I've worked it out, we'll check it in this thing-- C sub 2 is C sub 1 plus 1 over 2. All right, so that's the case, N equals 1. So this is 1 plus 1/2. That's what we already did. That's the 3/2 number. Now the next one is C sub 2 plus 1/3. That's the formula again. And so that comes out to be 1 plus 1/2 plus 1/3. And now you can see what the pattern is. C sub N, if you just keep on going here, C sub N is going to be 1 plus 1/2 plus 1/3 plus 1/4 plus 1/N.
So now I would like you to vote again. Do you think I can-- now that we have the formula-- do you think I can get over to here? How many people think I can get over to here? How many people think I can't get over to here? There's still a lot of people who do. So it's still almost 50/50. That's amazing. Well so we'll address that in a few minutes. So now let me tell you what's going on. This C sub N of course, is the same as what we called last time S sub N. And remember that we actually estimated the size of this guy. This is related to what's called the harmonic series. And what we showed is that log N is less than S sub N, which is less than S sub N plus 1. All right?
Now I'm going to call your attention to the red part, which is the divergence part of this estimate, which is this one for the time being, all right. Just saying that this thing is growing. And what this is saying is that as N goes to infinite, log N goes to infinite, So that means that S sub N goes to infinite, because of this inequality here. It's bigger than log N. And so if N is big enough, we can get as far as we like. All right?
So I can get to here. And at least half of you, at least the ones who voted, that was I don't know. We have a quorum here, but I'm not sure. We certainly didn't have a majority on either side. Anyway this thing does go to infinite. So in principle, if I had enough blocks, I could get it over to here. All right, and that's the meaning of divergence in this case.
On the other hand, I want to discuss with you, and the reason why I use this example, is I want to discuss with you also what's going on with this other inequality here, and what its significance is. Which is that it's going to take us a lot of numbers N, a lot of blocks, to get up to a certain level. In other words, I can't do it with just eight blocks or nine blocks. In order to get over here, I'd have to use quite a few of them. So let's just see how many it is.
So I worked this out carefully. And let's see what I got. So to get across the lab tables, all right. This distance here, I already did this secretly. But I don't actually even have enough of these to show you. Well 1, 2, 3, 4, 5, 6, and 1/2. I guess that's enough. So it's 6 and 1/2. So it's two lab tables is 13 of these blocks. All right. So they're 13 blocks, which is equal to 26 units. OK, that's how far to get across I need. And the first one is already 2. So it's really 26 minus 2, which is 24. Which that's what I need. OK. So I need log N to be equal to 24, roughly speaking, in order to get that far.
So let's just see how big that is. All right. I think I worked this out. So let's see. That means that N is equal to either the 24th-- and if you realize that these blocks are 3 centimeters high-- OK let's see how many that we would need here. That's kind of a lot. Let's see, it's 3 centimeters times either the 24th, which is about 8 times 10 to the 8th meters. OK. And that is twice the distance to the moon.
So OK, I could do it maybe. But I would need a lot of blocks. Right? So that's not very plausible here, all right. So those of you who voted against this were actually sort of half right. And in fact, if you wanted to get it to the wall over there, which is over 30 feet, the height would be about the diameter of the observable universe. That's kind of a long way.
There's one other thing that I wanted to point out to you about this shape here. Which is that if you lean to the left, right? If you put your head like this-- of course you have to be on your side to look at it-- this curve is the shape of a logarithmic curve. So in other words, if you think of the vertical as the x-axis, and the horizontal that way, is the vertical, is the up direction, then this thing is growing very, very, very, very slowly. If you send the x-axis all the way up to the moon, the graph still hasn't gotten across the lab tables here. It's only partway there. If you go twice the distance to the moon up that way, it's gotten finally to that end. All right so that's how slowly the logarithm grows. It grows very, very slowly. And if you look at it another way, if you stand on your head, you can see an exponential curve. So you get some sense as to the growth properties of these functions. And fortunately these are protecting us from all kinds of stuff that would happen if there weren't exponentially small tails in the world. Like you know, I could walk through this wall which I wouldn't like doing.
OK, now so this is our last example. And the important number, unfortunately we didn't discover another important number. There wasn't an amazing number place where this stopped. All we discovered again is some property of infinite. So infinite is still a nice number. And the theme here is just that infinite isn't just one thing, it has a character which is a rate of growth. And you shouldn't just think of there being one order of infinite. There are lots of different orders. And some of them have different meaning from others. All right so that's the theme I wanted to do, and just have a visceral example of infinite.
Now, we're going to move on now to some other kinds of techniques. And this is going to be our last subject. What we're going to talk about is what are known as power series. And we've already seen our first power series. And I'm going to remind you of that. Here we are with power series. Our first series was this one. And we mentioned last time that it was equal to 1 over 1 minus x, for x less than 1. Well this one is known as the geometric series. You didn't use the letter x last time, I used the letter a. But this is known as the geometric series.
Now I'm going to show you one reason why this is true, why the formula holds. And it's just the kind of manipulation that was done when these things were first introduced. And here's the idea of a proof. So suppose that this sum is equal to some number x, which is the sum of all of these numbers here. The first thing that I'm going to do is I'm going to multiply by x. OK, so if I multiply by x-- let's think about that-- I multiply by x on both the left and the right-hand side. Then on the left side, I get x plus x-squared plus x-cubed plus, and so forth. And on the right side, I get S times x.
And now I'm going to subtract the two equations, one from the other. And there's a very, very substantial cancellation. This whole tail here gets canceled off. And the only thing that's left is the 1. So when I subtract, I get 1 on the left-hand side. And on the right-hand side, I get S minus S times x. All right? And now that can be rewritten as S times 1 minus x. And so I've got my formula here. This is 1 over 1 minus x is equal to S. All right.
Now this reasoning has one flaw. It's not complete. And this reasoning is basically correct. But it's incomplete because it requires that S exists. For example, it doesn't make any sense in the case x equals 1. So for example in the case x equals 1, we have 1 plus 1 plus 1 plus et cetera, equals whatever we call S. And then when we multiply through by 1, we get 1 plus 1 plus 1 plus, equals S times 1. And now you see that the subtraction gives us infinite minus infinite is equal to infinite minus infinite. That's what's really going on in the argument in this context. So it's just nonsense. I mean it doesn't give us anything meaningful.
So this argument, it's great. And it gives us the right answer, but not always. And the times when it gives us the answer, the correct answer, is when the series is convergent. And that's why we care about convergence. Because we want manipulations like this to be allowed. So the good case, this is the red case that we were describing last time, that's the bad case. What we want is the good case, the convergent case. And that is the case when x is less than 1. So this is the convergent case. Yep.
OK, so they're much more detailed things to check exactly what's going on. But I'm going to just say general words about how you recognize convergence. And then we're not going to worry about so much about convergence, because it works very, very well. And it's always easy to diagnose when there's convergence with a power series.
All right so here's the general setup. The general setup is that we have not just the coefficients 1 all the time, but any numbers here, dot, dot, dot. And we abbreviate that with the summation notation. This is the sum a n x to the n, n equals to infinite. And that's what's known as a power series.
Fortunately there is a very simple rule about how power series converge. And it's the following. There's a magic number R which depends on these numbers here such that-- and this thing is known as a radius of convergence-- and the problem that we had, it's this number 1 here. This thing works for x less than 1. In our case, it's maybe x less R. So that's some symmetric interval, right? That's the same as minus R, less then x, less than R, and so where there's convergence. OK, where the series converges.
And then there's the region where every computation that you give will give you nonsense. So x greater than R is the sum a sub n x to the n, diverges. And x equals R is very delicate, borderline, and will not be used by us. OK we're going to stick inside the radius of convergence. Now the way you'll be able to recognize this, is the following. What always happens is that these numbers tend to exponentially fast for x in R, and doesn't even tend to at all for x greater than R. Right so it'll be totally obvious. When you look at this series here, what's happening when x less than R is that the numbers are getting smaller and smaller, less than 1. When x is bigger than 1, the numbers are getting bigger and bigger. There's no chance that the series converges. So that's going to be the case with all power series. There's going to be a cut off. And it'll be one particular number. And below that it'll be obvious that you have convergence, and you'll be able to do computations. And above that every formula will be wrong and won't make sense. So it's a very clean thing. There is this very subtle borderline, but we're not going to discuss that in this class. And it's actually not used in direct studies of power series.
AUDIENCE: How can you tell when the numbers are declining exponentially fast, whereas just, in other words 1 over x [INAUDIBLE]?
PROFESSOR: OK so, the question is why was I able to tell you this word here? Why was I able to tell you not only is it going to 0, but it's going exponentially fast? I'm telling you extra information. I'm telling you it always goes exponentially fast. You can identify it. In other words, you'll see it. And it will happen every single time. I'm just promising you that it works that way. And it's really for the same reason that it works that way here, that these are powers. And what's going on over here is there are, it's close to powers with this a sub ns. All right?
There's a long discussion of radius of convergence in many textbooks. But really it's not necessary, all right, for this purpose? Yeah?
AUDIENCE: How do you find R?
PROFESSOR: The question was how do you find R? Yes, so I just said, there's a long discussion for how you find the radius of convergence in textbooks. But we will not be discussing that here. And it won't be necessary for you. Because it will be obvious in any given series what the R is. It will always either 1 or infinite. It will always work for all x, or maybe it'll stop at some point. But it'll be very clear where it stops, as it is for the geometric series. All right?
OK so now I need to give you the basic facts, and give you a few examples. So why are we looking at these series? Well the answer is we're looking at these series because the role that they play is exactly the reverse of this equation here. That is, and this is a theme which I have tried to emphasize throughout this course, you can read equalities in two directions. Both are interesting, typically. You can think, I don't know what the value of this is. Here's a way of evaluating. And in other words, the right side is a formula for the left side. Or you can think of the left side as being a formula for the right side. And the idea of series is that they're flexible enough to represent all of the functions that we've encountered in this course.
This is the tool which is very much like the decimal expansion which allows you to represent numbers like the square root of 2. Now we're going to be representing all the numbers, all the functions that we know, e to the x, arctangent, sine, cosine. All of those functions become completely flexible, and completely available to us, and computationally available to us directly. So that's what this is a tool for. And it's just like decimal expansions giving you handle on all real numbers.
So here's how it works. The rules for convergent power series are just like polynomials. All of the manipulations that you do for power series are essentially the same as for polynomials. So what kinds of things do we do with polynomials? We add them. We multiply them together. We do substitutions. Right? We take one function of another function. We divide them. OK. And these are all really not very surprising operations. And we will be able to do them with power series too. The ones that are interesting, really interesting for calculus, are the last two. We differentiate them, and we integrate them. And all of these operations we'll be able to do for power series as well.
So now let's explain the high points of this. Which is mainly just the differentiation and the integration part. So if I take a series like this and so forth, the formula for it's derivative is just like polynomials. That's what I just said, it's just like polynomials. So the derivative of the constant is 0. The derivative of this term is a sub 1. This one is plus 2 a sub 2 x. This one is 3a sub 3 x-squared, et cetera. That's the formula.
Similarly if I integrate, well there's an unknown constant which I'm going to put first rather than last. Which corresponds sort of to the a sub 0, term which is going to get wiped out. That a sub term suddenly becomes a sub x. And the anti-derivative of this next term is a sub 1 x-squared over 2. And the next term is a sub 2 x-cubed over 3, and so forth. Yeah, question?
AUDIENCE: Is that a series or a polynomial?
PROFESSOR: Is this a series or a polynomial? Good question. It's a polynomial if it ends. If it goes on infinitely far, then it's a series. They look practically the same, polynomials and series. There's this little dot, dot, dot here. Is this a series or a polynomial? It's the same rule. If it stops at a finite stage, this one stops at a finite stage. If it goes on forever, it goes on forever.
AUDIENCE: So I thought that the series add up finite numbers. You can add up terms of x in series?
PROFESSOR: So an interesting question. So the question that was just asked is I thought that a series added up finite numbers. You could add up x? That was what you said, right? OK now notice that I pulled that off on you by changing the letter a to the letter x at the very beginning of this commentary here. This is a series. For each individual value of x, it's a number. So in other words, it I plug in here x equals 1/2, I'm going to add 1 plus 1/2 plus 1/4 plus 1/8; and I'll get a number which is 2. And I'll plug in a number over here, and I'll get a number. On the other hand, I can do this for each value of x. So the interpretation of this is that it's a function of x. And similarly this is a function of x. It works when you plug in the possible values x between minus 1 and 1.
So there's really no distinction there, just I slipped it passed you. These are functions of x. And the notion of a power series is this idea that you put coefficients on a series, but then you allow yourself the flexibility to stick powers here. And that's exactly what we're doing. OK there are other kinds if series where you stick other interesting functions in here like sines and cosines. There are lots of other series that people study. And these are the simplest ones. And all those examples are extremely helpful for representing functions. But we're only going to do this example here.
All right, so here are the two rules. And now there's only one other complication here which I have to explain to you before giving you a bunch of examples to show you that this works extremely well. And the last thing that I have to do for you is explain to you something called Taylor's formula. Taylor's formula is the way you get from the representations that we're used to a functions, to a representation in the form of these coefficients. When I gave you the function e to the x, it didn't look like a polynomial. And we have to figure out which of these guys it is, if it's going to fall into our category here.
And here's the formula. I'll explain to you how it works in a second. So the formula is f of x, turns out there's a formula in terms of the derivatives of f. Namely, you differentiate n times, and you evaluate it at 0, and you divide by n factorial, and multiply by x to the n. So here's Taylor's formula. This tells you what the Taylor series is.
Now about half of our job for the next few minutes is going to be to give examples of this. But let me just explain to you why this has to be. If you pick out this number here, this is the a sub n, the magic number a sub n here. So let's just illustrate it. If f of x happens to be a sub zero plus a sub 1 x plus a sub 2 x-squared plus a sub 2 x-cubed plus dot, dot, dot. And now I differentiate it, right? I get a sub 1 plus 2 sub a 2x plus 3 a sub 3 x If I differentiate it another time, I get 2 a sub 2, plus 3 times 2 a sub 3 x plus dot, dot, dot. And now a third time, I get 3 times 2 a sub 3 plus et cetera. So this next term is really in disguise, 4 times 3 times 2 a sub 4x. That's what really comes down if I kept track of the fourth term there.
So now here is my function. But now you see if I plug in x equals 0, I can pick off the third term. f triple prime of is equal to 3 times 2 times a sub 3. Right, because all the rest of those terms when I plug in are just 0. Here's the formula. And so the pattern here is this. And what's really going on here is this is really 3 times 2 times 1 equals a sub 3. And in general a sub n is equal to f to the nth derivative divided by n factorial. And of course, n factorial, I remind you, is n times n minus 1 times n minus 2, all the way down.
Now there's one more crazy convention which is always used. Which is that there's something very strange here down at 0, which is that factorials turns out, have to be set equal to 1. All right, so that's what you do in order to make this formula work out. And that's one of the reasons for this convention.
All right. So my next goal is to give you some examples. And let's do a couple. So here's, well you know, I'm going to have to let you see a few of them next time. But let me just tell you this one, which is by far the most impressive. So what happens with e to the x, if a function of f of x is e to the x, is that it's derivative is also x to the x. And its second derivative is also e to the x. And it just keeps on going that way. They're all the same. So that means that these numbers in Taylor's formula, in the numerator, the nth derivative is very easy to evaluate. It's just e to the x. And if I evaluated at x equals 0, I just get 1. So all of those numerators are 1. So the formula here, is the sum n equals to infinite, of 1 divided by n factorial x to the n.
In particular, we now have an honest formula for e to the first power. Which is just e. Which if I plug it in, x equals 1, I get 1. This is the n equals term plus 1. This is the n equals 1 term plus 1 over 2 factorial plus 1 over 3 factorial plus 1 over 4 factorial. Right? So this is our first honest formula for e. And also, this is how you compute the exponential function.
Finally if you take a function like sine x, what you'll discover is that we can complete the sort of strange business that we did at the beginning of the course-- or cosine x-- where we took the linear and quadratic approximations. Now we're going to get complete formulas for these functions. Sine x turns out to be equal to x minus x-cubed over 3 factorial plus x to the 5th over 5 factorial minus x to the 7th over 7 factorial, et cetera. And cosine x is equal to 1, minus x-squared over 2 factorial-- that's the same as this 2 here-- plus x to the 4th over 4 factorial minus x to the 6th over 6 factorial, plus et cetera.
MIT OpenCourseWare makes the materials used in the teaching of almost all of MIT's subjects available on the Web, free of charge. With more than 2,200 courses available, OCW is delivering on the promise of open sharing of knowledge. Learn more »
© 2001–2015
Massachusetts Institute of Technology
Your use of the MIT OpenCourseWare site and materials is subject to our Creative Commons License and other terms of use.