Jump to a key chapter
Taylor Series Definition and Example
A specific type of power series is the Taylor series. In fact the Taylor series is a great way of defining a series. By looking at the definition you will see that the Taylor series can mimic any function since it is defined based on the derivatives of the function. Let's begin by looking at its definition and an example:
Let \( f \) be a function that has derivatives of all orders at \( x=a \). The Taylor Series for \( f \) at \( x=a \) is
\[ T_f(x) = f(a) + f'(a)(x-a)+\dfrac{f''(a)}{2!}(x-a)^2+\cdots +\dfrac{f^{(n)}(a)}{n!}(x-a)^n+\cdots \]
Where \(T_f\) means the Taylor series of \(f\), and \( f^{(n)} \) indicates the \( n\)-th derivative of \( f \).
First, notice that this is indeed a power series centered in \( x=a\), where each coefficient is given by
\[\dfrac{f^{(n)}(a)}{n!}. \]
In other words, each term of the Taylor series is based on the derivatives of \( f \) at \( x=a \), so in order to write the Taylor series you need to have a function \( f\) that can be differentiated over and over. Let's take a look at an example.
Write the Taylor series for \( f(x) = e^x \) at \( x=1\).
Answer:
- Let's start by differentiating \( f \):
\[ \begin{align} f(x) &= e^x \\ f'(x) &= e^x \\ f''(x)&=e^x .\end{align} \]
You can quickly see that if you keep taking the derivatives, there is a pattern:
\[ f^{(n)}(x)=e^x.\]
- Now let's evaluate \( f^{(n)}\) at \( x=1 \):
\[ f^{(n)}(1)=e.\]
- Putting this together with the definition,
\[ T_f(x) = e + e(x-1)+\dfrac{e}{2!}(x-1)^2+\cdots +\dfrac{e}{n!}(x-1)^n+\cdots \]
Using the summation notation (also known as sigma notation), the Taylor series for \( f(x) = e^x \) at \( x=1\) can be written as:
\[ T_f(x) = \sum_{n=0}^{\infty}\dfrac{e}{n!}(x-1)^n. \]
Notice that in this example, you quickly wrote the function \( f(x)=e^x\) as a power series in a simple and straightforward way by only knowing its derivatives.
Taylor Series Formula
The Taylor series is often presented in different ways, depending on how it is being used. However, its formula keeps the same pattern. Let's check how to represent it using summation notation:
Let \( f \) be a function that has derivatives of all orders at \( x=a \). The Taylor Series for \( f \) at \( x=a \) is
\[ T_f(x) = \sum_{n=0}^{\infty}\dfrac{f^{(n)}(a)}{n!}(x-a)^n , \]
where \( f^{(n)} \) indicates the \( n\)-th derivative of \( f \), and \( f^{(0)}\) is the original function \( f\).
For the sake of space, let's use the summation representation of the Taylor series going forward. Now let's look at an example involving a familiar function.
Write the Taylor series for
\[f(x) = \dfrac{1}{1-x} \]
at \( x=0\).
Answer:
- Let's start by differentiating \( f \):
\[ \begin{align} f(x) &= \dfrac{1}{(1-x)} \\ f'(x) &= \dfrac{1}{(1-x)^2} \\ f''(x)&=\dfrac{2}{(1-x)^3} \\ f'''(x)&=\dfrac{6}{(1-x)^4}. \end{align} \]
If you keep taking the derivatives, you can see the following pattern:
\[ f^{(n)}(x)=\dfrac{n!}{(1-x)^{n+1}}.\]
- Now let's evaluate \( f^{(n)}\) at \( x=0 \):
\[ f^{(n)}(0)=n!.\]
- Putting this together with the definition,
\[ \begin{align} T_f(x) &= \sum_{n=0}^{\infty}\dfrac{n!}{n!}x^n \\ &= \sum_{n=0}^{\infty}x^n .\end{align} \]
Therefore, you have the Taylor series for the function
\[ f(x) = \dfrac{1}{1-x} \]
at \( x=0\).
Although you found the Taylor series of \( f\) in the previous example, if you look back into the geometric series, the above series is only convergent if \( |x|<1\). This brings back two important definitions from the power series article, the radius of convergence and the interval of convergence, which you need to consider to write any power function. By doing that you can figure out if the series converges for every value of \( x \), or if it only converges for a specific interval.
Check the radius and interval of convergence for the Taylor series of \( f(x)=e^x \) at \( x=1\).
Answer:
As you already know from the first example, the Taylor series of \( f\) at \( x=1 \) is
\[ T_f(x) = \sum_{n=0}^{\infty}\dfrac{e}{n!}(x-1)^n . \]
- To find the radius and interval of convergence, you need to check if
\[ \lim\limits_{n \to \infty} \left| \frac{a_{n+1}}{a_n} \right| <1.\]
- For the series \( T_f \), you have
\[ a_n= \dfrac{e}{n!}(x-1)^n.\]
- Putting \( a_n \) into the limit and simplifying it:
\[ \begin{align} L &= \lim\limits_{n \to \infty} \left| \frac{a_{n+1}}{a_n} \right| \\ &= \lim\limits_{n \to \infty} \left| \frac{e(x-1)^{n+1}}{(n+1)!}\cdot \frac{n!}{e(x-1)^{n}}\right| \\ &=\lim\limits_{n \to \infty} \left| \frac{x-1}{(n+1)}\right| \\ &=|x-1|\lim\limits_{n \to \infty} \frac{1}{(n+1)} \\ &= 0.\end{align}\]
Therefore, as the limit is always smaller than one, and is in fact independent of the value of \( x \), the interval of convergence is \( (-\infty, \infty)\) with the radius of convergence being \( R=-\infty\).
Taylor Series Expansion
Now that you know how to write the Taylor series given a function and the center point, you can write a series expansion for any function that has derivatives of all orders. First let's define when you can say that \( f(x) = T_f(x)\).
Let \( f \) be a function that has derivatives of all orders at \( x=a \), and let \(T_f\) be the Taylor Series for \( f \) at \( x=a \). Then for every value of \(x\) inside the interval of convergence,
\[ f(x) = \sum_{n=0}^{\infty}\dfrac{f^{(n)}(a)}{n!}(x-a)^n = T_f(x) . \]
In other words, inside the interval of convergence, the Taylor series \(T_f\) and the function \(f\) are precisely the same, and \( T_f \) is a power series expansion of \(f\).
Find a power series expansion for the function \( f(x)=\sin(x)\) centered at \(x=\pi\).
Answer:
To find such expansion, you need to find the Taylor series of \(\sin(x)\) at \(x=\pi\).
- First, let's calculate the derivatives of \(\sin(x)\)
\[ \begin{align} f(x) &= \sin(x) \\ f'(x) &= \cos(x) \\ f''(x)&=-\sin(x) \\ f'''(x)&=-\cos(x) . \end{align} \]
If you keep taking the derivatives, you can see the following pattern
- If \(n\) is even:
\[ f^{(n)}(x)=(-1)^{\tfrac{n}{2}}\sin(x) .\]
- If \(n\) is odd:
\[ f^{(n)}(x)=(-1)^{\tfrac{n-1}{2}}\cos(x).\]
- Now let's evaluate \(f^{(n)}\) at \( x=\pi\):
If \(n\) is even:
\[ \begin{align} f^{(n)}(x)&=(-1)^{\tfrac{n}{2}}\sin(\pi) \\ &=0 \end{align}\]
If \(n\) is odd:
\[ \begin{align}f^{(n)}(x)&=(-1)^{\tfrac{n-1}{2}}\cos(\pi) \\ &=(-1)^{\tfrac{n+1}{2}} .\end{align}\]
- Applying it in the Taylor series definition
\[\begin{align}T_f(x)&=0-(x-\pi)+0+\dfrac{(x-\pi)^3}{3!}+0-\dfrac{(x-\pi)^5}{5!}+\dots \\ &=-(x-\pi)+\dfrac{(x-\pi)^3}{3!}-\dfrac{(x-\pi)^5}{5!}+\dfrac{(x-\pi)^7}{7!}+\dots\end{align}\]
- Writing it in summation notation:
\[ T_f(x)=\sum_{n=0}^{\infty} (-1)^n\dfrac{(x-\pi)^{2n+1}}{(2n+1)!} .\]
- Now, let's check the convergence interval:
\[ \begin{align} L&=\lim\limits_{n \to \infty} \left| \dfrac{(-1)^{n+1}(x-\pi)^{2(n+1)+1}}{(2(n+1)+1)!}\cdot\dfrac{(2n+1)!}{(-1)^{n}(x-\pi)^{2n+1}} \right| \\ &=\lim\limits_{n \to \infty} \left| \dfrac{(x-\pi)^{2}}{(2n+3)(2n+2)}\right| \\ &=\left| (x-\pi)^{2}\right|\lim\limits_{n \to \infty} \left| \dfrac{1}{(2n+3)(2n+2)}\right| \\ &= 0 .\end{align}\]
Therefore for all values of \( x\) you have the power series expansion of \(f(x)=\sin(x)\) at \(x=\pi\) is
\[ f(x)=\sum_{n=0}^{\infty} (-1)^n\dfrac{(x-\pi)^{2n+1}}{(2n+1)!}.\]
Taylor Series Approximation
Taylor series are indeed a great way of writing a function as a power series, but sometimes you don't need the whole Taylor series equal to the function, you just need an approximation to the function. That leads to the Taylor series approximation.
Let \( f \) be a function that is \(n\)-differentiable at \(x=a\), then the function
\[\begin{align} P_n(x)&=f(a)+f'(a)(x-a)+f''(a)(x-a)^2 \\ &\quad+\dots+f^{(n)}(x-a)^n \end{align}\]
Is an approximation of \(f(x)\) around \(x=a\).
You say that a function \(f\) is \(n\)-differentiable at a point, if you can calculate the first \(n\) derivatives of \(f\).
If you compare the above definition with the first definition of the Taylor series, you will see that this is the first part of the series. Therefore you can say that despite an error, the function \(f\) is approximately equal to \(P_n\). In other words,
\[\begin{align} f(x)&=P_n(x)+e(x) \\ f(x)&\approx P_n(x),\end{align}\]
where \(e(x)\) is the difference between the Taylor series and \(P_n(x)\). Here \(e(x)\) is called the error function for the Taylor series.
Back in the Taylor series expansion for \(\sin(x)\) at \(x=\pi\), you had the following series:
\[\begin{align}T_f(x)&=\sum_{n=0}^{\infty} (-1)^n\dfrac{(x-\pi)^{2n+1}}{(2n+1)!} \\ &=-(x-\pi)+\dfrac{(x-\pi)^3}{3!}-\dfrac{(x-\pi)^5}{5!}+\dfrac{(x-\pi)^7}{7!}+\dots\end{align}\]
You only have odd powers because the derivatives of the even functions were zero at \(x=\pi\). That means you can say each \(P_n\) where \(n\) is odd is an approximation for \(\sin(x)\):
\[\begin{align} P_1(x)&=-(x-\pi) \\ P_3 (x) &=-(x-\pi)+\dfrac{(x-\pi)^3}{3!} \\ P_5(x)&=-(x-\pi)+\dfrac{(x-\pi)^3}{3!}-\dfrac{(x-\pi)^5}{5!} \\ P_7(x) &=-(x-\pi)+\dfrac{(x-\pi)^3}{3!}-\dfrac{(x-\pi)^5}{5!}+\dfrac{(x-\pi)^7}{7!} .\end{align}\]
Let's compare the behavior of each \(P_n\) function with the sine function:
Notice that if you increase the order of the function \( P_n(x)\) (in other words you increase the value of \(n\)), the approximation gets closer to the original function \( f(x)\). Therefore the degree of \(P_n\) defines how good an approximation of \(f\) it is. Also, notice that those approximations work only for numbers close to the center of the series, which in this case is \(x=\pi\).
Importance of Taylor Series
The main importance of Taylor series is surely finding other ways of expressing functions. In some of the examples you have seen, once you have written a function as a power series, it gets much easier to evaluate the function because you are evaluating only powers. The Taylor series can also make it easier to find other information, as derivatives and integrals of functions. Let's look at one classic example.
What is the indefinite integral of \(f(x)=e^{x^2}\)?
Answer:
This function is well known in the math field as an example of a function that does not have an antiderivative that can be written in terms of the elementary functions that you know. If you try to evaluate this integral you will see that all the integral techniques you know are not enough to solve it! Until now that is. With the Taylor series you can do it!
- Let's first write the Taylor series of \(e^x\) centered at \(x=0\). As you know that the derivative of \( e^x\) is equal to itself, so:
\[ \begin{align} e^x&=\sum_{n=0}^{\infty} \dfrac{f^{(n)}(0)x^n}{n!} \\ &=\sum_{n=0}^{\infty} \dfrac{e^0x^n}{n!} \\ &=\sum_{n=0}^{\infty} \dfrac{x^n}{n!}. \end{align}\]
- Now, using the Taylor series of \(e^x\) let's apply it to \(x^2\) by substituting \(x^2\) in for every \(x\) in the Taylor series of \(e^x\) centered at \(x=0\):
\[ \begin{align} e^{x^2}&=\sum_{n=0}^{\infty} \dfrac{(x^2)^n}{n!} \\ &=\sum_{n=0}^{\infty} \dfrac{x^{2n}}{n!}. \end{align}\]
- To better understand the series, let's expand it to get
\[ \begin{align} e^{x^2}&=1+x^2+\dfrac{x^4}{2}+\dfrac{x^6}{6} +\dfrac{x^8}{24}+\dots\end{align}\]
- Now, let's take the integral on both sides of the above equation:
\[ \begin{align} \int e^{x^2} \, \mathrm{d}x &=\int \left( 1+x^2+\dfrac{x^4}{2}+\dfrac{x^6}{6} +\dfrac{x^8}{24}+\dots\right) \, \mathrm{d}x .\end{align}\]
- Using your power functions integration knowledge you have
\[ \begin{align} \int e^{x^2} \, \mathrm{d}x &=C+ x+\dfrac{x^3}{3}+\dfrac{x^5}{10} \\ &\quad+\dfrac{x^6}{36} +\dfrac{x^8}{192}+\dots \end{align}\]
Therefore you have the indefinite integral of \(e^{x^2}\) written as a power series thanks to the Taylor series!
Taylor Series - Key takeaways
- Taylor Series of \(f\) centered at \(x=a\)\[ T_f(x) = \sum_{n=0}^{\infty}\dfrac{f^{(n)}(a)}{n!}(x-a)^n \]
- Inside the convergence interval the Taylor Series is equal to \(f\)\[ f(x) = \sum_{n=0}^{\infty}\dfrac{f^{(n)}(a)}{n!}(x-a)^n \]
- To find the convergence interval you need to apply the Ratio Test\[ \lim\limits_{n \to \infty} \left| \frac{a_{n+1}}{a_n} \right| <1\]
- A Taylor series approximation of \(f\) is definite as the first \(n\) terms of the Taylor series\[\begin{align}P_n(x)&=f(a)+f'(a)(x-a)+f''(a)(x-a)^2 \\ &\quad +\dots+f^{(n)}(x-a)^n\end{align}\]
Learn with 2 Taylor Series flashcards in the free StudySmarter app
We have 14,000 flashcards about Dynamic Landscapes.
Already have an account? Log in
Frequently Asked Questions about Taylor Series
What is Taylor series?
Taylor series is a specific type of power series, where you can write any function, that has derivatives of all orders, in terms of its derivatives and power functions.
What is a Taylor series used for?
It is used to express functions in terms of power series. Therefore you can apply the properties of power functions to solve problems.
How is Taylor series used in real life?
The most common application of Taylor series is finding approximations of nontrivial functions such as trigonometric functions, hyperbolic functions, root functions, etc.
What is order in Taylor series?
It refers to the order of the polynomial when you use a Taylor series approximation of a function.
What is the formula of Taylor's theorem?
The formula is based on the derivatives of the function, the center point, and power functions. To see the whole formula take a look at our Taylor Series article.
About StudySmarter
StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.
Learn more