📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Lecture 12

Vishnu Naresh Boddeti1:29:21

Transcription

So now we want to start looking at Taylor series and Taylor approximations. Taylor series and Taylor approximations are heavily dependent on this concept of power series. So we will first see what power series are. We'll build up the intuition for power series and then see how we can express Taylor series and Taylor approximations or Taylor polynomials in the form of power series, using the help of power series.

So first, let's uh start with the definition of what a power series is. So, definition: a series of the form. So, a power series has a specific form. Uh, so it's a series which is of this form: n equal to, it's a sum. It's uh, it's an infinite sum, so going from n equal to 0 to n to infinity, we have a a_n times uh x to the power of n. Okay, so it's a it, this is a series. Um, so this is called a power series, actually called a power series. So if you look at this, uh, this actually looks very much like a polynomial. Um, so if you look at this part over here, you have coefficients uh for a for powers of x. So this pretty much looks like a polynomial. So this is called a power series because we are considering powers of x, and this is called a series because we are looking at uh an infinite sum. So an infinite sum is called a series, and uh, this is just a definition that we have. Uh, there is no guarantee that such an object exists. Uh, so if you look at this, it's a sum and it's an infinite sum, so we have to worry about things like when does it exist, when does it not exist, does it converge, does it diverge, can you even compute it, and so on. Um, so the rest of the uh lecture will be about uh trying to understand under what conditions, um, is this series exists and when it does not exist, uh, and how can you check for whether a series will, given a power series, how can you check whether it will exist or it will not exist.

So we have a theorem, um, that captures a very important theorem about power series and, uh, about a concept of power series called the radius of convergence. So let's, uh, look at what this theorem is. And this theorem is about the radius of convergence. So what this series, what this theorem says, is that for every power series, there is a constant R, which we are going to call as the radius of convergence, uh, such that if the, if the absolute value of x, absolute value of x, is less than this radius R, then the series will converge. Uh, and if it is not less than R, then the series may either diverge or, uh, well, we don't know what will happen, um, in other cases.

So, uh, let's actually formally write this down and then try to parse it. Um, so, so for every, every, every power series, again, the power series is an infinite sum, n equal to 0 to infinity, a_n, where a_n is the coefficient, and x to the N, the power. Uh, so there exists a a constant R. Uh, so this constant will be our radius of convergence, but this constant can be a, it's a non-negative number, so 0 to plus infinity. Uh, this is this constant is called the radius of convergence. So this is the quantity that's being defined in this, uh, theorem, the radius of convergence, uh, such that, so this radius of convergence has to follow some, uh, conditions, uh, such that we have two conditions actually.

The first one here is the series converges, and it converges absolutely. Converges, app, converges absolutely for all x where the magnitude of x is less than the radius of convergence. Okay, so let's actually see what this means. Um, so this, uh, means that the sum, n = 0 to infinity, a_n x to the power of n, actually, hold on, n, modulus x to, the absolute value of x to the power of n, this converges. Which means that the sequence of partial sums, so this is the definition of absolute convergence. So, uh, so the sequence of partial sums, so we'll define a new sequence, this is a sequence of partial sums to be indexed by this n, defined as, it's not an infinite sum anymore, but it's a sum until this capital N. So you have a_n, absolute value of x to the power of n, so this converges in the usual sense of, uh, series convergence of series that, uh, we have seen, convergence of sequences that we have seen, as n tends to infinity. Okay.

And, uh, this statement only says something about, uh, when the absolute value of x is less than R. When the, value of x is equal to R, then we don't know what's going to happen. And when the value of x is, absolute value of x is more than R, then it is very likely going to diverge. Uh, so a warning here, um, it's unclear. So the statement doesn't say anything about what happens when, if the absolute value of x is equal to R. So unclear, um, what happens and the absolute value of x is equal to R. And when it's more than R, then it's very likely going to diverge.

We have, uh, one more statement here in this theorem. Uh, this is that if the absolute value of x is less than R, then the series even converges uniformly. So it's not just converging, but it is converging uniformly. So, uh, this is the theorem about the radius of convergence. Um, so this is the most important theorem about power series. So basically, it defines this quantity R, which is called the radius of convergence, and the, the nice thing or the special thing about this constant R is that if the absolute value of x is less than R, then the series will converge. Um, it's not just converging, but it actually converges uniformly. And when this absolute value of x is equal to this radius of convergence, then we don't know what happens. And when the absolute value of x is more than R, then this very likely going to just diverge. Um, so that's what, uh, this theorem is, uh, trying to say.

So we won't be proving this theorem, but we will look at a few examples of, uh, estimating this radius of convergence and examples of some series which may converge. So this, uh, radius of convergence, it of course depends on the coefficients that you have, a_n. Uh, it's not independent of them, it's dependent on them. So how can we compute this for a given, uh, power series? So let's, let's look at that.

So the, so the radius of convergence, it only depends on the, the, the sequence a_n, which is the coefficients of the power series, and can be computed by, uh, various, uh, formulas. Actually, we'll see two. Uh, so the first one, uh, is this is maybe less useful or less intuitive, but we can see this. So the radius is equal to 1 / L, where L is the limit superior of as n tends to infinity of absolute value of a_n to the power of 1 / n. The other definition, which is probably more useful, practically useful, and we will see examples of using this, uh, this says the radius of convergence is limit n tends to infinity of the ratio a_n / a_{n+1}. And of course, uh, these definitions of radius of convergence, uh, are valid only if the radius of convergence exists. So both of these things, uh, if they exist, of course, if the, if they do not exist, then you cannot compute them through this formula.

So, uh, let's actually look at some examples. Um, so we'll see some examples here. So the first example we'll look at is when P of x is defined as the series, um, sum n equal to 0 to infinity, n to the power of some constant, times x to the N. Okay, so this is for, [Music] some [Music] constant C. So over here, the coefficient, a_n, is nothing but this quantity here. So this will be a_n. And now we want to compute the radius of convergence for this, uh, for this C. So we can use the two definitions above, uh, for computing this radius of convergence. Using the second one would be simpler and more useful in this case. So we'll can try to use that. So R is limit n tends to infinity of a_n / a_{n+1}. So in this case, this would be a limit n tends to infinity of n^ of C / (n+1)^ of C. So this is nothing but limit n tends to infinity of (n / (n+1))^ of C, which, uh, which actually goes to, goes to one.

So now we will see for, uh, different values of x whether this series, uh, converges or not. So we'll consider, um, so the radius of convergence says that as long as the absolute value of x is less than one, then the series should converge. So let's actually verify what happens for other cases. So when, uh, x is +1, so it's exactly the radius of convergence. Again, remember that, uh, when the value of absolute value of x is exactly equal to the radius of convergence, then it's unclear what will happen to this power series. It may converge, it may diverge. It's, it's the theorem doesn't say anything about it. So in this particular case, uh, let's see, uh, what happens. So, uh, we need to also consider a value of C. So let's consider the case where C is minus 1. So in this case, the power series would be 1 / n x to the power of n, and we already know that this has a radius of convergence, convergence radius of one, right? So R is equal to 1. So now let's consider the cases of x. So for x is equal to, uh, +1, the series diverges. And we can see, we'll just see in just a second why. So the series diverges. Why does it diverge? Because if you look at 1 / n x to the power of n, and you substitute, uh, x = 1 in this, so this will be, um, sum of 1 / n * 1 to the power of n, so this is nothing but the sum over 1 / n, so n going from 0 to infinity, and we know that this actually goes to infinity.

Now we can consider another value of x, so x is equal to -1. Again, uh, in this case, it's exactly equal to the radius of convergence. We still cannot say anything, but in this case, if you actually go and check this, this actually converges. So for x = -1, it converges. And for x greater than 1, uh, this thing just, uh, diverges, simply becomes infinity. All right.

So we can consider, uh, another, uh, case where for another value of C. So for example, let's consider the value of C to be equal to 0. So case C is equal to 0. In this case, you have that the series is sum over n to the power of c, x to the power of n. This is for c equal to 0, this is nothing but x to the power of n, and it diverges for absolute value of x is equal to R, and that means for both absolute value, both x = x = +1 and x = -1. So that's one example of a series.

So let's look at another example of a series, by far maybe the most, uh, famous example of a power series. So this is the exponential series. Exponential series, and the exponential series is one series that that is expressed exactly as a power series. Um, so if you have exp of x, which is nothing but, uh, n = 0 to infinity, you have x to the power of n / n factorial, and this has a radius of convergence of R is equal to infinity. That means for any value of R, this is going to, uh, converge. Uh, why, uh, why is this, uh, R equal to infinity? Let's again use the formula that we had. So we look at the a_n / a_{n+1} under the limit when n goes to infinity. So this would simply be 1 / n factorial / 1 / (n+1) factorial. So that would be n+1. And as n goes to infinity, this goes to infinity. So this is a very, uh, famous power series.

And another one, uh, another example, this is a power series, it's got no name, but it, it looks like this. You have n factorial * x to the power of n. So this one has a radius of convergence of zero. Again, you can see why this is the case. You can look at a_n / a_{n+1}, uh, and the limit when n goes to infinity, and this is nothing but n factorial / (n+1) factorial, and the limit when n goes to infinity, which is limit n goes to infinity of 1 / (n+1), and this simply goes to zero. All right. So, uh, this is also another example of a power series. In this case, the radius of convergence is zero. That means for all values of x, basically, this becomes, this diverges. It's not going to converge for, except when x is equal to zero.

Now, uh, as I mentioned earlier in the lecture, the goal for our goal for looking at power series is because we want to use them for Taylor series, and that's really what we want to study. So let's actually see how you go from power series to Taylor series. So this is [Music] from power series to Taylor series. So we, we'll see what the relation between these two are. Okay.

One observation, uh, we're going to start with is the following. To start with an observation, so we are given a special power series. So let's look at a special power series. So given a power series of this particular form, power series which is, um, f(x0 + h) is equal to sum of n = 0 to infinity, a_n h to the power of n. Okay, so this is just a power series. Uh, I'm defining it in, uh, in a particular way over here. So it is f(x0 + h), and I define it this way. So now what we will do is, we'll start taking derivatives of this power series and then see what happens. So let's take its derivative. So we'll start with the first derivative. We have f'(x0 + h), and this would simply be, uh, a0 + a1 h + a2 h^2 and so on. Um, so this, the derivative of that, uh, so the derivative of this will be a1 + 2 a2 h + 3 a3 h^2 and so on. And I can write this as the sum over n = 1 to infinity, n * a_n to h ^ of n-1. Now I can consider, uh, other, uh, derivatives of this as well. So we can consider, let's say, the second derivative of, uh, x0 + h, uh, and so on. So let's consider what the, uh, general case where the k derivative, so F, so the k derivative of x0 + h is going to look like. So this will be sum n = to k to infinity, it will be a_n times n into into (n-1) into (n-2) and so on, up to (n - k + 1) into h ^ of (n - k). So, uh, in particular, we have that, and so we can simplify this. In particular, we have Fk(x0 + h) is is nothing but a_k times k factorial. Um, sorry, this is no, not at this. I give me one second. So in particular, if we basically, we're going to substitute h is equal to 0 into this, then we have the, the k derivative of, uh, F evaluated at 0. That means the value of h is zero. So actually, this is going to be x0 here. So this is simply going to be a_k times k factorial. So when h is equal to 0, all the terms which have h will just become zero, and you'll be left with this constant, which is simply a_k times k factorial. So you can see, simply, uh, state from this as you can extract the coefficient a_k as simply the k derivative of, uh, F evaluated at x0 divided by k factorial.

So what did we do? We started off with a special, uh, peculiar definition of a power series, and then, and, uh, we, in that power series, we did not know what the coefficients were. The coefficients were all this a_n. Um, and we did not know what those were. But now we have been able to express these coefficients in terms of the derivatives of this function. So we have this function, we take its derivatives and evaluate it at a particular point, let's say x0, and that's how you get all these coefficients. So, so you can basically, uh, uh, express this power series in terms of the coefficients, in terms of the coefficients which are, uh, expressed in terms of the derivatives of the function evaluated at a particular point. So here we have a theorem which, uh, puts this more concretely. Um, so let's see what this theorem says. It says that let my function f(x0 + h) be this power series, uh, not f(x), sorry, function f(x0 + h), so I'm evaluating this function, uh, around, uh, sum x0. Uh, so this is going to be n = 0 to infinity of a_n h to the power of n, with R greater than zero. Then for, then for h with absolute value of h less than R, we have f(x), so the function can be expressed in terms of, where the function can be expressed as a power series, where the coefficients of the power series are these n derivatives of the function evaluated at this, uh, sorry, I need to be more careful here, evaluated at x0 divided by n factorial times h to the power of n. So what's the intuition here? The intuition is that this power series, you start with the power series that converges, and then we have a nice formula for how to express the coefficients of this power series, and these coefficients can be expressed in terms of the derivatives of the function. So that's what the, that's the intuition of this theorem.

So let me maybe write that down. Intuition: we start with a power series that converges. So we started off with a convergent power series. We didn't know what the coefficients were, but then we figured out that we could express these coefficients in terms of the derivatives of the function. So then we have a nice formula that expresses the coefficients, that expresses the coefficients, coefficients in terms of the derivatives of the function, derivatives of the function. So this is this theorem is very nice, but here we are saying that we start with a convergent power series, and then you can express it in terms of the, the coefficients can be expressed in terms of the derivatives of the function.

So now that that brings us to the next question, which is that whether the reverse of this is true. What does, what does that mean? Means that if I construct a power series where the coefficients are all the, uh, derivatives of the function, then will this power series converge to the actual function, back to the actual function? So that's the question that, uh, we are interested in, because that will bring us to Taylor series. So the question is, does the theorem hold the other way around? That is, given any function, and, uh, possibly this is a nice function, it's continuous, and things like that, maybe it's not just, uh, continuous, but it's, uh, uh, continuously differentiable n, n times, or n+1 times, as we will see soon, um, then can we simply, you simply build a series, use where the coefficients of the series are the derivatives of the function? So the series would be n = 0 to infinity of, uh, f^(n)(x0) divided by n factorial times h to the power of n, and you hope that this power series converges, that it converges, converges to f(x), so to the function. Okay, so basically, we are asking whether this thing here will converge to f(x) or not. So that's the question. And, uh, this is what we will see in Taylor series, that there are some, under some conditions, uh, that this actually going to, uh, is actually going to happen, and that that's how we go from power series to Taylor series.

So now we are finally ready to look at, uh, Taylor series and, uh, Taylor's theorem for approximating functions through their, uh, derivatives. Before we look at the formal, uh, theorem and the proof for the formal theorem, uh, let's actually get an intuitive feel for what Taylor's theorem actually is saying. So let's say we have a, so intuition first, intuition of Taylor's, uh, theorem, and there are slightly different versions of Taylor's theorem. We will see two versions of it, um, in the lecture, but first, let's, uh, look at the intuition. So let's say you have some function. So I have my axes like this, and let's say I have a function that might, you know, maybe look something like this. Okay. And, uh, what we are going to look at is what we're going to consider is, for example, an expansion point, so point x0. So let's say over here, we have a point x0, and this point is the expansion point. This is where we would like to, uh, approximate, uh, this function. So the, expansion point, and, uh, this expansion point is going to be, let's say, this particular point here. The value of the function, uh, uh, at that point x0 is that value there. So the function at this particular point, we are going to approximate this through polynomials. So we can have multiple polynomials. For example, we can have a polynomial which is the simplest polynomial would be just a straight line. So that would be this polynomial here, um, or linear approximation. That would be that polynomial. Or we could have a more complex, uh, polynomial, like a quadratic approximation, and so on. But essentially, the idea is to approximate this function as a polynomial at the local point. So we have polynomials as a local approximation.

So, uh, how can we look at this, uh, approximation? So let's say, let's, uh, look at the linear approximation here. So linear approximation. So we're going to, uh, consider a new point which is x0 + h. So we're going to look at f(x0 + h), and this we can write it as f(x0) + f'(x0) * h + R(h) * h. So here we, we want this, uh, this residue R to go to zero as h goes to zero. So that would be this approximation, which is the linear approximation of the straight line that we just drew, in red, over here. So now we can consider a quadratic approximation, a higher order approximation. So in this case, we're going to approximate this function through a parabola at this particular point. So, uh, maybe it's going to, um, let me see if I can draw a parabola here through this point. So assume that that's a parabola. So that would be a quadratic approximation. Have a quadratic approximation. And as you can already, uh, notice over here, in these approximations, I'm already using the derivatives of the function. Um, so the quadratic approximation at this point, f(x0 + h), would be f(x0) + f'(x0) * h + 1/2 of f'', which is the second derivative of f, the function at x0, * h^2 + now I have a residue or a remainder, which is R(h) * h^2, and of course, again, we want this, uh, remainder to go to zero as h goes to zero.

So this is the intuition for a, the Taylor theorem. Basically, it takes a function and at a particular point, you're going to try to approximate this function through a local polynomial. And this polynomial, the coefficients of this polynomial are expressed in terms of these, uh, derivatives of the function. So f'(x0) or f''(x0) and so on. So this is the intuition for what Taylor's theorem is.

So now let's look at the definition, uh, formal theorem. And again, as I said, we will look at two different versions of this. Let's look at the first one here. So this is Taylor's, uh, theorem. So this says that, uh, let I be an, uh, subset of R. This is our interval. This is an open interval, and F is a function from this interval to R. And we also want F to be n+1 times continuously differentiable. So we want this to be n+1 continuously differentiable. And this a [Music] um, let x0 belong to this interval I. And then we are going to define, uh, T_n(x0, h) is the sum over n going from infinity to O, now, sum over from k going from zero to n, f^(k)(x0) over k factorial * h ^ of k. So now we want to define what is known as the remainder term. Um, so let's, the remainder term R_n is a function of x0 and h. So this is defined as an integral from x0 to x0 + h of (x + t) - no, (x0 + h - t) to the power of n / n factorial, and the n+1 derivative of f evaluated at t, dt. So, uh, this is the, uh, remainder term. And, uh, then, so we have the Taylor, uh, series term and we have the remainder term. So then we have that the function evaluated at x0 + h can be written as T_n(x0, h) + R_n(x0, h). So, uh, basically, it says that the function value at x0 + h can be decomposed into these two terms. The first term being the Taylor series term, and the second term being the remainder term. By itself, this is not very surprising. Um, so before that, let me write this out here. This is the Taylor series term, Taylor [Music] series up to degree n, and this is our remainder term. So, uh, uh, this function value can be decomposed into this Taylor series term and this remainder term. And this by itself is not very surprising. I can always define, uh, the Taylor series term, and then say whatever is the difference between the function and the Taylor series, I can simply call it a remainder term. So you can always do this decomposition. Basically, I can always write this as a sum of two things. But the nice thing that the theorem says is that it's not an arbitrary remainder, but this remainder has a very specific form. It is this integral, in this particular form. So there is a specific form for this integral, which is what makes this, uh, theorem, uh, unique.

So, uh, now let's consider the proof for this. Again, I won't be providing the full proof of this, but a sketch of the proof. So essentially, this follows from the fundamental theorem of calculus, and we can do, you can solve this by, uh, can prove this by induction. But essentially, you're going to use the fundamental theorem of calculus multiple times. So, proof sketch, uh, maybe proof sketch here. So this, uh, follows [Music] from the fundamental theorem of calculus by induction on n. So let's see this. So if you want to prove by induction, and typically the way you prove by induction is first solve for the base case. So in this case, it, the base case would be for n equal to zero. And then you consider any, uh, that it is true for, uh, n, and then you show that it is true for n+1. So let's see, base case is when n is equal to zero. So in this case, we need to [Music] prove, we need to prove that f(x0 + h) is equal to f(x0) + integral from x0 to x0 + h of f'(t) dt. And this, you can see that it is essentially the fundamental theorem of calculus. So, uh, why? So this is essentially the fundamental [Music] theorem of calculus, uh, specifically the second part. If you remember, uh, the second part of the fundamental theorem of calculus says that if I have a function f(x), uh, oh, if I have f'(x) dx from A to B, I want to compute this integral, this is nothing but f(B) - f(A). So this is the second part of the fundamental theorem of calculus. So if you, if you take this equation, take the f(x0) to the other side, then you have exactly the fundamental theorem of calculus. So now, this is for the base case. So now you can consider the, uh, inductive case or the inductive step. This means that we assume this is true for n, and we now need to prove this for, uh, n+1. So here we will consider, um, the n+1 case. So here you have f f(x0 + h) for the n+1's case, this this would be (x0 + h - t) to the power of n+1 / (n+1) factorial, and of course, you have the n+1 derivative of f, uh, evaluated at t. Um, okay. And then, uh, uh, you need to continue the proof from here. So, uh, the next step would be, right? So if we first consider this step, and then we take the derivative, then take its derivative, and then, uh, we basically have to integrate and exploit the fundamental theorem. So, uh, again, you have to use the fundamental theorem again over there. Um, there needs to be some steps that you need to do, but we're not going to look at that. Mental theorem. Okay, so that will prove, uh, this part of the, um, this definition, this form of the Taylor theorem. So, uh, this theorem, uh, so let's actually go back and, uh, look at it. Um, so basically, it says that, uh, if I have a function and it's n+1 continuously differentiable, then I can express this function as a sum of two terms. The first term is the Taylor series up to this degree n, this T_n(x0, h), along with the remainder. Uh, so the, the interesting part here is that the remainder is expressed through this integral, while the, Taylor series is expressed through these derivatives of the function. And now the whole function is basically the sum of these two things. So basically, it says that you can decompose the function into these two, uh, these two parts. And, uh, the proof for this part, or for this form of the theorem, uh, simply relies on using the fundamental theorem of, uh, calculus, and you use induction, and things, uh, fall into place. So this is a, uh, this is one form of Taylor's theorem.

So what we will see now, though, is a different form of, uh, Taylor's theorem, perhaps a little more useful form of Taylor theorem, and for that one, we will see its entire proof, and the proof does not depend on the fundamental theorem. So we can give a more elementary proof for that. So here's another, uh, theorem, or another version of Taylor theorem. Maybe I can say, Taylor theorem with Lagrange remainder. So this is the new form of the Taylor theorem. Uh, so let's, uh, write this. So let I again be, uh, our, uh, interval, uh, which is an open subset of R, and we have our function f going from I to R, and our function f is n+1 times continuously differentiable in this interval. And we have our point x0, which belongs to this interval. And if h belongs to R such that x0 + h also belongs to the interval, then we have the following. Then we have that f(x0 + h) can be written as, k = the sum from k = 0 to n, f^(k)(x0) divided by k factorial * h ^ of k, plus a remainder term R_n(h). Okay. And so if we look at this, uh, this is basically the, this part here is the nth order Taylor polynomial, and this part here is the remainder term. So, uh, so then we can express this f(x0 + h) as a sum of these two terms. And there is a, and there is a s, with s belonging to x0, x0 + h, or the s belongs to x0 + h, x0, depending on whether h is positive or negative, uh, such that this remainder R_n(h) can be expressed as the n+1 derivative of the function evaluated at this s, divided by (n+1) factorial, * h ^ of (n+1).

Now, uh, let's actually look at what this theorem is saying. So this is the entire statement of the theorem. Basically, it says that I can express my function as a sum of two things, with the first part is simply the Taylor nth order Taylor, uh, series, or n order Taylor polynomial, and the second part is this remainder. And in the earlier theorem, we saw that the remainder was expressed as an integral, uh, from x0 to x0 + h. However, in this theorem, the remainder is not expressed as an integral, but it is expressed as simply one particular term. And this term is, so it's simply expressed as, uh, this term over here. Okay. And this term is basically, uh, the evaluation of the function of the n+1 derivative of the function at this particular point, uh, s. So this s here is a point that exists, and that's what this theorem is saying. There exists a point within this interval x0 to x0 + h such that the remainder can be expressed nicely and compactly as simply this one term, rather than an integral. So that's the nice part about this, uh, this form of the theorem. It says that there is a s, where the remainder simply is expressed as this one particular term. Of course, it doesn't tell you how to get this, uh, term s. So that's not part of what the theorem is. It just says that there exists a s such that this this holds.

So, uh, let's actually, let's actually see how, uh, uh, so typically you, you often write it as follows, uh, for, um, so often you write, uh, f(x0 + h) is the sum over k = 0 to n, f^(k) evaluated at x0 / k factorial * h ^ of k, and this remainder term is often written as, um, an order h to the power of n+1 term. Okay. And sometimes you also write this slightly differently. Um, you write in terms of x, which is instead of writing in terms of f(x0 + h), you write it in terms of f(x). So this is f(x) is equal to sum over k = 0 to n, uh, f^(k) evaluated at x0 / k factorial, time x - x0 to the power of k, plus you still have this, uh, order term, but it's now between x0, x, x - x0 to the power of n+1. So these are two different forms. They, they're basically the same. Um, they're the same. It's just expressed slightly differently.

So now let's look at the proof for this, uh, theorem. And the proof is, um, it's an elementary proof. It doesn't rely on the fundamental theorem of calculus. Um, so let's look at the proof here. However, as part of the proof, you're going to define a few terms which at first glance, they may be out of the blue. You don't know why they are being defined in that particular way, but as, as the proof progresses to the end, then you know why they have been defined in that way. So these are, this is one of the scenarios where you define the things, you know, you already know how the proof should go, and then you define the things that are necessary to help the proof go through. So we're going to define this peculiar, uh, uh, uh, quantity, or we're going to define two peculiar quantities. I'm going to call this capital F indexed by n and h of t. So this is defined as sum over k = 0 to n, the k derivative of f evaluated at this t, / k factorial, and we have (h + x0 - t) ^ of k. And here we note that what happens, we're going to evaluate this function at some particular point, let's say we evaluate this at x0. So instead of, uh, t, we have x0, then this is simply going to be T_n(x0, h). Okay. And in, and then if we evaluate this at another point, which is x0 + h, so we, we are evaluating this at the two extremes, at x0 and x0 + h, and then this simply becomes the function value at x0 + h. So now we're going to define another, uh, quantity, and this quantity is G. It's also defined in the same way, or looks very similar. Um, so this is defined as, so actually, this is the definition here. This is defined as (h + x0 - t) ^ of n + 1. And then we note that we take the derivative of this. So derivative of this, and we're going to get - (n+1) * (h + x0 - t) ^ of n. And, uh, now we are going to do, uh, we're going to use the generalized mean value theorem, and we're going to apply the generalized mean value theorem to a particular quantity, which will be the ratio of two things. So first, uh, we're going to apply the generalized mean value theorem, and we're going to apply this, actually, that's the generalized mean value theorem, and we're going to apply this to this ratio, which which is f_n h(x0 + h) - f_n h(x0). Now it may seem abstract as to why we are doing, why we define these quantities, and why we are looking at these ratios and so on, but, uh, you will see later on, uh, how the proof, uh, works out. Uh, so this will be g_n h(x0 + h) - g_n h(x0). So this is, uh, nothing but the, from the generalized value theorem, basically, we know that there exists a s such that the numerator is this, the derivative of, uh, f evaluated at this side, and the same, you apply the same, uh, generalized mean value theorem, so this is the generalized mean value theorem for the derivatives. So you apply the same, uh, generalized mean value theorem for the denominator here. So that means the, there is, there exists a s, such that the denominator is equal to g', and this s is according to the generalized mean value theorem, uh, this s lies between 0 and x0 + h. Okay. And now we have this, uh, ratio here. Um, and so we'll do a simple, uh, manipulation. Um, so we first know that f of f, we first know that this quantity here is f(x0 + h), why? Because we just, uh, defined it here. And then we also know that, uh, this quantity here is this T, right? Because again, we just defined that there. And we're going to, uh, then do, uh, some manipulation of this by substituting those values, uh, for f, for this capital F function. So let me erase this and then I'm going to write down. So we're going to do this manipulation here. So the numerator, it will be simply x, f(x0 + h) - T_n of, uh, T_n of x0, h. And this is equal to, g_n h(x0 + h) - g_n h(x0) times f'(h) of this s, divided by g'(h) of this quantity side. And we know from the definition that g_n evaluated at, uh, h+x0 is simply equal to zero. So this is zero. And if you evaluate, uh, at x, this will simply be h to the power of n+1. Okay. So what we have here is this quantity is equal to, so what we have is this quantity is equal to h to the power of n+1 times f', the n+1 derivative evaluated at s, or n factorial into (h + x0 - s) to the power of n, divided by n+1 into (h + x0 - s) to the power of n. And now we have that this term cancels with this term here, and the n+1 and the n combined together, and you get h n+1, h^ of n+1 into the n+1 derivative evaluated at s, / (n+1) factorial. Okay. So now we have been able to reduce this, and, uh, we see that the, now from here, there's just one more step. Um, so we can write, so we move the left, so, uh, let's actually look at this. So we move this term here in yellow to the other side, and we express f(x0 + h). So that's what we we can do now. So we have f(x0 + h) is equal to T_n(x0 + h) plus h to the power of n, n+1, f^(n+1) derivative at at some epsilon, / (n+1) factorial. And this is exactly what the theorem, uh, also said. Let's, if you go back to the, the theorem definition here, so the remainder was simply this part here, and in yellow, and that's exactly what we got right now for some, uh, value of, uh, s. Okay. So this, uh, proves the theorem. Uh, so that means there exists some s where the derivative, the where the function can be written as the polynomial, the Taylor sum, the Taylor polynomial, plus this remainder term, where the remainder term is just one term, and it's evaluated at some, uh, point s. And of course, we don't know what this s is. Um, uh, but at least this theorem says that such a s exists.

Now, okay, so, uh, from here, so this is the Taylor theorem. Um, so now there is, uh, another theorem that you can write, um, based off of this. So we look at another, another theorem. Um, so this theorem basically says that, uh, if you have a function which is infinitely differentiable, infinitely continuously differentiable in some interval, so this is, this, this theorem is about infinite differentiable functions, and you have x0 belongs to this interval I, and there's some h in R such that x0 + h also belongs to this interval, then we're going to define T of x as the limit n tends to infinity of, oh, we're going to define this as T of x0, h of T_n(x0, h), which is the sum of n = 0 to infinity of f^(n)(x0) divided by n factorial, times h to the power of n. Okay. So we define this term. Then we have, uh, f(x) is T(x). So we have that the function is equal to just the Taylor polynomial, or the Taylor series, if the remainder term, basically, goes to zero. Um, and this is not surprising. So if the remainder goes to zero, then the

Then the function simply becomes equal to the uh sum or the tailor sum or the tailor polynomial as n goes to infinity. Uh, so this basically says that if you can show the remainder goes to zero and then tends to infinity, then you can take a function and you can express it in terms of this tailor sum or this tailor polynomial. Uh, so for example, for example, uh, this is the case if there exists if there there, so we're talking about the convergence part here, if there exist constants alpha and C, which are greater than zero, such that F_n at some is less than or equal to alpha * c^n.

Okay, so here we're looking at the radius of convergence for this, and this is for all epsilon belonging, oh, for all, no, for all t belonging to the interval, and for all n belonging to the set of natural numbers. Um, and this is, uh, simply a sufficient condition. It's not a necessary condition. Uh, that means this term can go to zero in multiple ways. This is not the only way it can go to zero, but if this condition holds, then this remainder term goes to zero. And the proof for this, it simply follows, follows directly from the Lagrange remainder theorem that we just saw.

Okay, so again, uh, this is a sufficient but not necessary condition. So here, basically, uh, we now have the full Taylor theorem. So we can express any function f as, uh, a sum of a decomposition of this Taylor polynomial plus this remainder. And we saw under what condition, uh, we saw that if the remainder basically converges to zero as n tends to infinity, then the function is equal to the Taylor polynomial. And, uh, if for the remainder to go to zero, we have some condition, which is that the nth derivative has to be bounded. It's less than or equal to alpha * c^n.

Okay, so if this holds, then this very, we can express this function, any function f(x) as a, in the form of this Taylor polynomial or this Taylor series. So now we will look at some examples of Taylor series. And in fact, we will look at both positive and negative examples. So you can never take Taylor series for granted. Not all functions may have a Taylor series which converges to the function. And here we will see a few examples, positive examples where the Taylor series does converge to the function, and then we'll also see one example where the Taylor series exists, but it does not converge to the actual function itself.

So should never take the Taylor series for granted. They're very nice infinitely differentiable functions that converge, but they converge to the wrong function. They do not converge to the actual function. So first, uh, some positive examples. So this would, uh, one of the, uh, most famous positive example, the nicest example where the Taylor series matches with the function is the exponential series. Exponential series. This is where you have exp(x) is sum over n from 0 to infinity x^n over n factorial. And this is a power series with R equal to infinity, that means a radius of convergence of infinity. And exp always coincides with its, coincides with its Taylor series expansion. And there are actually, uh, many other examples, just like the exponential series, which also coincide nicely with the Taylor series.

So these are functions like the sine, cosine, any polynomial, or in fact, any power series. So other examples are things like sine, cosine, polynomials, um, and even power series, of course, the power series has to exist and converge and so on. Then in those cases, uh, the function coincides with its Taylor approximation. And all these types of functions are called analytic functions. These are all analytic functions, and in this case, the Taylor series does coincide with the, with the function value itself, with the true function itself.

So let's look at another example. Uh, this is f(x) = log(x + 1). Uh, and we look at the Taylor series around zero. And in this case, you can prove, we're not going to show, we can, we are going to show this way, you can prove that the convergence, convergence radius is one. Um, convergence radius for Taylor series of this function is R = 1. That means for x outside of -1, 1, the Taylor series, it does not make sense. We cannot talk about convergence or anything. It just does not make sense. It's outside the radius of convergence.

Okay, so this is also a nice function, and the Taylor series coincides with the function itself. So now let's consider another function which is nice and infinitely differentiable, but, uh, this is a negative example where it does not, the Taylor series does not match the function itself. So, uh, f(x) is this function here, which is exponential -1/x^2 if x not equal to 0, and 0 if x is equal to 0.

So, uh, this function has a very, interesting or a funny property or a weird property, which is that its, uh, derivative at the point zero is always zero for all values, for all, um, orders of derivative. So this has the weird property that for all n in natural numbers, we have that f, the nth derivative of the function at the value 0 is equal to zero. And you can verify this. You can take this function. So at x equal to 0, of course, the derivative is zero. Uh, right, you can, because at exactly x equal to 0, the value itself is zero. And, uh, you can also, uh, consider the limit and just verify this for yourself, and you will see that the derivative is always equal to zero.

Um, now what we will do is we will consider a Taylor series approximation of this function around zero. So that means we will consider, um, um, the Taylor series. So let's write that down. So consider the Taylor series about, um, this point, which is x0 equal to 0. So around the, uh, zero point. And in this Taylor series, if you go back and look at the, uh, definition, here the Taylor series, it is a, so if you look at the definition here, the Taylor series, it involves all these, nth derivatives, computed at x0. So in this case, the derivatives are being computed at the value zero.

Um, so and you will notice then that, uh, these are all actually equal to zero. So all the terms, all terms will, will be zero. Um, that is, for all n, we have T_n of x0 is 0 in this case. So T_n of 0, h is equal to 0. And the radius of convergence is, uh, infinity.

Now, when we are, uh, doing this, when we are considering this, uh, uh, Taylor series approximation, then if you, if you look at it, we actually, um, look at x0 + h and we write this as T_n of x0, h plus R_n of x0, h. So this Taylor series over here has to be valid for not just a t zero, but it has to be valid around, around the point as well. Uh, so, uh, if I have a function, there's a value here, then the Taylor approximation is not just at this point, but it has to, it is, it is, it is covering, let's say, a small region around this as well. Uh, so, uh, depending on what your value of h is. So the Taylor series is the approximation around the point x0 and not just at x0.

So in this particular case, what we will see is that, uh, the Taylor series 0, x0 is 0 plus h is our, uh, the approximation around zero. We're considering a small region around h, um, around zero, and this will simply be, uh, so, uh, so the Taylor series T_n of x0 equal to 0, h will be exactly zero everywhere. Um, right, because our, our T_n is actually equal to zero. But if you consider our function f of, uh, 0 + h, this function value is actually not zero. It is equal to exponential -1/h^2.

Um, okay, so the function is not equal to zero, but the Taylor approximation over here is zero. So, uh, to be more precise, the Taylor series around 0 is zero. And this is our function value. Function value around 0 is not zero. It is zero exactly at zero, but around zero, it is not zero. Right, it's equal to this exponential -1/h^2. So here we have the scenario where the Taylor series is not equal to the function value. So Taylor series converges, and it converges to zero, in fact, right? Um, and this is true for all x + h not equal to 0. So this is true for all values of, uh, x that are not equal to 0. Right, so x + h not equal to 0. And over here, you can see that, uh, the Taylor series exists and it converges to zero, but it simply does not converge to the true function value.

So this is a, this is a negative example of the case where, uh, the Taylor series does not, uh, coincide with the function itself, although the function is pretty nice in the sense that it's, in this case, it's infinitely differentiable function, but the Taylor series is not applicable. It does not converge to the function.