 Hi, I'm Zor. Welcome to Unizor Education. Today we will talk about Taylor series. This lecture is part of the course of advanced mathematics for teenagers and high school students. So it's presented on Unizor.com, so you can watch this lecture from from this website, which is definitely recommended because the site has very detailed notes for each lecture. Plus there is an educational functionality which you can get engaged with including exams, etc. The site is free. Alright, so Taylor series. Okay, now functions can be very simple, right? For instance, it's a simple function in terms of if you are tasked with some kind of calculation, you can very easily do it, right? Or functions can be really complex. I don't know, sine of natural logarithm of x squared divided by 2 plus e to the power of tangent x. Yeah, go figure and calculate this particular value. That's not really easy, right? So that's very important actually aspect of dealing with functions. If you know something about computers and how they work, basically you know that the processors, which are the heart of every computer, can perform four arithmetic operations plus minus multiplication and division on the level of commands. Basically, a processor command has these types of commands. There is no command, for instance, for calculating tangent of some value or power, logarithm, or whatever else. However, you know that if you will take, for instance, a calculator, you have some signs and tangents and logarithms. If you take any computer, there is definitely some way to calculate these values in just one stroke, right? So how is it done? Well, they approximate inside the computer. There is some kind of a program which basically is not calculating directly tangent or logarithm or anything like that. They use approximation of these functions using some much simpler operations. Now, what is much simpler operation, which includes only four arithmetic operations? Well, it's polynomial, right? If you have some kind of a polynomial f of x is equal to x cubed plus 3x plus 5. Now, it's easy to calculate it based on just four arithmetic operations. Well, I'm not sure about the power. Power can actually be a little bit more complex. You don't want to multiply x by itself three times, but maybe they do. I don't know. But in any case, this is much simpler than this, right? So any polynomial calculation is much simpler than something like this. So it's very desirable to be able to approximate any function. Well, not any, but most of the functions, at least nice functions, smooth functions with a polynomial. And then the calculations would be much simpler. Now, okay. So that's basically about why we are engaged in something like Taylor series. Now, let's talk about a little bit more concrete examples and requirements. Well, first of all, we are talking about functions which require this approximation, which are smooth and defined on some segment from A to B. Now, when I'm talking about smoothness of the function, I assume it's being continuous and differentiable and maybe twice differentiable, twice differentiable, maybe differentiable to any level of derivatives. So basically, my very short and not exactly mathematical answer is when I'm talking about smooth function and I'm talking about certain operations, I assume that these operations can be done. Now, in this particular case related to the Taylor series, I'm talking about infinite differentiability. And it's not such an unusual requirement for functions which we are usually considering in mathematics. Like, for instance, sine, it's infinitely differentiable. From sine, we have a cosine. From cosine, we have minus sine. From minus sine, we have minus cosine. From minus cosine, we have sine again, and it all repeats. I mean, if you talk about logarithm, if it's a natural logarithm, first derivative is one over x. Second one is one minus one over x square, etc. I mean, it's all infinitely differentiable. So all functions which we will be talking about are smooth in that particular sense. So I'm not going to go into the details of this smoothness. I just assume that if I'm writing something, this is possible to basically to write and the function is really possesses the properties necessary for whatever the expressions, the formulas where it's participating. Okay, so that's first. It's done. Now, considering our function is relatively smooth, what I would like to do is approximate it with some kind of a polynomial. Well, again, I would like to be a little bit more precise. Not only I would like to approximate it with some kind of a polynomial, I would like to be able to approximate it as close as I want. So any degree of closeness of my approximation should be allowed. Now, it means my polynomial should be more and more complex, right? To incorporate all the different curvatures of my line. So let me be more specific. I would like to have a process which can generate for any function which is sufficiently smooth. It can generate basically not just a polynomial, but a polynomial series which is C0 plus C1x plus C2x squared plus, etc. plus Cnxn plus, etc. Infinite series. Now, infinite series must, number one, be convergent to my function f of x for any x in this particular interval from A to B. Now, if that is true, if the series is convergent, then I can basically cut it on any level, forget about detail, and say that, well, this is whatever I cut, let's say up to nth power of x. I'm saying, okay, this is approximation. How good is it? Well, for instance, I can evaluate how good it is. But if I want a little bit more precise approximation, I'll just use more members of this series because series is convergent, which means that our tail becomes less and less important. Basically, the tail is infinitesimal as I introduce more and more into the main body. So whatever I'm cutting off, even if it's infinite number of members of this series, still their sum is infinitesimal if my n is going to infinity. So the more members I'm allowing from this representation, the more precise would be my approximation. I would like to introduce even more as a requirement because I know I can satisfy this more important environment. I would like this representation regardless of the number of members which I'm using as an approximation to be exactly the same as function f at one particular point. So there is one particular point where all these are true, et cetera. So at one particular point, no matter how far I'm cutting my series, I would still have exactly the same value. So I know I can satisfy both requirements. And this one actually makes me a little bit more assured that my approximation will not go too far from the function because I know that regardless of the number of members I'm using, so at least at one particular point, which is by the way called a center of this representation. So at the center of this representation, it always coincides with the value of the function precisely regardless of the number of members which I am choosing to retain and cutting the tail off. So these two requirements, at one particular point, it will be precisely equal to my function regardless of the number of members. Now at all other points, the more members I will have, the more precisely my approximation will be because this series is convergent at any point x it converges to this f. So these are two requirements. And now I'm going to basically try to satisfy these requirements. Here is how. Okay. First of all, let me satisfy this requirement. That's the easiest. Here is what I will do. Now instead of gauging my polynomial, I will use the sigma symbol for this polynomial because it's infinite. So n greater or equal to zero, that's index cnx to the power of n. So that's my polynomial sequence is a polynomial series. Now at point x is equal to x zero, that would be this obviously. Now let me express this slightly differently. I will express instead of this, I will use this representation. Now, is this a polynomial series? Yes, absolutely. Because any x minus x zero to the power of n is basically a polynomial in its own right, right? Of power n. So the sum of these obviously again is a polynomial series. So what this representation gives me is again a polynomial representation, a polynomial series which approximates my value of the function of the function f. But now I'm absolutely sure that no matter how many members I will choose, if x is equal to x zero, all the members starting from n is equal to one will just disappear because it will be zero, right? So the only thing I can say about polynomial series of x zero is c zero, right? Because starting from c one it will be it will be zero. So let me just choose c zero is equal to f of x zero and I can even represent it this way. p of x is equal to f of x zero plus and then I will start from one. Okay, this is a polynomial representation. This is a constant, right? Because this is the function value at one specific point which I have chosen as a center, right? So this is the constant, c n's are some constants, whatever it is, and this is basically the body of the whole polynomial. But again at point x is equal to x zero, all these members are zero and my regard, so regardless of how far I will cut my tail off, the value of the right side at x is equal to x zero will always be f of x zero, which is my requirement to have the polynomial representation exactly the same value regardless of the number of members at one particular point. Now let's talk about these coefficients c one, c two, etc. up to infinity. Now I don't know first of all if such a representation exists and even if I will find something the question is whether the series would be convergent. So what I will do is the following. First let me assume that this representation as a polynomial series exists for a sufficiently smooth function. So let's assume that there is such a polynomial which is equal to this from one to infinity. So let's assume that this exists. From the existence of this I will come up with certain values of cn. So these values are a necessary condition for this representation to be true. And then after I will find these concrete values for cn, I will prove that the series really is convergent for these particular coefficients. And that would prove basically that the whole representation makes sense. So how can I find my values of cn? All right, it's really very simple. Let me make the first derivative. Now this is the constant. So the first derivative would be, let me just explicitly start it from c1 x minus x0 to the power of one. What's the derivative would be? c1 plus the second member would be c2 times, it would be x minus x0 square. So it's 2x minus x0. Next would be c3, 3x minus x0 square, etc. So you remember that xn derivative is n times x to the power of x minus one. So from x minus x0 square it would be 2 times x minus x0. From x minus x0 cube it would be 3x minus x0 square, etc. Up to infinity. So this is a series. Now, what if I will put a derivative of x0? It would be this. So these members will just disappear. And what would be left? Just c1. Okay, good enough for me. So let me just leave this as this. And from 2 to infinity cn times n times x minus x0 and minus one. And, okay, now this member I can call it c0. I have already found it, right? Now, basically what I'm saying is that c1 is equal to first derivative of f at point x0. Now, let's do the second derivative. Well, this is a constant so it disappears. Now this would be sum of, well, let me again take the first member. So if n is equal to 2, so that's 2 times x minus x0 to the first degree. So it would be 2 times s2. And starting from 3 I will put cn n, n minus 1, x minus x0, n minus 2, right? So the derivative of x minus x0 to the power of n minus 1 would be n minus 1 times x minus x0 and I reduce the power by 1. So I had n before, cn before, so that's what will be, right? So what will be my c2? If I will put x0 here, all these will disappear, right? Because not starting from 3, so it will be to the first degree, x minus x0 to the first degree, which means if x is equal to x0, it will disappear. And then the second degree, the third, etc. And the only thing which is left would be this. So that's f second derivative divided by 2, right? Okay, third derivative. Okay, this disappears, it's a constant. And here again the one which as the n is equal to 3 I will just use. So it's 3 and 2 and c3. That's the coefficient at x minus x0 to the first degree, which means when I'm getting a derivative from this, x minus x0 disappears and I have only coefficient. Now starting from the next, I have n, n minus 1, n minus 2, x minus x0, n minus 3. And again, if I put a third derivative at point x0, this will disappear and I have just this. So c3 is equal to third derivative at point x0 divided by 3 times 2. Well, as you probably figure out that I can actually write a general expression, which I can prove by induction, but it doesn't really make much sense anyway, because it's obvious. It's n's derivative divided by, well, if it's 2, it's 2. If it's 3, it's 3 times 2. If it's 4, it will be 4, 3, 2, etc. So it's basically n factorial, right? So I can make times 1 here, times 1 here, divided by 1 here. And even with a 0, actually, I can put 0 factorial here. So this is for any n from 0 to infinity. So my function actually is equal to, let me return back to starting from 0, where n from 0 to infinity, assuming that 0's derivative is actually the function itself, then the first derivative is the first derivative, etc. And 0 factorial is 1 by definition, as we know. So this formula actually is just true for any n, right? Fine. I have found my coefficients. Now, question is, I mean, maybe it's not convergent at all. I mean, I found a necessary condition for my coefficients cn to be of this value, of this type. So x0 is that center, if you remember, which we have fixed in the very beginning. And as a function, it looks like this. But maybe it's not convergent for any x. So this is another piece of the proof which I would like to continue with. Now, there are certain conditions on these n-th derivatives, which we really have to impose, otherwise there is no talking about any kind of convergence, because this is unknown thing, right? We don't know anything about f. But let's consider for a second that the n-th derivative, no matter what n is, is bounded by some value. So let's just assume, let's just assume that we are talking about functions with bounded derivatives of any sort. So let's consider that fn of x, let's say by absolute value, is less than some value m, where x belongs to ad. Now, how important actually this particular requirement is? Well, it is important, because again, if you consider some function like, for instance, tangent on interval, which includes minus p over 2 and less pi over 2. Now, let's consider function tangent on some interval, which is greater than this one. So we have these points where, number one, tangent itself is not defined. And number two, in the immediate neighborhood of this point, derivative goes to infinity, right? Vertical, vertical derivative. So it's 90 degree basically, right? So the tangent is equal to infinity. Now, so what I'm trying to do right now is to say that we are considering only functions which do have certain bound on their derivatives up to any degree, up to any level of complexity. So for instance, on this particular interval, my tangent and its derivatives basically are bounded by some value. So I assume that we need this particular requirement for any derivative within the interval where we are considering our function, where we would like to approximate our function. I would like all these derivatives at any point of this interval to be bounded by some value. Now, why do I need it? Well, obviously, because now I can say that these are always less than m sigma n from zero to infinity x minus x zero n to the n factorial. So now I have to only prove the convergence of this series. Now, there are probably a little bit less strict requirements for these derivatives. For instance, I can ask that these particular derivatives are growing as n goes to infinity, but only as a power function, like this one. This is also fine, but it's a little bit complicated, and that's why I don't want to concentrate on this. I deliberately chose a simple restriction on all the derivatives just to be independent of it. So now I have to prove only the convergence of this. But basically, again, if I will prove that, then even if m is not a constant, but something like m to the power of n, which I can connect with this to the power of n, it will still be convergent. I just don't want to go into these details. So let's just concentrate on this thing and prove that this is convergent. Well, first of all, let's just think about this. As n is increasing to infinity, I am multiplying my denominator by greater and greater and greater number. But this, I am multiplying only by the same x minus x zero as n increasing. So next will be x minus x zero to the nth, multiplied by x minus x zero, and this will be next multiplied by n plus one. So no matter how big x is, this thing is always increasing this multiplier in the denominator. But numerator is always multiplied by the same number. So it's obvious that denominator is growing and significantly faster after a certain value of n, obviously. Now, that actually kind of makes us to believe that the whole member is infinitesimal and it is, obviously. But that's not sufficient for the whole series to converge. What I would like to do is I would like to prove that this thing is actually bounded from the top by some geometric progression with the quotient less than one, which means it's convergent. We know from the properties of geometric conversion that if the quotient is less than one, then the infinite geometric progression is converging. So that's what I'm going to do. And it's really not very difficult at all. So how can we prove that this thing is converging? So we don't need m, it's a constant. So this is the only thing which we need. But let me just do it even simpler. c to the power of n divided by n factorial, m from zero to infinity. c is any number. Basically, no matter what number it is, we're talking about some number, we're talking about convergence for any particular x, right? So it doesn't matter what I put x minus x zero or c, etc. So I would like to prove that this is convergent. Okay. How can I do it? Here is the way. Let's choose an integer. m is integer and m is greater than c. So no matter what c is, maybe c is 25.7. Then I will choose 26, something like this, right? Now, c to the power of n divided by n factorial. This is c to the power n minus m times c to the power of m, right? Now, n is growing to infinity. So after certain n, which is greater than m, I can write something like this. So n minus m is positive and m is also positive, etc. divided by n factorial. Now, n, again, is going into infinity. So I can just start from any n I would like. And obviously, if n is greater than m, I can represent n factorial as m factorial times m plus 1, m plus 2, etc., up to n, right? So far, I did not change anything. I just replaced n factorial, which is product of all numbers from 1 to n. I divided by the product from all numbers from 1 to m and then whatever left to n, right? Now, if I will reduce my denominator, I will increase the fraction, right? So how many numbers I have here from n minus m? So I have n minus m different numbers. All of them are greater than m, right? Because it's m plus 1, m plus 2. So if I will replace it with m to the power n minus m, I will decrease the denominator because each one of them is greater than m. And since I decrease the denominator, I increase the fraction. Now, what is this? Let's combine this and this. So it's c over m to the power n minus m times some kind of a constant q. Now, m is fixed. It depends on c. c is fixed. m factorial is fixed. So it's some kind of a quotient. It doesn't really matter. Some factor. As n goes to infinity, q is not dependent on n, right? q is a constant relative to n. Now, what is this? c divided by m is less than 1, right? By absolute value. We're talking about absolute value, of course. Which means that this represents a member of geometric progression with c over m being a quotient. And this quotient is less than 1, which means that this particular thing is less than or equal to some kind of constant a to basically bypass all the members starting from 0 up to m, whatever it is, some kind of constant. I'm not interested in the beginning because beginning is always fixed, right? We are interested in infinity. So after infinity, I mean to where it's infinity, this thing would be sigma of c over m to power n minus m. Again, some factor here. So this is basically a geometric progression. And obviously, since c over m is by absolute value is less than 1, my geometric progression has my infinite geometric progression can be summed up. And the series geometric series will have certain concrete value as a sum. So it's convergent. So basically, what we have proven is that this thing is converging. That's basically all I needed. Because in the very beginning, we kind of assumed that it's convergent. And then we came up with values for all the coefficients of this Taylor series. And now, so it's a necessary condition. And now I have proven that with these coefficients, my Taylor series is actually convergent for any value of the argument. And well, that's basically the only thing which I needed. So now I have proven this particular representation which we were considering the Taylor series. Let me just write it again. So f of x is equal to sigma f n's derivative at point x 0 divided by n factorial x minus x 0 to the power of n, where n is from 0 to infinity. So this particular representation is a converging series, which is converging to my function f of x for every x. And at particular x is equal to x 0, this series, not only this whole series is equal to this, but also every partial sum of it will also be the same as f of x 0. So these are two conditions which we have satisfied. We put it in the front of us in the very beginning. And it's called Taylor series, as I was already talking about. Also, if x 0 is equal to 0, I mean there are certain segments which contain 0 and people want 0 to be the center, then this Taylor series is called sometimes Maclaurin series, which is basically a different name because probably Maclaurin was the first one who kind of investigated this particular thing that x is equal to x 0 equal to 0. All right, so that's it for today. I do recommend you to read notes for this lecture on Unisor.com. Notes represent basically like pages of the text book. And try to think about this proof of convergence of this thing. There are actually very interesting researchers about how much we are losing by cutting my tail at certain points. So there is an variation of the error of the approximation, which I didn't go into. Now, in theory, I can always using my proof that members of this sequence are less than the corresponding geometric progression sequence, I could obviously summarize the tails of the geometric progression. And that would be a nice evaluation for how much we are losing by cutting at certain moment my Taylor series with a partial sum. I'm not sure if I will go into these details, but it's interesting researchers and there are more or less important articles about what kind of restrictions should be put on the derivatives of the function f. I just put a restriction that it's just always less than some constant m. You can actually be a little bit more specific and have a weaker restriction. Like it's growing, for instance, with the power of n. That would be probably the same thing more or less. All right, so all these are very interesting, obviously, elements of the research. But in any case, my purpose was to basically introduce you that any smooth function can be represented to any degree of precision with some kind of a polynomial. And this is most likely, well, maybe my information is obsolete, but that was the case long, long time ago when I was involved with computers. Most likely, this is exactly the way how in calculators and computers, all these calculations of some specific functions, which are not polynomial functions, are implemented. Okay, that's it for today. Thank you very much and good luck.