Lesson Video: Taylor Polynomials Approximation to a Function | Nagwa Lesson Video: Taylor Polynomials Approximation to a Function | Nagwa

Lesson Video: Taylor Polynomials Approximation to a Function Mathematics • Higher Education

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 π‘Ž.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy