Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

A special power series is e^x = 1 + x + x^2 / 2! + x^3 / 3! + ... + every x^n / n!

The series continues forever but for any x it adds up to the number e^x

If you multiply each x^n / n! by the nth derivative of f(x) at x = 0, the series adds to f(x)

This is a TAYLOR SERIES. Of course all those derivatives are 1 for e^x.

Two great series are cos x = 1 - x^2 / 2! + x^4 / 4! ... and sin x = x - x^3 / 3! ....

cosine has even powers, sine has odd powers, both have alternating plus/minus signs

Fermat saw magic using i^2 = -1 Then e^ix exactly matches cos x + i sin x.

Professor Strang's Calculus textbook (1st edition, 1991) is freely available here.

Subtitles are provided through the generous assistance of Jimmy Ren.

Power Series/Euler's Great ...

## Related Resources

Lecture summary and Practice problems (PDF)

GILBERT STRANG: OK, I thought I would talk today about power series. These are powers of x. I'm going to keep going. All powers, all those x to the fourth, x to the fifth, they'll all come in too. And my idea is combine them, add them up to get a function of x. So we're doing calculus, but a new part of it, with these infinite series.

So what do I mean by combine them? I mean I'll multiply those powers by some numbers. Let me call those numbers a0. So this first guy will be an a0, and then I'll add on an a1 x. I'm out of x. I'll add on some a2 x squared, some a3 x cubed and onwards. So now I have a function. And that function, let me call it f of x. So here's my starting plan here.

Well, we've seen this for e to the x. Let me remember how e to the x could come, the series for that particular function. So here's the plan. I'm going to choose those a's so as to match-- let me put these words down. I'll match at x equals 0. The function, its derivative, its next derivative, its third derivative, and onwards.

Each a, like a3, will be chosen so that that right-hand side has the correct derivative, third derivative, at x equals 0. So this Taylor series-- Taylor's name is associated with series like this-- everything's happening at x equals 0.

So in the case of e to the x, all its derivatives were the same. Still e to the x. And they all equal 1 at x equals 0. So I want that function to give me 1 for every derivative. That doesn't mean that the a's should all be 1.

Why not? Because when I take the derivative, for example, of this guy, that x cubed, the first derivative, will be 3x squared. The next derivative 6x. The next derivative 6. That's the one I want. That third derivative, but it'll be 6 so a3 will have to be 1/6 to give me the correct answer 1. Let me write those things down.

So what we just did is the derivative of x to the n-th. The n-th derivative. What's the n-th derivative of x to the n? We get to use our nice formula for derivatives. So the first derivative is nx to the n minus 1. The derivative of that will be n times n minus 1 x to one lower power. Keep going, do it n times, and what have you got?

You finally got down to the 0-th power of x, a constant. But what is that constant? It's n times n minus 1, so that n-th derivative will be n from the first, n minus 1 from the second. Keep multiply until you finally get down to 1. And of course, that's called because it comes up often enough to have its own special name. That name is n factorial. And it's written n with an exclamation mark. So that's n factorial and that's the n-th derivative of x to the n.

So for the particular function e to the x, if I worked out its series, all the derivatives I'm trying to get are all 1's. But what the powers of x gives me these n factorials. The a's had better divide by the n factorial. So let me recall the series for e to the x, and then go onto new functions. That's the point of my lecture. So we're getting e to the x in a slightly different way from the original way, but this is a good way. e to the x at x equals 0 is 1. At the first derivative of e to the x is 1, so I divide by 1 factorial. That's 1. But here I have to divide by 2 because the second derivative is 2 and I want those to cancel. And here I divide by-- what do I divide by? 6 because the third derivative is 6. And a typical term is I have to divide by n factorial because when I take n derivatives I get n factorial. The n-th derivative of that thing we just worked out is n factorial. So I divide by n factorial and I've got the derivative to come out 1. And that's correct for e to the x. So that's the plan, matching derivatives at x equals 0 by each power of x. And now I'm ready for a new function. And a nice choice is sine x.

So now on this board, if I can come here, I'm going take a different function. No longer e to the x. My function is going to be sine x. Well, I better figure out all its derivatives. And they're nice, of course. Sine x, its derivative. Can I just list them all? These are the things that I have to match. I'll plug in x equals 0. But let me first find the derivatives. The derivative of sine is cosine. The derivative of cosine is minus the sine. The derivative of minus the sine is minus the cosine. And then I'm back to sine again, and repeating forever. That's a list of the derivatives of sine x. This is my f of x here. This guy, first one.

OK, now I plug in x equals 0 because I want all the derivatives at 0. The whole series is being built focused on that point x equals 0. So at x equals 0, that's easy to plug in. The sine is 0, the cosine is 1, the minus the sine is 0. Minus the cosine is minus 1. The sine is 0. And repeat. 0, 1, 0, minus 1 forever.

OK, so I know the derivatives that I have to match. Now can I construct the power series that matches that?

OK, so that power series will give me sine x, and what will it have? It starts with 0. The constant term is 0 because the sine of 0 when x is 0-- of course, we want to get the answer is 0.

Then, the next term, the x, its coefficient is 1. 1x. No x squared's in sine x. No x squared's. But now minus. Do I have minus 1x cubed? Not quite. Minus x cubed, but I have to divide by 6 because when I take that three derivatives, it will produce 6. So I have to divide by 6, which is 3 factorial. That's really the number that's there. 3 times 2 times 1. 6.

Now the fourth degree term, the x to the fourth is not there. x to the fifth is going to come in with a plus. So there's a plus from this guy. This is x to the 0, 1, 2, 3, 4, 5. x to the fifth. And now what do I divide by now? 5 factorial. 120. And then minus and so on. Minus an x to the seventh over 7 factorial. We have created the power series around 0, focused on 0. And let me remove that 1 because just waste of space.

x minus x cubed. All odd powers and that's because sine x is an odd function. If I change from x to minus x, everything will change sign.

What would happen if I plugged in x equal pi? Suppose I took x equal pi in this formula for sine x. This infinite formula, keeps going forever.

Well, I would get pi minus pi cubed over 6 plus pi to the fifth over 120. It would look ridiculous. But you and I know that the answer would have to come out. The correct sine of pi? 0. I don't plan to do it, but it has to work. OK, so that's the sine. That's the sine. And it's an odd series.

Now OK, good example. Its twin has got to show up here. The cosine. What's the series for the cosine? These are the two series that are worth knowing. You notice here that slope of 1, the big deal about the slope of sine x at x equals 0, the slope is 1. And that does have a slope of 1.

OK, what about the cosine? Well, now I have to plug in. All right, the cosine is going to start here. Cosine minus sine minus cosine. Now my f of x is going to be cosine x. And I need its derivatives. I'm going to have three lines again that are going to look just like these three lines. But they'll be for the cosine. So they start with a cosine. Its derivative is minus the sine. Its derivative is minus the cosine. Its derivative is what? Plus sine and then cosine, and forever, minus the sine. And let me plug in now at x equals 0. This is our system. Find the derivatives, plug in 0. So find the derivative at 0.

Well, the function itself, the 0-th derivative is 1. The first derivative is 0. The second derivative is minus 1. The third is 0. The fourth derivative is plus 1, 0, and so on. It's the same line as we have, but just starting over by 1. Starting with the cosine.

I know what derivatives I want, now I just have to create my series for cosine x, which matches these numbers.

One more time. Just match those numbers with the coefficients that I originally called a0, a1, a2, a3, but now we have numbers.

OK, at x equals 0. So how does this series start? At x equals 0, the cosine of 0 is 1. It starts with a 1. That's the constant term sitting there. The coefficient of x, the linear term is 0. Because the cosine has 0 slope at the start. Then we come to something that shows up. Minus. This will be-- now what are we in to? This is the constant, the first power is gone. The second power minus x squared.

But you know if I'm looking to match the second derivative to make it b minus 1. Right now it's minus 2. Differentiating would give me a 2x and a 2. So I have to divide by that 2 or 2 factorial. Now it's good. Now it matches the correct second derivative minus 1. Then there's no third derivative. The fourth derivative is plus 1 x to the fourth over 4 factorial. And then minus and so on, x to the sixth over 6 factorial. All even powers, so this is an even powers. The 0-th, second, fourth, sixth power. So it's an even function. That means that the cosine of minus x is exactly the same as the cosine of x. We get a nice little insight on these two special groups for which the sine is the perfect example of an odd function and the cosine is the perfect example of an even function.

Well, there's so much here. What happens if I cut the series off? I just want to look at those first terms to see exactly what they represent.

Suppose I stop here after the linear term. What do I have? What is that x just by itself? It's really 0 plus x because there was a 0 from the constant term. That is the linear approximation. That gives me the equation of the tangent line, y equals x, slope 1.

More interesting, cut this one off. Cut this one off here. That's a very important estimate. It's not the exact cosine because the exact cosine has got all these later guys. But don't forget and I should have said this from the very beginning, these n factorials grow fast. And all the series that we're talking about, because those n factorials grow so fast and I'm dividing by them, I can take any x and I get a reasonable number.

If I take x equaled pi, that's this sine series gave me 0.

What do I get if I plug in x equals pi in the cosine series? So the cosine series, if I plugged in x equals pi and had patience to go pretty far, my numbers would be getting near the cosine of pi. Which would be minus 1. I don't see minus 1 coming out. Here is 1, minus 1/2 of pi squared. I don't know, that's around-- 1/2 pi squared might be around 5 or something. But they knock each other off. They get very small and we get the answer minus 1.

OK, so those are two important series and now I get to tell you about Euler's great formula. It connects these three series that you've seen. But to make that connection I have to bring in the imaginary number i. Is that OK? Just imagine a number i. And everybody knows what you're supposed to imagine. You're supposed to imagine that i squared is minus 1. And we all know there is no real number. The square of a real number is always going to be greater or equal to 0. So let's just create a symbol i with a rule, with the understanding that any time we see i squared, I'm entitled to write minus 1.

OK. So now, what is Euler's great formula? Euler's great formula, his brilliant insight was make x in this e to the x series, make x imaginary. Change x to ix. So make it an imaginary number. So can I just take Euler's, take Taylor's series, or oh, maybe Euler's out of this too, because that letter e is his initial. Probably he did. So I guess that's why he found this lovely connection.

So if I take e to the ix and instead of x in this series I put in ix, just go for it. Let x be imaginary. OK, can I write out the series 1 plus-- instead of x I have ix. And then I have 1 over 2 factorial ix squared. And then I have 1 over 3 factorial ix cubes. And 1 over 4 factorial ix to the fourth. That's e to the ix.

OK, you say, you just changed x to ix. That's all I did. Now, here's the point.

Now I'm going to look at this mess and I'm going to separate out the part that is real from the part that's imaginary. I'm going to separate it into its real part and its imaginary part. So what is real in this thing? I see one is certainly a real number. Do you see the other one, the next one that's real? It comes from this i squared. That i squared I can replace by minus 1, perfectly real. So it's minus from the i squared 1 over 2 factorial. x squared is still there. The i squared was minus 1. That's all. And then would come something from the i to the fourth. Because what is i to the fourth? It's i squared squared minus 1 squared. We'd be back to plus 1. So plus sign. Good.

Now comes the part that has an i in it and a single i I have to live with. So that i is multiplied by x. Now I have i cubed. How do I deal with i cubed? i cubed is i squared minus 1 times i. i squared times i is minus i. So I have a minus i. 1 over 3 factorial and the x cubed and so on.

Do you see what we have? Do you see what this real part of e to the ix is? It's the cosine. Right there, same thing. So I'm getting cosine x for the real part and then i times this series. And you can see what that series is. It's the sine series, x minus 1/6 x cubed plus 1/20 of x to the fifth sine x. There is Euler's great formula that e to the ix-- oh, I better write it on a fresh board. Maybe I'll just write it over here.

I'm going to copy from this board my Euler's great formula that e to the ix comes out to have a real part cos x. Imaginary part gives me the i sine x. And I'll write that down. Now let me work here. e to the ix is cos x plus i sine x. And I want to draw a picture. OK, here's a picture.

Actually, Euler often wrote his formula, or we often write his formula because we're taking cosines and sines. Somehow x isn't such-- those are angles. So it's more natural to write-- Now that we've showing up with sines and cosines, it's more natural to write a symbol that we think of as an angle like theta. So you would more often see it this way. I'm just changing letters from x to theta as a way of remembering that it's an angle. And now I'll draw it.

So I have to draw that thing. OK, this is the real direction and that's the imaginary direction. I just go that's the real part. I go cos theta across here. So let that be cos theta. And then I go upwards in the imaginary up or down. So across is the real part, up/down is the imaginary part. Say sine theta I go up. That height is sine theta and that angle is theta. Fantastic. That's a picture of Euler's formula. Well, that's the best way to see it is that beautiful statement. And this is a picture to remind us. We would say that's the complex plane because points have two parts, a real part and an imaginary part. Nothing so complex about that.

Now, before I stop, we've done three important series. Can I mention two more, just two more out of a long list of possibilities? One is the most important series of all, where the coefficients are all 1's. So the coefficients are all 1's. That's called the geometric series. Let me write its name here. That's a Taylor series. That's a power series. And the function it comes from happens to be 1 over 1 minus x. That's the function.

And you will see why, if you multiply both sides by 1 minus x, I'll get 1 here. If you watch, everything will cancel except the 1. So that's it.

Now, there's a significant difference between that series and e to the x. The biggest difference is we're not dividing by n factorial anymore. And as a result, these terms don't get necessarily smaller and smaller and smaller. Unless x is below 1. So we're OK for x below 1. And x could be negative. I can even say absolute value of x below 1, then these terms gets smaller. But at x equals 1 we're dead. At x equals 1 I have 1 plus 1 plus 1 plus 1. All 1's. I'm getting infinity. And on the left side I'm getting infinity also. At x equals 1 blows up.

OK, one more series, then we're done. One more. It's a neat one because it brings in the logarithm. How am I going to get it? I'm going to start with this series, which is the big one, the geometric series. And I'm going to take the integral of every term.

So if I integrate 1 I get x. If I integrate x I get x squared over 2. If I integrate x squared I get x cube over 3. x fourth over 4 and so on. Not 3 factorial, just 3.

And if I integrate this, well, let me put the answer down and then we can take its derivative and say, yep, it does give that. So the answer is minus. This minus sign shows up here as a minus the logarithm of 1 minus x. Because if I take the derivative of that the logarithm always puts this inside function down to the bottom, and then the derivative of the inside function, the chain rule brings out a minus 1, and the minus 1's go away, and beautiful.

So just have a look at that series then for the logarithm. The logarithm of 1 minus x. Again, we're matching at x equals 0. At x equals 0, this function is OK. In fact, at x equals 0, what is that function? Logarithm of 1, which is 0, and there's no constant term. Good.

OK, what comments to make about this final example? This one was OK for x smaller than 1. But then it died at x equals 1.

This one, well, it's getting a little help dividing by 3 and 4 and 5. But that's puny help. That's no way compared to dividing by 3 factorial, 4 factorial, and so on, which will really help. So actually, this series is also only OK out to x equals 1. At x equals 1, it fails again. At x equals 1, what do I have? When x is 1, I have the log of 0 minus infinity. I've got infinity at x equals 1. At x equals 1, this is 1 plus 1/2 plus 1/3 plus 1/4 plus 1/5. Getting smaller, but not very fast and adding up to infinity. So there's a whole discussion. We could spend hours on that famous series, 1 plus 1/2 plus 1/3 plus a quarter and other series of numbers. I wanted to do calculus, derivatives, integrals, so I took functions and series of powers, not series of numbers to illustrate this. OK, good. Thanks.

ANNOUNCER: This has been a production of MIT OpenCourseWare and Gilbert Strang.

Funding for this video was provided by the Lord Foundation.

To help OCW continue to provide free and open access to MIT courses, please make a donation at ocw.mit.edu/donate.

## Welcome!

This OCW supplemental resource provides material from outside the official MIT curriculum.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

Learn more at Get Started with MIT OpenCourseWare