Taylor Series and Maclaurin Series
In order to understand Taylor and Maclaurin Series, we need to first look at power series.
What are Power Series?
A power series is basically a series with the variable x in it. Formally speaking, the power series formula is:
where are the coefficients of each term in the series and is a constant. Power series are important because we can use them to represent a function. For example, the power series representation of the function < is:
where and .However, what if I want to find a power series representation for the integral of ? All you have to do is integrate the power series.
Find a Power Series Representation for the function
Question 1: Find a power series representation for the integral of the function
-
Recall that earlier we said that:
So if we integrate both sides, then we get:
To find , we set . So we have:
Notice that is equal to 0. So we get:
Hence we can conclude that:
If you want, you can make the series start at instead, making the series become:
Power Series to a Taylor Series
Now this is where Taylor and Maclaurin Series come in. Taylor Series and Maclaurin Series are very important when we want to express a function as a power series. For example, and can be expressed as a power series! First, we will examine what Taylor Series are, and then use the Taylor Series Expansion to find the first few terms of the series. Then we will learn how to represent some function as a Taylor series, and even differentiate or integrate them. Lastly, we will look at how to derive Taylor Polynomials from Taylor Series, and then use them to approximate functions. Note that we will also look at Maclaurin Series.
What is a Taylor Series
So what exactly are Taylor Series? If possible (not always), we can represent a function about as a Power Series in the form:
where is the derivative about . This is the Taylor Series formula. If it is centred around , then we call it the Maclaurin Series. Maclaurin Series are in the form:
Here are some commonly used functions that can be represented as a Maclaurin Series:
We will learn how to use the Taylor Series formula later to get the common series, but first let's talk about Taylor Series Expansion.
Taylor Series Expansion
Of course if we expand the Taylor series out, we will get:
This is known as the Taylor Expansion Formula. We can use this to compute an infinite number of terms for the Taylor Series.
Finding the First Few Terms
For example, let's say I want to compute the first three terms of the Taylor Series about .
Question 2: Find the first three terms of the Taylor Series for .
- We will use the Taylor Series Expansion up to the third term. In other words, the first three terms are:
Note that this is centred about , hence we know
We also know that taking derivatives gives us:
Hence plugging into each of these functions will give us:
So we know that the first three terms are:
Finding the Taylor Series
Instead of finding the first three terms of the Taylor series, what if I want to find all the terms? In other words, can I find the Taylor Series which can give me all the terms? This is possible; however it can be difficult because you need to notice the pattern. Let's try it out!
Question 3: Find the Taylor Series of at .
- Recall that the Taylor Expansion is:
We know the first three terms, but we don't know any terms after. In fact, there are an infinite amount of terms after the third term. So how is it possible to figure what the term is when →? Well, we look for the pattern of the derivatives. If we are able to spot the patterns, then we will be able to figure out the derivative is. Let's take a few derivatives first. Notice that:
The more derivatives you take, the most you realize that you will just get back. Hence we can conclude that the derivative is:
Furthermore we know at , hence
Therefore plugging this in into the Taylor Series Formula gives:
Notice that this Taylor Series for is different from the Maclaurin Series for . This is because this one is centred at , while the other is centred around .You may have noticed that finding the derivative was really easy here. What if the derivative was not so easy to spot?
Question 4: Find the Taylor Series of centred around .
- Notice that if we take a few derivatives, we get:
Now the derivative is not easy to spot here because the derivatives keep switching from cosine to sine. However, we do notice that the derivative goes back again. This means that if we derive more after the derivative, then we are going to get the same things again. We may see the pattern, but it doesn't tell us much about the derivative. Why don't we plug into the derivatives?
Now we are getting something here. The values of the derivative are always going to be 0, -1, or 1. Let's go ahead and find the first six terms of the Taylor Series using these derivative.
If we are to add all the terms together (including term after the sixth term), we will get:
This is the Taylor Expansion of . Notice that every odd term is 0. In addition, every second term has interchanging signs. So we are going to rewrite this equation to:
Even though we have these three terms, we can pretty much see the patterns of where this series is going. The powers of are always going to be odd. So we can generalize the powers to be . The factorials are also always odd. So we can generalize the factorials to be . The powers of -1 always go up by 1, so we can generalize that to be . Hence, we can write the Taylor Series as
which is a very common Taylor series. Note that you can use the same strategy when trying to find the Taylor Series for .
Question 5: Find the Taylor Series of f(x) = cosx centred around.
- Notice that if we take a few derivatives, we get:
Again, the derivative is not easy to spot here because the derivatives keep switching from cosine to sine. However, we do notice that the derivative goes back again. This means if we derive more after the derivative, then we are going to get a loop. Now plugging in we have
Again, the values of the derivative are always going to be 0, -1, or 1. Let's find the first six terms of the Taylor Series using the derivatives from above.
If we are to add all the terms together (including term after the sixth term), we will get:
Notice that this time all even terms are 0 and every odd term have interchanging signs. So we are going to rewrite this equation to:
We pretty much know the pattern here. The powers of x are always even. So we can generalize the powers to be . The factorials are always even, so we can generalize them to be . Lastly, the powers of -1 goes up by 1. So we can generalize that to be n. Hence, we can write the Taylor Series as:
Taylor Expansion Relationship of cosx and sinx
- Notice that the Maclaurin Series of and are very similar. In fact, they only defer by the powers. If we were to expand the Taylor series of and , we see that:
We can actually find a relationship between these two Taylor expansions by integrating. Notice that we were to find the integral of , then
See that if , then
So the integral of cosine is
which is the Taylor Expansion of . Likewise, the integral of gives:
See if , then,
Then we are left with:
Dividing both sides of the equation by -1 gives:
which is the Taylor Expansion of .
Taylor Series of Harder Functions
Now that we know how to use the Taylor Series Formula, let's learn how to manipulate the formula to find Taylor Series of harder functions.
Question 6:Find the Taylor Series of .
- So we see that the function has in it. We know that has the common Taylor series:
So if we were to divide both sides by , then we will get:
We can manipulate the right hand side so that:
and so we just found the Taylor series for . Let's do a harder question.
Question 7: Find the Taylor Series of
-
Notice that cosine is in the function. So we probably want to use the Taylor Series:
See that inside the cosine is . So what were going to do is replace all the 's, and make them into . In other words,
Doing so gives us:
Now we are going to multiply both sides of the equation by . This leads to:
Now we are going to clean up the series a little bit so that everything is inside the general term.
Thus we are done and this is the Taylor Series of . If you want to do more practice problems, then I suggest you look at this link.
http://tutorial.math.lamar.edu/Problems/CalcII/TaylorSeries.aspxEach question has a step-by-step solution, so you can check your work!
Taylor Series Approximation
Note that the Taylor Series Expansion goes on as →, but in practicality we cannot go to infinity. As humans (or even computers) we cannot go on forever, so we have to stop somewhere. This means we need to alter the formula for us so that it is computable.
We alter the formula will be:
Notice that since we stopped looking for terms after n, we have to make it an approximation instead. This formula is known as the Taylor approximation. It is a well known formula that is used to approximate certain values.
Notice on the right hand side of the equation that it is a polynomial of degree n. We actually call this the Taylor polynomial . In other words, the Taylor polynomial formula is:
Let's do an example of finding the Taylor polynomial, and approximating a value.
Question 8: Find the degree Taylor Polynomial of centred at . Then approximate .
- If we are doing a Taylor Polynomial of degree 3 centred at , then use the formula up to the term:
Notice that taking the derivatives gives us:
We also know that , so:
Just in case you forgot, gives us 0. That's why . Now plugging everything into the formula of the degree Taylor polynomial gives:
Now we have to approximate . In order to do this, we need to use the Taylor polynomial that we just found. Notice that according to the Taylor approximation:
This means that:
If we are to set , then we will see that:
So is approximately around . See that in decimal form is 0.833333...
Now if you pull out your calculator, we are actually pretty close. The actual value of is 0.69314718056....
The Error Term
We know that Taylor Approximation is just an approximation. However, what if we want to know the difference between the actual value and the approximated value? We call the difference the error term, and it can be calculated using the following formula:
Keep in mind that the variable is a value that is between and , which gives the largest possible error.
Let's use the error term formula to find the error of our previous question.
Question 9: Find the error of .
- In order to find the error, we need to find
Notice from our previous question that we found the Taylor polynomial of degree 3. So we set . This means we need to find:
See that the fourth derivative of the function is:
Now our function is in terms of , but we need it in term of . So we just set . This means that:
So plugging this into our error term formula gives us:
Remember that we set and , so we have:
Since we are talking the error of our approximation, the negative sign doesn't matter here. So realistically we are looking at:
Now recall that is a number between and which makes the error term the largest value. In other words, must be:
because , and . Now what value must we pick so that our error term is the largest?
Notice that the variable is in the denominator. So if we pick smaller values of , then the error term will become bigger. Since the smallest value of we can pick is 1, then we set . Thus,
is our error.
Taylor's Theorem
Now think of it like this. If we were to add the error term and the approximated value together, wouldn't I get the actual value? This is correct! In fact, we can say this formally. If the Taylor polynomial is the approximated function and is the error term, then adding them gives the actual function. In other words,
This is known as Taylor Theorem.
Donde es la enésima derivada de la función cuando .
Cuando , entonces esta es una serie de Maclaurin. Las series de Maclaurin tienen forma de:
Antes de comenzar nuestra lección, a continuación presentamos algunas fórmulas que pueden ser de utilidad: