 Welcome to the screencast on section 8.5, Finding a Taylor Series. Up until now we've found a bunch of Taylor polynomials, and in this video we'll see how to take that idea and find the infinite Taylor series that represents a function. So here's our problem. Find the Taylor series for natural log of x centered at x equals 1. It is worth thinking about why is it that we'd want to center this Taylor series at x equals 1 and not, for example, at x equals 0, or even 2. So you can think about that. Right now we're going to use what's given, and also I'm going to remind you of the general formula for the Taylor series for a function centered at a. In this case we know what a is because we're given the center, that's what a means. And so in order to figure out all of the different parts of this Taylor series, I like to lay things out as a table. I realize that the main parts of this Taylor series that I'm going to have to work with are the coefficients in front of the polynomials. So the polynomial part, the x minus a to the k, is going to be relatively simple to write out. It's this derivative evaluated at a and the factorial below it that I'm going to have to work on. And that's what I've got this table laid out to help me calculate. So I'm going to start at k equals 0. And I'm going to calculate the kth derivative of our function. I'm going to evaluate that derivative at the center, which is a or 1. And then I'm going to calculate this entire term, the coefficient for x minus a, which is the kth derivative evaluated at 1 over k factorial. And once I've done that, I'm going to look for patterns to see if I can figure out what the general pattern in this Taylor series is. So for k equals 0, the 0th derivative is just another way of saying my original function, natural log of x. And evaluated at 1, well I get 0. That's a hint about why I might want to center this at 1 and not some other number. And so when I take that and divide it by k factorial, I also get 0. It's worth remembering here that I'm dividing by 0 factorial and that's defined to be 1. So I'm doing 0 over 1 and that's just 0. Alright, my next step, k equals 1. So what's the first derivative of natural log of x? Well it's 1 over x. For compactness and for reasons that you'll see shortly, I'm going to write it as x to the minus 1. It's going to make it easier to take derivatives if I write it this way. When I evaluate that at x equals 1, I just get 1, no surprise there. And so 1 over 1 factorial, that's still 1. So far, pretty simple. I don't really see any patterns developing, but let's check the next one. So here's what the second term of my Taylor series is going to involve. I need another derivative of natural log of x. So I need the second derivative. Well that's just the derivative of x to the minus 1. And here's why I wrote it that way. This is written as a polynomial, so I can write this as minus x to the minus 2. It's easier than trying to do a quotient rule or to rewrite a fraction. And evaluating that at x equals 1 is also not too bad. I get a minus 1. But now for the first time, something interesting happens. I'm going to take that minus 1 and divide it by k factorial. Well that's 2 factorial, so I get minus 1 over 2, which is 2 factorial. So I'm starting to see something happen, but it's not quite clear what the pattern is yet. So let's keep going. What if k is 3, the third term of the Taylor series? I need to do another derivative. And again, because I wrote my last derivative in this nice polynomial form, I can calculate this derivative pretty quickly. So I'll get 2x to the minus 3, and make sure you know why it's positive here. When x equals 1, that comes out to just 2. So let's write out what this fraction is. So I have a 2 divided by 3 factorial. I'm going to write that out as 3 times 2 times 1, just to make it clear what I'm doing. And I see a couple of things cancel. Of course, the 1 doesn't make any difference. And so I'm just left with 1 third. Now I think I'm starting to see a pattern. I have 1 negative a half, positive a third. So I think that the next term I get might be 1 fourth. But here's the trick. We've got to make sure. We've got to have a reason for that. So let's actually take a look at the next one. 4. And the next derivative, I'm going to have to bring that minus 3 down. I highly recommend not simplifying. I'm going to bring the minus 3 out and just multiply it by 2, decrease the power, and I'm not going to multiply them together. Because, as we'll see, it'll be easier to see what happens in the final step here. So when I plug in x equals 1 for that, I'm going to get minus 3 times 2 times 1. And sure enough, when I have to go and divide that by 4 factorial in this case, and I move things down to give me a little more space, I'm going to be dividing by a lot of the same factors I've already seen. So I have minus 3 times 2 times 1. And then 4 factorial is 4 times 3 times 2 times 1. Again, a lot of stuff cancels out. The 1's, the 2's, the 3's, and I'm left with minus 1 fourth. And so I'm pretty sure I see what the pattern is now. Let's do one more step. And as we do this, we're going to think about why this would be the general pattern. So here when I take this next derivative, you can see that I'm going to take the 4 and move it down. And then I'm always going to be alternating between a plus and a minus sign. So if we look through the steps I've done so far, it's plus, minus, plus, minus. Because every time I take a derivative, I have a negative power that I multiply out front. And that's going to flip me back and forth between plus and minus. In addition, the numbers out front are increasing, and they're increasing by this factorial pattern. I have a minus 1, a 2, another minus 3. Every time my power has gotten one smaller. And so I'm going to multiply by that power in the next step. So that means that my next step here is definitely going to be 4 times 3 times 2 times x to the minus 5. And when I evaluate that, I'm just going to get the coefficient out front because I have a 1 to any power is still going to be 1. So I'll get a 4 times 3 times 2 times 1. And when I divide this out, and once again I need a little bit more room here, when I divide this by k factorial, so k is 5 this time, and I've noticed that my derivative is just lagging slightly behind it. So in my factorial here, everything except for the 5 is going to cancel out. So I'm going to have a 4 times 3 times 2 times 1 over, and there's 5 factorial, 5 times 4 times 3 times 2 times 1. And everything except for that 5 is going to cancel out, and I'll be left with a 1 fifth. So what we just did is argued through a reason why this pattern is going to continue. Every time I take a derivative, I'm going to get the power left over here down in front, and that'll be 1 larger than the coefficient I already had in front, and then I'll make the power 1 smaller, so the next time through I'll multiply by that smaller power. So that's been a pretty good argument for why this pattern is going to continue. So let's go to the next slide here and summarize all of this. All right, so we found this pattern for the values of the kth derivative at 1, and I noticed that there's a general pattern here. So in each of these steps, I'm going to label the value of k above it. k started at 0, 1, 2, 3, 4, and 5. So at each step, I had a factorial. I was multiplying all the numbers from 1 up to 1 less than my k value. So this looks like what I would call a k minus 1 factorial. But there's a plus and minus in front, and the best way to get an alternating plus and minus is to have a minus 1 to some power. And I noticed that when I've got even powers, I get negative numbers, and when I've got odd powers, I get positive numbers. So the usual way to say that is to raise it to the k plus 1. So if I put in an even number for k, I'm going to get an odd power that will give me a minus 1 and vice versa. So we found a general formula for the kth derivative when x equals 1. And that means now I know how to divide that by k factorial. I've got a minus 1 to the k plus 1, k minus 1 factorial, that's the numerator. And I'm going to divide it by k factorial. But when I write that out, I'm going to write it out in long form here to make sure it's clear. What I'm really doing is doing 1 times 2 times 3 all the way up to k minus 1 in the numerator. And in the denominator, I'm doing 1 times 2 times 3 and so on up to k minus 1 times k. And so I can see that always I'm going to have all of these parts cancel out except for that k left over. And so I'm going to get the minus 1 to the k plus 1 that gives me the alternating sign. And I'm going to have a k in the denominator. And we're going to start this. We don't want to start when k equals 0. But we know that because k equals 0 gives us a derivative of 0, we're not even going to have a first term in this Taylor series. It's just not going to show up. So let's write out what the Taylor series is going to look like. In general, we have the sum. And I'm going to fill in the details of the sum later. This coefficient out front right here is the part that we just calculated right here because a is 1 in this problem. And so I've found that that coefficient is always going to be minus 1 to the k plus 1 over k. Now the polynomial part is the easiest part of this because it doesn't involve any extra special calculations. It's just x minus our a value that's 1 to the kth power. Now where do we start k at? So I notice that my first calculation here when I had k equals 0, I got a 0 coefficient. So that means there isn't going to be a first term and I can start it at k equals 1 and it will go up on to infinity. So this is the general form for my Taylor series. But it's also nice to write out the first few terms by hand just to make sure they look right. So my first term when k equals 1 I'm going to get a 1 out front and an x minus 1 to the first power. My next term, so I'm going to make the note here this is when k equals 1. My next term is when k equals 2 I'm going to get a minus 1 half out front. And the minus comes from me putting in k equals 2 to that minus 1 to a power x minus 1 to the kth power which is 2 in this case. And that's the k equals 2 term. Now let's do a couple more. I'll do it more quickly. I get a 1 third times x minus 1 cubed and minus 1 fourth x minus 1 to the fourth. And at this point I can do plus dot dot dot meaning this continues in the same pattern for a long time. So a couple things that you should make sure you understand about this. Make sure you understand this negative 1 to a power that's a very common way to get an alternating series where we flip back and forth between positive and negative. The factorial's canceled and that's a very common thing that also happens in Taylor series. Finally, we're not really done yet. We've found the Taylor series for this function but we want to know about its interval of convergence and its radius of convergence. And we're going to talk about that in the next video as well as seeing what this actually looks like and how good of an approximation it is for natural log of x.