Reminding students about Taylor series (Part 6)

Sadly, at least at my university, Taylor series is the topic that is least retained by students years after taking Calculus II. They can remember the rules for integration and differentiation, but their command of Taylor series seems to slip through the cracks. In my opinion, the reason for this lack of retention is completely understandable from a student’s perspective: Taylor series is usually the last topic covered in a semester, and so students learn them quickly for the final and quickly forget about them as soon as the final is over.

Of course, when I need to use Taylor series in an advanced course but my students have completely forgotten this prerequisite knowledge, I have to get them up to speed as soon as possible. Here’s the sequence that I use to accomplish this task. Covering this sequence usually takes me about 30 minutes of class time.

I should emphasize that I present this sequence in an inquiry-based format: I ask leading questions of my students so that the answers of my students are driving the lecture. In other words, I don’t ask my students to simply take dictation. It’s a little hard to describe a question-and-answer format in a blog, but I’ll attempt to do this below.

In the previous posts, I described how I lead students to the definition of the Maclaurin series

$f(x) = \displaystyle \sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k$,

which converges to $f(x)$ within some radius of convergence for all functions that commonly appear in the secondary mathematics curriculum.

Step 7. Let’s now turn to trigonometric functions, starting with $f(x) = \sin x$.

What’s $f(0)$? Plugging in, we find $f(0) = \sin 0 = 0$.

As before, we continue until we find a pattern. Next, $f'(x) = \cos x$, so that $f'(0) = 1$.

Next, $f''(x) = -\sin x$, so that $f''(0) = 0$.

Next, $f'''(x) = -\cos x$, so that $f''(0) = -1$.

No pattern yet. Let’s keep going.

Next, $f^{(4)}(x) = \sin x$, so that $f^{(4)}(0) = 0$.

Next, $f^{(5)}(x) = \cos x$, so that $f^{(5)}(0) = 1$.

Next, $f^{(6)}(x) = -\sin x$, so that $f^{(6)}(0) = 0$.

Next, $f^{(7)}(x) = -\cos x$, so that $f^{(7)}(0) = -1$.

OK, it looks like we have a pattern… albeit more awkward than the patterns for $e^x$ and $\displaystyle \frac{1}{1-x}$. Plugging into the series, we find that

$\displaystyle \sin x= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} \dots$

If we stare at the pattern of terms long enough, we can write this more succinctly as

$\sin x = \displaystyle \sum_{n=0}^\infty (-1)^n \frac{x^{2n+1}}{(2n+1)!}$

The $(-1)^n$ term accounts for the alternating signs (starting on positive with $n=0$), while the $2n+1$ is needed to ensure that each exponent and factorial is odd.

Let’s see… $\sin x$ has a Taylor expansion that only has odd exponents. In what other sense are the words “sine” and “odd” associated?

In Precalculus, a function $f(x)$ is called odd if $f(-x) = -f(x)$ for all numbers $x$. For example, $f(x) = x^9$ is odd since $f(-x) = (-x)^9 = -x^9$ since 9 is a (you guessed it) an odd number. Also, $\sin(-x) = -\sin x$, and so $\sin x$ is also an odd function. So we shouldn’t be that surprised to see only odd exponents in the Taylor expansion of $\sin x$.

A pedagogical note: In my opinion, it’s better (for review purposes) to avoid the $\displaystyle \sum$ notation and simply use the “dot, dot, dot” expression instead. The point of this exercise is to review a topic that’s been long forgotten so that these Taylor series can be used for other purposes. My experience is that the $\displaystyle \sum$ adds a layer of abstraction that students don’t need to overcome for the time being.

Step 8. Let’s now turn try $f(x) = \cos x$.

What’s $f(0)$? Plugging in, we find $f(0) = \cos 1 = 0$.

Next, $f'(x) = -\sin x$, so that $f'(0) = 0$.

Next, $f''(x) = -\cos x$, so that $f'(0) = -1$.

It looks like the same pattern of numbers as above, except shifted by one derivative. Let’s keep going.

Next, $f'''(x) = \sin x$, so that $f'''(0) = 0$.

Next, $f^{(4)}(x) = \cos x$, so that $f^{(4)}(0) = 1$.

Next, $f^{(5)}(x) = -\sin x$, so that $f^{(5)}(0) = 0$.

Next, $f^{(6)}(x) = -\cos x$, so that $f^{(6)}(0) = -1$.

OK, it looks like we have a pattern somewhat similar to that of $\sin x$, except only involving the even terms. I guess that shouldn’t be surprising since, from precalculus we know that $\cos x$ is an even function since $\cos(-x) = \cos x$ for all $x$.

Plugging into the series, we find that

$\displaystyle \cos x= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \dots$

If we stare at the pattern of terms long enough, we can write this more succinctly as

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

As we saw with $e^x$, the above series converge quickest for values of $x$ near $0$. In the case of $\sin x$ and $\cos x$, this may be facilitated through the use of trigonometric identities, thus accelerating convergence.

For example, the series for $\cos 1000^o$ will converge quite slowly (after converting $1000^o$ into radians). However, we know that

$\cos 1000^o= \cos(1000^o - 720^o) =\cos 280^o$

using the periodicity of $\cos x$. Next, since $\latex 280^o$ is in the fourth quadrant, we can use the reference angle to find an equivalent angle in the first quadrant:

$\cos 1000^o = \cos 280^o = \cos(360^o - 80^o) = \cos 80^o$

Finally, using the cofunction identity $\cos x = \sin(90^o - x)$, we find

$\cos 1000^o = \cos 80^o = sin(90^o - 80^o) = \sin 10^o$.

In this way, the sine or cosine of any angle can be reduced to the sine or cosine of some angle between $0^o$ and $45^o = \pi/4$ radians. Since $\pi/4 < 1$, the above power series will converge reasonably rapidly.

Step 10. For the final part of this review, let’s take a second look at the Taylor series

$e^x = \displaystyle 1 + x + \frac{x^2}{2} + \frac{x^3}{3} + \frac{x^4}{4} + \frac{x^5}{5} + \frac{x^6}{6} + \frac{x^7}{7} + \dots$

Just to be silly — for no apparent reason whatsoever, let’s replace $x$ by $ix$ and see what happens:

$e^{ix} = \displaystyle 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \dots + i \left[\displaystyle x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} \dots \right]$

after separating the terms that do and don’t have an $i$.

Hmmmm… looks familiar….

So it makes sense to define

$e^{ix} = \cos x + i \sin x$,

which is called Euler’s formula, thus proving an unexpected connected between $e^x$ and the trigonometric functions.

9 thoughts on “Reminding students about Taylor series (Part 6)”

This site uses Akismet to reduce spam. Learn how your comment data is processed.