<< Hide Menu

📚

 > 

♾️ 

 > 

10.14 Finding Taylor or Maclaurin Series for a Function

1 min readjune 18, 2024

Avanish Gupta

Avanish Gupta

Avanish Gupta

Avanish Gupta

10.14 Finding Taylor or Maclaurin Series for a Function

Taylor who now? And no, we’re not talking about the iconic artist that has reached global audiences shown below. 🎸

Untitled

Image courtesy of Wikimedia Commons

🤔 What’s a Taylor Series?

Even so, Taylor series are as iconic as Taylor Swift in a sense that they combine the following ideas:

  1. [From 10.11] We can approximate functions as polynomials using the Taylor approximations theorem.
  2. [From 10.13] We can represent functions as power series, which is made up of a sequence and a real number serving as its center.

Taylor Series: For a function f(x), its Taylor series approximation at x = a is:

n=0f(n)(a)n!(xa)n=f(a)+f(a)(xa)+f(a)2!(xa)2+f(a)3!(xa)3+...+f(n)(a)n!(xa)n\sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}\cdot(x-a)^n=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+...+\frac{f^{(n)}(a)}{n!}(x-a)^n

Where f(n)(a)f^{(n)}(a) is the nthn^{\text{th}} deriviative of the function and f(0)(a)=f(x)f^{(0)}(a)=f(x).

A Taylor series, essentially, is a representation of a function as an infinite sum of terms that are calculated from the values of the function's derivatives at a single point. It allows us to approximate functions and calculate their values at different points. ✅

You might also come across a series called Maclaurin series. If you do, don’t be scared! In fact, Taylor series centered at x = 0 are so common that they have a special name called the Maclaurin series.

In other words, a Taylor polynomial is a finite polynomial with a limited number of terms, while a Taylor series is an infinite summation of terms. To construct a Taylor polynomial of degree 𝑛 for a function f(x) at x = c, you’d have to evaluate f and its first n derivatives at x = c.

Conversely, to form the Taylor series of f, it’s helpful to identify a pattern describing the nth derivative of f at x = c. When identifying Taylor series, pattern recognition will come up as a good skill to have! 🧩

✏️ Important Maclaurin Series to Remember

One thing to note: We emphasize learning Maclaurin series as they are Taylor Series centered at x = 0. If you are given a center value in an exam setting and you remember the Maclaurin series representation, all you need to do is add the radius term (e.g., "x - c” instead of just “x”) in every term and then simplify the terms. Study smart! 🧠

f(x)SeriesRepresentationExpandedForm11xn=0xn1+x+x2+x3+...11+xn=0(x)n1x+x2x3+...11+x2n=0(x)2n1x2+x4x6+...11x2n=0x2n1+x2+x4+x6+...exn=0xnn!1+x+x22+x33!+...sin(x)n=0(1)nx2n+1(2n+1)!xx33!+x55!+...cos(x)n=0(1)nx2n(2n)!1x22+x44!+...ln(1+x)n=0(1)nxnnxx22+x33+...(1+x)an=1(an)xn1+ax+a(a1)2x2+a(a1)(a2)3!x3+...+a(a1)(a2)...(a(a(n1))n!xn \begin{array}{ |c|c|c| } \hline f(x)& Series \enspace Representation & Expanded \enspace Form \\\\ \frac{1}{1-x} & \sum_{n=0}^\infty{x^n} & 1+x+x^2+x^3+... \\\\ \frac{1}{1+x} & \sum_{n=0}^\infty{(-x)^n} & 1-x+x^2-x^3+... \\\\ \frac{1}{1+{x}^2} & \sum_{n=0}^\infty{(-x)^{2n}} & 1-x^2+x^4-x^6+... \\\\ \frac{1}{1-{x}^2} & \sum_{n=0}^\infty{x^{2n}} & 1+x^2+x^4+x^6+... \\\\ e^x & \sum_{n=0}^\infty\frac{x^n}{n!} & 1+x+\frac{x^2}{2}+\frac{x^3}{3!}+... \\\\ sin(x) & \sum_{n=0}^\infty{(-1)^n\frac{x^{2n+1}}{(2n+1)!}} & x-\frac{x^3}{3!}+\frac{x^5}{5!}+... \\\\ cos(x) & \sum_{n=0}^\infty{(-1)^n\frac{x^{2n}}{(2n)!}} & 1-\frac{x^2}{2}+\frac{x^4}{4!}+... \\\\ ln(1+x) & \sum_{n=0}^\infty{(-1)^n\frac{x^{n}}{n}} & x-\frac{x^2}{2}+\frac{x^3}{3}+... \\\\ (1+x)^a & \sum_{n=1}^\infty{a \choose n}x^n & 1+ax+\frac{a(a-1)}{2}x^2+\frac{a(a-1)(a-2)}{3!}x^3+...+\frac{a(a-1)(a-2)...(a-(a-(n-1))}{n!}x^n \\\\ \hline \end{array}

You’ll notice a couple things:

  1. The first four are variations of the geometric series, with the multiplying factor being various powers of x. The series (1+x)a(1+x)^a is also known as the binomial series with any arbitrary value of a.
  2. The Maclaurin series for sin(x), cos(x), and exe^x provides the foundation for constructing the Maclaurin series for other functions!

If you take a closer look at observation (2), you’ll find that if you add the Maclaurin series terms of sin(x) and cos(x), you’ll get the Maclaurin series for exe^x. Hence, there three functions are important “must know” Maclaurin functions if you are pressed for time! The reason for this phenomenon is that the sine function is an odd function, so all the terms have odd powers, which is a contrast to the cosine function, which is even, and thus have even powers.


❓ Taylor Series Practice Problems

Now that we’ve introduced the concept of Taylor series, let’s deal with some practice problems! 😁

✏️ Taylor Series Question 1

Find the series representation of the Taylor series for f(x) = cos(3x) centered at x = 0.

The first thing screaming at you from the prompt is that the Taylor series is centered at x = 0… which indicates that we’re dealing with a Maclaurin function!

From our notes above, let’s pull the series representation for the parent cosine function, cos(x):

n=0(1)nx2n(2n)!\sum_{n=0}^\infty{(-1)^n\frac{x^{2n}}{(2n)!}}

Here’s the easy part: we replace “x” with “3x” and simplify wherever needed:

n=0(1)n(3x)2n(2n)!=n=0(1)n32nx2n(2n)!=n=0(1)n9nx2n(2n)!\sum_{n=0}^\infty{(-1)^n\frac{(3x)^{2n}}{(2n)!}}=\sum_{n=0}^\infty{(-1)^n\frac{3^{2n}x^{2n}}{(2n)!}}=\sum_{n=0}^\infty{(-1)^n\frac{9^{n}x^{2n}}{(2n)!}}

That’s all you need to do! Again, the more comfortable you can with recalling the major players in their Maclaurin series form, the quicker you’ll be in solving these problems!

✏️ Taylor Series Question 2a

Find the Taylor series centered at x = 5 for the function f(x)=e2xf(x)=e^{2x}.

Let’s find the first couple derivatives of this function and see if we can notice a pattern:

f(x)=e2xf(x) = e^{2x}
f(x)=2e2xf'(x) = 2e^{2x}
f(x)=4e2x=(2)2e2xf''(x) = 4e^{2x} = (2)^2e^{2x}
f(3)(x)=8e2x=(2)3e2xf^{(3)}(x) = 8e^{2x} = (2)^3e^{2x}
f(4)(x)=16e2x=(2)4e2xf^{(4)}(x) = 16e^{2x} = (2)^4e^{2x}

That looks like a pattern to me! You’ll also notice that 2 is raised to the nth power when we’re looking for the nth derivative. Hmmm… 😳

This would mean that our Taylor series will perhaps look somewhat like this:

n=0xnn!=>n=0(2)ne2xxnn!\sum_{n=0}^\infty\frac{x^n}{n!} => \sum_{n=0}^\infty\frac{(2)^ne^{2x}x^n}{n!}

We’re not done yet, though! Remember that our center is x = 5. This means that we have to incorporate this in the xnx^n term and plug x = 5 into the e2xe^{2x} term. We leave the “n”s unchanged. These changes will give us:

n=0(2)ne2xxnn!=>n=0(2)ne25(x5)nn!=n=0(2)ne10(x5)nn!\sum_{n=0}^\infty\frac{(2)^ne^{2x}x^n}{n!}=>\sum_{n=0}^\infty\frac{(2)^ne^{2*5}(x-5)^n}{n!}=\sum_{n=0}^\infty\frac{(2)^ne^{10}(x-5)^n}{n!}

✏️ Taylor Series Question 2b

List the first four terms of the Taylor series centered at x = 5 for the function f(x)=e2xf(x)=e^{2x}.

Fear not! All you need to do is to plug n = 0, 1, 2, and 3 into the simplified Taylor series functions above as shown in the table below:

nTerm0(2)0e10(x5)00!=e101(2)1e10(x5)11!=2e10(x5)2(2)2e10(x5)22!=4e10(x5)22=2e10(x5)23(2)3e10(x5)33!=8e10(x5)3321=4e10(x5)33 \begin{array}{ |c|c| } \hline n & Term \\\\ 0 & \frac{(2)^0e^{10}(x-5)^0}{0!}=e^{10} \\\\ 1 & \frac{(2)^1e^{10}(x-5)^1}{1!} =2e^{10}(x-5)\\\\ 2 & \frac{(2)^2e^{10}(x-5)^2}{2!} =\frac{4e^{10}(x-5)^2}{2}=2e^{10}(x-5)^2\\\\ 3 & \frac{(2)^3e^{10}(x-5)^3}{3!}=\frac{8e^{10}(x-5)^3}{3*2*1}=\frac{4e^{10}(x-5)^3}{3} \\\\ \hline \end{array}

⭐ Summing Up Taylor and Maclaurin Series

Taylor (and by extension, Maclaurin) series tie in the polynomial approximation and power series theorem to allow for a convenient way to represent various functions as infinite series. For instance, the Taylor series for 11x\frac{1}{1-x} reflects a geometric series, while the Taylor series for exe^x relate sin(x) and cos(x) to their properties as odd and even functions, respectively. 👍

Knowing the Maclaurin series for common functions that show up in AP Calculus will help in identifying Taylor series representations and listing terms for Taylor series centered at various real numbers. Good luck! 💯