# Video: Taylor Polynomials Approximation to a Function

In this video, we will learn how to find Taylor polynomials and use them to approximate a function.

13:29

### Video Transcript

In this video, we will learn how to find Taylor polynomials and use them to approximate a function. We’ll then see some examples of Taylor polynomials of some functions. This is the general form for a Taylor polynomial up to the 𝑛th derivative for a function 𝑓 centered at the point 𝑎.

But to understand where this comes from and why we use Taylor polynomials, think about a power series centered at 𝑎. We know that if we can write a function as a power series, we find that this is much easier to differentiate and integrate. So being able to write a function as a power series is a really useful tool.

Taylor polynomials give us a general method for writing a power series representation near a point. We’re going to try and rewrite these coefficients in terms of 𝑓 and its derivatives. And we firstly assume that 𝑓 does have a power series representation about the point 𝑥 equals 𝑎 and 𝑓 has derivatives of every order. And that the absolute value of 𝑥 minus 𝑎 is less than 𝑅, where 𝑅 is the radius of convergence.

Centering our approximation at 𝑎, so substituting 𝑥 equals 𝑎, we find for 𝑓 of 𝑎 we have all the terms canceling except 𝑐 zero. So 𝑓 of 𝑎 equals 𝑐 zero. Then let’s differentiate 𝑓 of 𝑥 to find 𝑓 prime of 𝑥. 𝑐 zero is a constant. So this differentiates to zero. 𝑐 one multiplied by 𝑥 minus 𝑎 will just differentiate to 𝑐 one. Then 𝑐 two 𝑥 minus 𝑎 squared differentiates to two 𝑐 two 𝑥 minus 𝑎. And we continue in the same way. We can then evaluate this first derivative at 𝑥 equals 𝑎. And we find that all the terms except 𝑐 one actually disappear.

Now let’s find the second derivative of 𝑓. And we do this by differentiating the first derivative of 𝑓. And then we make the substitution 𝑥 equals 𝑎. And we find that all the terms except two 𝑐 two disappear. Now remember that our goal is to rewrite these coefficients in terms of 𝑓 and its derivatives. So we rearrange this for 𝑐 two. And we find that 𝑐 two equals 𝑓 double prime of 𝑎 over two.

We then continue and find the third derivative of 𝑓. Evaluating this at the point 𝑎 gives us six 𝑐 three, which rearranges to give us that 𝑐 three equals 𝑓 triple prime of 𝑎 over six. Now if we look at what we found for 𝑐 zero, 𝑐 one, 𝑐 two, and 𝑐 three, we can put together a more general rule. Each 𝑐 𝑛 equals the 𝑛th derivative of 𝑓 at 𝑎 over 𝑛 factorial. And remember that 𝑛 factorial is the product of 𝑛 and all the integers below it up to one. For example, three factorial is three multiplied by two multiplied by one, which is six. So this leads us to the following definition.

The Taylor polynomial of 𝑓 centered at 𝑎 up to the 𝑛th derivative is 𝑓 of 𝑎 add 𝑓 prime of 𝑎 multiplied by 𝑥 minus 𝑎 add 𝑓 double prime of 𝑎 over two factorial. Multiplied by 𝑥 minus 𝑎 squared add 𝑓 triple prime of 𝑎 over three factorial multiplied by 𝑥 minus 𝑎 cubed. And this continues up to the 𝑛th derivative of 𝑓 at 𝑎 over 𝑛 factorial multiplied by 𝑥 minus 𝑎 to the 𝑛th power.

You might sometimes see this written as the sum from 𝑛 equals zero to 𝑛 of the 𝑛th derivative of 𝑛 at 𝑎 over 𝑛 factorial multiplied by 𝑥 minus 𝑎 to the 𝑛th power. There are a couple of things to note about this formula. Sometimes we see 𝑓 prime of 𝑎 written as 𝑓 prime of 𝑎 over one factorial. But as one factorial is just one, this is exactly the same.

Also note that even though this first term looks a little bit different, it still follows this general rule. If we apply the formula when 𝑛 equals zero, then this is just going to be 𝑓 of 𝑎. Also, 𝑥 minus 𝑎 to the zero power is just going to be one because anything raised to the zero power is one. And finally, zero factorial is defined as one. So we can say that this is just going to give us 𝑓 of 𝑎.

Let’s now see a visual representation of how Taylor polynomials help us to approximate a function.

If we take the graph of 𝑓 of 𝑥 equals 𝑒 to the 𝑥 power and find the Taylor polynomials for this function centered at 𝑥 equals two. You can see here the graph of 𝑒 to the 𝑥. And we remind ourselves of the Taylor polynomials formula. If we try and approximate this with 𝑛 equals zero, our Taylor polynomial is 𝑒 squared. And that just gives us a straight line, which is not a very good approximation for our function.

But if we now find our Taylor polynomials up to the first degree, even though this still isn’t a great approximation, we can see it’s a little bit better. But if we then take Taylor polynomials up to the second degree, we get an even closer approximation. And here are the graphs for 𝑛 equals three and 𝑛 equals four, the Taylor polynomial up to the third degree and the Taylor polynomial up to the fourth degree. We can see that each time the approximation gets a little bit better. So the higher the value of 𝑛, the better the approximation.

Let’s now see some examples of Taylor polynomials to approximate a function.

Find the Taylor polynomials of degree two approximating the function 𝑓 of 𝑥 equals 𝑥 cubed add two 𝑥 minus three at the point 𝑎 equals two.

Let’s start by writing out the general form of a Taylor polynomial up to degree 𝑛 for a function 𝑓. And for this question, we’re centering our approximation at the point 𝑎 equals two. So we make the substitution 𝑎 equals two. Also note that we’ve only gone up to the degree two power as that’s what we’ve been asked to do in the question.

So now we need to evaluate 𝑓 of two, 𝑓 prime of two, and 𝑓 double prime of two. Well, we know that 𝑓 of 𝑥 equals 𝑥 cubed add two 𝑥 minus three. And so 𝑓 of two equals two cubed add two multiplied by two minus three. So 𝑓 of two equals nine.

To find 𝑓 prime of two, we need to, first of all, find 𝑓 prime of 𝑥. To do this, we differentiate 𝑓 of 𝑥, which we do term by term using the power rule, to get 𝑓 prime of 𝑥 equals three 𝑥 squared add two. Note that negative three differentiates to zero because it’s a constant. And so 𝑓 prime of two equals three multiplied by two squared add two, which gives us 14.

To find 𝑓 double prime of two, we need to, first of all, find 𝑓 double prime of 𝑥, which we find by differentiating the first derivative, to get six 𝑥. And so 𝑓 double prime of two equals six multiplied by two, which is 12.

We then substitute these values into our workings. From here, we can evaluate these factorials. We know that the factorial of a number is the product of that number and all the integers below it to one. So one factorial is one multiplied by one, which is one. And two factorial is two multiplied by one, which is two. From here, we just need to do some simplification. 14 over one is just 14, and 12 over two is just six. And so that gives us our final answer: nine add 14 multiplied by 𝑥 minus two add six multiplied by 𝑥 minus two squared.

Find the Taylor polynomials of the third degree approximating the function 𝑓 of 𝑥 equals the square root of 𝑥 at the point 𝑎 equals nine.

Let’s start this question by writing out the general form for Taylor polynomials up to degree 𝑛. And let’s begin by substituting in the point where we’re centering our approximation, at 𝑎 equals nine. Also note that we’ve also been asked to find the Taylor polynomials up to the third degree. From here, we can see that we’re going to need to find 𝑓 of nine, 𝑓 prime of nine, 𝑓 double prime of nine, and 𝑓 triple prime of nine. To do this, we’re going to need to find 𝑓 prime of 𝑥, 𝑓 double prime of 𝑥, and 𝑓 triple prime of 𝑥.

Well, we know from the question that 𝑓 of 𝑥 equals the square root of 𝑥, which we know is the same as 𝑥 to the half power. Writing it this way is going to help us differentiate it to find the first derivative. Using the power rule, which tells us to multiply by the power and then subtract one from the power, gives us the first derivative. 𝑓 prime of 𝑥 equals one over two 𝑥 to the power of negative one-half.

And we then differentiate this to get the second derivative of 𝑓. Applying the power rule again gives us that the second derivative of 𝑓 is negative one over two multiplied by one over two 𝑥 to the power of negative three over two. But we can just simplify this to negative one over four 𝑥 to the power of negative three over two.

And we differentiate once more to get the third derivative of 𝑓. This gives us negative three over two multiplied by negative one over four 𝑥 to the power of negative five over two. But again, we can simplify this to give us three over eight 𝑥 to the power of negative five over two.

But what we actually want here is 𝑓 of nine, 𝑓 prime of nine, 𝑓 double prime of nine, and 𝑓 triple prime of nine. So we substitute nine into each of these functions. And then we substitute the values that we found back into our working. And from here, we just need to do some simplification to achieve our final answer.

If we start here with one over six over one factorial and we recall that 𝑛 factorial is the product of 𝑛 and all the integers below it down to one. Then one factorial is just one. So one over six over one factorial is just one over six over one, which is just one over six.

Now let’s simplify negative one over 108 divided by two factorial. Well, two factorial is just two multiplied by one, which is two. So this is just negative one over 108 over two. And we know from fraction laws that this is just negative one over 108 multiplied by two, which is negative one over 216. And finally, we need to simplify one over 648 divided by three factorial. Well, three factorial is three multiplied by two multiplied by one, which is six. So this is just one over 648 multiplied by six, which gives us one over 3888. So that gives us our final answer. The Taylor polynomials of the third degree approximating the function 𝑓 of 𝑥 equals the square root of 𝑥 at the point 𝑎 equals nine.

Find the fourth-degree polynomial of the function 𝑓 of 𝑥 equals sin of 𝑥 at the point 𝑎 equals 𝜋 over two.

Let’s start by writing out the general form for a Taylor polynomial which approximates a function 𝑓 of 𝑥 at the point 𝑥 equals 𝑎. We’ve been asked to find the fourth-degree Taylor polynomial of this function at the point 𝑎 equals 𝜋 over two. So let’s write out our general form for a Taylor polynomial up to the fourth degree and substitute in 𝑎 equals 𝜋 over two.

We can see here that we’re going to need to substitute in values for 𝑓 of 𝜋 over two, the first derivative of 𝑓 at 𝜋 over two, the second derivative of 𝑓 at 𝜋 over two, the third derivative of 𝑓 at 𝜋 over two, and the fourth derivative of 𝑓 at 𝜋 over two.

So let’s start by finding the derivatives that we need. 𝑓 of 𝑥 is the function sin of 𝑥. At this point, we recall this useful cycle, which shows us what each of these functions differentiates to. So we see that sin of 𝑥 differentiates to cos of 𝑥. So 𝑓 prime of 𝑥 equals cos of 𝑥. Then we differentiate the first derivative to get the second derivative. And we see that this is going to be negative sin of 𝑥. We then differentiate again to get the third derivative, which we see is negative cos of 𝑥. And we differentiate once more to get the fourth derivative of 𝑓. And we get sin of 𝑥.

But what we actually need to do is evaluate each of these functions at 𝜋 over two. So we substitute in 𝜋 over two into each of these functions. We can work these out either on a calculator or by using the graphs. So we can see that sin of 𝜋 over two is going to give us one. So negative sin of 𝜋 over two will be negative one. And we can see that cos of 𝜋 over two is zero. So negative cos of 𝜋 over two will also be zero.

So now we can substitute these values back into our working. When we do this, we find that two of our terms are actually zero. From here, we just need to simplify our answer. Remembering that the factorial of a number is the product of that number and the integers below it down to one. So two factorial is two multiplied by one, which is two. And four factorial is four multiplied by three multiplied by two multiplied by one, which is 24. So substituting those values gives us our final answer.

So to summarize, Taylor polynomials allow us to approximate functions. And here is the general form of the Taylor polynomial which approximates the function 𝑓 centered at the point 𝑎. A good place to start with these questions is by finding the necessary derivatives and then evaluating these at the point 𝑎.