 Welcome back to our lecture series, Math 1220 Calculus II for students at Southern Utah University. As usual, I'm your professor today, Dr. Andrew Misseldine. This is the first video for lecture 48 in our series and is the official end of our series, in fact. Woohoo! We made it to the end here. Now, when you're looking at this channel, you might actually see some additional Calculus II videos attached here. Middly, those are sort of like optional, fun topics that continue on this discussion of Calculus II, but for your standard semester of Calculus, this is how far we get here. And so this final lecture 48 is based upon section 11.10 from James Stewart's Calculus textbook about applications of Taylor polynomials, and we've seen Taylor polynomials already. So a Taylor polynomial is the Taylor series, which you stop after in spaces, right? So suppose that a function is equal to its Taylor series, which is given here. The sum, where n equals 0 to infinity of the nth derivative of f, evaluate the center a divided by n factorial times the by x minus a to the n. This is the Taylor series. And so if one was to approximate a Taylor series, we would use a partial sum that stops at the nth spot. And as this is a power series, if you stop at the power of n, you get a polynomial, and this is what we refer to as the Taylor polynomial. So tn of k will be the finite sum where k ranges from 0 to n of the same expression here, the kth derivative of f, evaluate at the center a divided by k factorial, Taylor's coefficient there, and then times that by x minus a to the k, and then expanded form, you get something like the following f of a plus the first derivative of a divided by one factorial times x minus a plus the second derivative of a divided by two factorial times x minus a squared, et cetera, et cetera. And so I want to mention that this is a good opportunity to kind of stop and evaluate what we've done in this series, right? And so as far as functions go, polynomials are pretty much the ideal functions to work with, right? They're defined for all real numbers. They're continuous. They're differentiable. They're integrable. Also techniques used by man or machine to evaluate a polynomial for any given value of x, these techniques are much, much, much, much, much, let me say one more time, much easier and simpler than almost any other function. Basically, all of the functions want to be polynomials. And so one advantage of using Taylor polynomials is that while not every function is equal to a polynomial, most of the functions we care about in calculus are approximately equal to a polynomial. That is, it turns out that difficult to compute differentiable functions like e to the x and natural log of x sine cosine can be closely approximated using polynomials, these so-called Taylor polynomials. And so these can be a tool to help us calculate approximations of these more difficult transcendental functions amongst other things. I mean, we can use Taylor polynomials for many applications, but in this final lecture, we're going to talk about approximation that is some numerical analysis using Taylor polynomials. So the idea here I should mention is that as n goes to infinity, since f of x is equal to its Taylor series T of x, as n goes to infinity, T sub n of x will be approximately the same thing as T of x, which is equal to f of x, that's to say kind of cut out the middleman, the function will be approximately equal to its Taylor polynomial. And so we can estimate a function using Taylor polynomials. In which case, like we see in this example right here, we're going to use a Taylor polynomial to estimate 1 divided by 0.98. And we're going to use a Taylor polynomial of degree 4 to do this estimate. So how are we going to do that? We have a function in play. And so the function we're going to select is our typical geometric series, f of x equals 1 over 1 minus x. To see why this is a good choice here, notice that 1 over 0.98. That's the same thing as 1 over 1 minus 0.02. And therefore this tells us that the number we're trying to approximate here is approximately the same. Well, I mean it's exactly equal to f of 0.02. And so we can estimate this using that function f. That's why the function comes into play here. Now, because this function 1 over 1 minus x is a geometric series, we actually know that our function 1 over 1 minus x is equal to the geometric series where it ranges from 0 to infinity of the sum x to the n. Now, this is only valid on the interval of convergence, which for this geometric series would be from negative 1 to 1. Now, notice here we're evaluating the function at 0.02. That is within the interval of convergence. And arguably 0.02, did I say 0.01 earlier? I meant to say 0.02. Arguably this value is close to the center of the power series. The closer you are at the center, the better, the more accurate the calculation will be. So the degree for Taylor polynomial for this function, since this series is just 1 plus x plus x squared plus x cubed, you're just taking powers of x coefficients always 1. The degree for Taylor polynomial would be this friend right here, 1 plus x plus x squared plus x cubed plus x to the fourth. We could find higher Taylor polynomials if we wanted to, but we'll just stop at 4 right here. In which case, if we evaluate the Taylor polynomial at 0.02, that just means replace all the x's with 0.02. This is just a chore of arithmetic, but 1 with enough pencil and paper could do 0.02 squared, 0.02 cubed, 0.02 to the fourth. In fact, I mean, this could be done with a scientific calculator. It would not have much difficulty whatsoever. All of those things would expand, of course, into the following things. And then combining like terms, you get this expression right here. Combining like terms, I'm talking about those decimals. If you just combine, if you add the decimals together, you get 1.02040816. And so this gives us, because this right here is going to be approximately the same thing as f of 0.02, 0.02, which is equal to 1 over 0.98. And so this is the estimate that we get, right? Now, admittedly on this one, 1 divided by 0.98, admittedly 1 over 0.98, you could move the decimal over by 2. And so we're looking at 100 over 98. We could find a decimal for this just using just integer division whatsoever. And if you did that, you would end up with 1.020408163, right? It does keep on going after that. But you could just do regular integer addition, long division, and you could get something like this. So what's the point of the Taylor polynomial? Well, I do want you to compare these things right here, right? So I mean, looking at the digits, 1.02040816, that's where they agree, right? And this one just kind of stopped at that point. What's next? Well, we could pick up by making bigger and bigger and bigger Taylor polynomials if we wanted to, right? We could keep on going, going, going, and we could make much more accurate. Now, the point here is not that this is the best way to compute the number 1 divided by 0.98. Again, integer division would be better there. The point is to illustrate how accurate these Taylor polynomials can be to expressions. We just have to know which function it is to use and how do you evaluate the function to get the number and question. And these things can be very effective tools in approximating calculations like we see right here. Now, I should make one sort of final comment here that this is an estimate, how good of an estimate it is. And this one, we can actually compare it with a more accurate algorithm. Therefore, we can see that it's accurate to 1, 2, 3, 4, 5, 6, 7, 8 decimal places. But when this option is not available to you, we're going to have to use Taylor's inequality. The error is bounded above by m over n plus 1 factorial times the absolute value of x minus a to the n plus 1, where m is bounding above the n plus first derivative of our function on the interval x minus a is less than d. So we have to use Taylor's inequality to help us out in general. We'll see that in the next example. It wasn't necessary in this one here.