Calculators and complex numbers (Part 6)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta)

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

There’s a shorthand notation for the right-hand side (r e^{i \theta}) that I’ll justify later in this series.

In the previous post, I used a numerical example to justify De Moivre’s Theorem:

Theorem. If n is an integer, then \left[ r (\cos \theta + i \sin \theta) \right]^n = r^n (\cos n \theta + i \sin n \theta).

The proof has two parts:

  1. For n \ge 0: proof by induction.
  2. For n < 0: let n = -m, and then use part 1.

In this post, I describe how I present part 1 to students in class. The next post will cover part 2. As noted before, I typically present this theorem and its proof after a numerical example so that students can guess the statement of the theorem on their own.

Proof for n \ge 0.

Base Case: n = 0. This is trivial, as the left-hand side is

\left[ r (\cos \theta + i \sin \theta) \right]^0 = 1,

while the right-hand side is

r^0 (\cos 0 \theta + i \sin 0 \theta) = 1(\cos 0 + i \sin 0) = 1(1 + 0i) = 1.

Assumption. We now assume, for a given integer $latex $n$, that

\left[ r (\cos \theta + i \sin \theta) \right]^n = r^n (\cos n \theta + i \sin n \theta).

Inductive Step. We now use the above assumption to prove the statement for n+1. On the board, I write the left-hand side on the top and the right-hand side on the bottom, leaving plenty of space in between:

\left[ r (\cos \theta + i \sin \theta) \right]^{n+1}

\quad

\quad

\quad

\quad

\quad

= r^{n+1} (\cos [n+1] \theta + i \sin [n+1] \theta).

All we have to do is fill in the space to transform the left-hand side into the target on the right-hand side. (I like to call the right-hand side “the target,” as it suggests the direction in which the proof should aim.) I also tell the class that we’re more than two-thirds done with the proof, since we’ve finished the first two steps and have made some headway on the third. This usually produces knowing laughter since the hardest part of the proof is creatively converting the left-hand side into the target.

The first couple steps of the proof are usually clear to students:

\left[ r (\cos \theta + i \sin \theta) \right]^{n+1} = \left[ r (\cos \theta + i \sin \theta) \right]^n \cdot \left[ r (\cos \theta + i \sin \theta) \right]

= \left[ r^n (\cos n \theta + i \sin n \theta) \right] \cdot \left[ r (\cos \theta + i \sin \theta) \right]

by induction hypothesis. (I’ll also remind students that, as a general rule, when doing a proof by induction, it’s important to actually use the inductive assumption someplace.) At this point, most students want to distribute to get the right answer. This will eventually produce the correct answer using trig identities. However, I again try to encourage them to think like MIT freshmen and use previous work. After all, the distances multiply and the angles add, so the next step can be

=r^n \cdot r (\cos [n \theta + \theta] + i \sin [n \theta + \theta])

= r^{n+1} (\cos [n+1]\theta + i \sin [n+1]\theta).

In tomorrow’s post, I’ll talk about how I present the second part of the proof to my students.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 5)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta)

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

There’s a shorthand notation for the right-hand side (r e^{i \theta}) that I’ll justify later in this series.

The trigonometric form of a complex number permits a geometric interpretation of multiplication, given in the following theorem.

Theorem. \left[ r_1 (\cos \theta_1 + i \sin \theta_1) \right] \cdot \left[ r_2 (\cos \theta_2 + i \sin \theta_2) \right] = r_1 r_2 (\cos [\theta_1+\theta_2] + i \sin [\theta_1+\theta_2]).

While this theorem doesn’t seem all that helpful — just multiplying complex numbers seems easier — this theorem will be a great help for the following problem:

Compute (\sqrt{3} + i)^{2014}. (When teaching this in class, I usually choose the exponent to be the current year.)

Let’s discuss the options for evaluating this expression.

Method #1: Multiply it out. (Students reflexively wince in pain — or knowing laughter — when I make this suggestion.)

Method #2: Use the 2014th row of Pascal’s triangle. (More pain and/or laughter.)

Method #3: Use the above theorem. It’s straightforward to write \sqrt{3} + i as 2 \displaystyle \left( \cos \frac{\pi}{6} + i \sin \frac{\pi}{6} \right)… for reasons that will become apparent later, I tell my students that I’ll use radians and not degrees for this one. Most students can recognize — and this is important, before I formally prove De Moivre’s Theorem — that they need to multiply 2 by itself 2014 times and add \displaystyle \frac{\pi}{6} to itself 2014 times. Therefore,

(\sqrt{3} + i)^{2014} = \displaystyle 2^{2014} \left( \cos \frac{2014\pi}{6} + i \sin \frac{2014\pi}{6} \right) = \displaystyle 2^{2014} \left( \cos \frac{1007\pi}{3} + i \sin \frac{1007\pi}{3} \right)

I then try to coax my students to compute \displaystyle \cos \frac{1007\pi}{3} without a calculator. With some prodding, they’ll recognize that \displaystyle \frac{1007}{3} = \displaystyle {335}\frac{2}{3}, and so they can subtract 334\pi (not 335\pi) without changing the values of sine and cosine. Therefore,

(\sqrt{3} + i)^{2014} = \displaystyle 2^{2014} \left( \cos \frac{5\pi}{3} + i \sin \frac{5\pi}{3} \right)

= 2^{2014} \left( \frac{1}{2} - i \frac{\sqrt{3}}{2} \right)

= 2^{2013} (1-i\sqrt{3})

By this point, students absolutely believe that the trigonometric form of a complex number serves a useful purpose. Also, this numerical example has prepared students for the formal proof of DeMoivre’s Theorem, which will be the subject of the next two posts.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 4)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta)

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

In the previous post, I proved the following theorem which provides a geometric interpretation for multiplying complex numbers.

Theorem. \left[ r_1 (\cos \theta_1 + i \sin \theta_1) \right] \cdot \left[ r_2 (\cos \theta_2 + i \sin \theta_2) \right] = r_1 r_2 (\cos [\theta_1+\theta_2] + i \sin [\theta_1+\theta_2]).

Perhaps unsurprisingly, there’s also a theorem for dividing complex numbers. Students can using guess the statement of this theorem.

Theorem. \displaystyle \frac{ r_1 (\cos \theta_1 + i \sin \theta_1) }{ r_2 (\cos \theta_2 + i \sin \theta_2) } = \displaystyle \frac{r_1}{r_2} (\cos [\theta_1-\theta_2] + i \sin [\theta_1-\theta_2]).

Proof. The proof begins by separating the r_1 and r_2 terms and then multiplying by the conjugate of the denominator:

\displaystyle \frac{ r_1 (\cos \theta_1 + i \sin \theta_1) }{ r_2 (\cos \theta_2 + i \sin \theta_2) }

= \displaystyle \frac{r_1}{r_2} \cdot \frac{ \cos \theta_1 + i \sin \theta_1 }{ \cos \theta_2 + i \sin \theta_2 } \cdot \frac{ \cos \theta_2 - i \sin \theta_2 }{ \cos \theta_2 - i \sin \theta_2 }

= \displaystyle \frac{r_1}{r_2} \cdot \frac{ (\cos \theta_1 + i \sin \theta_1)( \cos \theta_2 - i \sin \theta_2) } {\cos^2 \theta_2 - i^2 \sin^2 \theta_2}

= \displaystyle \frac{r_1}{r_2} \cdot \frac{ (\cos \theta_1 + i \sin \theta_1)( \cos \theta_2 - i \sin \theta_2) } {\cos^2 \theta_2 + \sin^2 \theta_2}

= \displaystyle \frac{r_1}{r_2} (\cos \theta_1 + i \sin \theta_1)( \cos \theta_2 - i \sin \theta_2)

At this juncture in the proof, there are two legitimate ways to proceed.

Method #1: Multiply out the right-hand side. After all, this is how we proved the theorem yesterday. For this reason, students naturally gravitate toward this proof, and the proof works after recognizing the trig identities for the sine and cosine of the difference of two angles.

However, this isn’t the most elegant proof.

Method #2: I break out my old joke about the entrance exam at MIT and the importance of using previous work. I rewrite the right-hand side as

= \displaystyle \frac{r_1}{r_2} (\cos \theta_1 + i \sin \theta_1)( \cos [-\theta_2] + i \sin [-\theta_2]);

this also serves as a reminder about the odd/even identities for sine and cosine, respectively. Then students observe that the right-hand side is just a product of two complex numbers in trigonometric form, and so the angle of the product is found by adding the angles.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 3)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta)

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

There’s a shorthand notation for the right-hand side (r e^{i \theta}) that I’ll justify later in this series.

Why is this important? When students first learn to multiply complex numbers like 1+i and 2+i, they are taught to just distribute (or, using the nomenclature that I don’t like, FOIL it out):

(1+i)(1+2i) = 1 + 2i + i + 2i^2 = 1 + 3i - 2 = -1 + 3i.

The trigonometric form of a complex number permits a geometric interpretation of multiplication, given in the following theorem.

Theorem. \left[ r_1 (\cos \theta_1 + i \sin \theta_1) \right] \cdot \left[ r_2 (\cos \theta_2 + i \sin \theta_2) \right] = r_1 r_2 (\cos [\theta_1+\theta_2] + i \sin [\theta_1+\theta_2]).

Proof. As above, we distribute (except for the r_1 and r_2 terms):

\left[ r_1 (\cos \theta_1 + i \sin \theta_1) \right] \cdot \left[ r_2 (\cos \theta_2 + i \sin \theta_2) \right]

= r_1 r_2 (\cos \theta_1 \cos \theta_2 + i \cos \theta_1 \sin \theta_2 + i \sin \theta_1 \cos \theta_2 + i^2 \sin \theta_1 \sin \theta_2

= r_1 r_2 (\cos \theta_1 \cos \theta_2 - \sin \theta_1 \sin \theta_2 + i[ \sin \theta_1 \cos \theta_2 + \cos \theta_1 \sin \theta_2])

= r_1 r_2 (\cos [\theta_1+\theta_2] + i \sin [\theta_1+\theta_2]).

When actually doing this in class, the big conceptual jump for students is the last step. So I make a big song-and-dance routine out of this:

Cosine of the first times cosine of the second minus sine of the first times sine of the second… where have I seen this before?

The idea is for my students to search deep into their mathematical memories until they recall the appropriate trig identity.

For the original multiplication problem, we see that

1+i = \sqrt{2} \left( \cos 45^\circ + i \sin 45^\circ \right)

1 + 2i = \sqrt{5} \left( \cos[\tan^{-1} 2] + i \sin[\tan^{-1} 2] \right) \approx \sqrt{5} \left( \cos 63.435^\circ + i \sin 63.435^\circ \right)

Therefore, the product of $1+i$ and $1+2i$ will be a distance of $\sqrt{2} \cdot \sqrt{5} = \sqrt{10}$ from the origin, and the angle from the positive real axis will be 45^\circ + \tan^{-1} 2 \approx 45^\circ + 63.435^\circ = 108.435^\circ. Indeed,

-1 + 3i \approx \sqrt{10} \left( \cos 108.435^\circ + i \sin 108.435^\circ \right).

complex plane 3green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Why do we still require students to rationalize denominators?

Which answer is simplified: \displaystyle \frac{1}{2 \sqrt{2}} or \displaystyle \frac{ \sqrt{2} }{4}? From example, here’s a simple problem from trigonometry:

Suppose \theta is an acute angle so that \sin \theta = \displaystyle \frac{1}{3}. Find \tan \theta.

triangle13

To solve, we make a right triangle whose side opposite of \theta has length 1 and hypotenuse with length 3. The adjacent side has length \sqrt{3^2 - 1^2} = \sqrt{8} = 2\sqrt{2}. Therefore,

\tan \theta = \displaystyle \frac{ \hbox{Opposite} }{ \hbox{Adjacent} } = \displaystyle \frac{1}{2 \sqrt{2}}

This is the correct answer, and it could be plugged into a calculator to obtain a decimal approximation. However, in my experience, it seems that most students are taught that this answer is not yet simplified, and that they must rationalize the denominator to get the “correct” answer:

\tan \theta = \displaystyle \frac{1}{2 \sqrt{2}} \cdot \frac{ \sqrt{2} }{ \sqrt{2} } = \displaystyle \frac{ \sqrt{2} }{4}

Of course, this is equivalent to the first answer. So my question is philosophical: why are students taught that the first answer isn’t simplified but the second is? Stated another way, why is a square root in the numerator so much more preferable than a square root in the denominator?

Feel free to correct me if I’m wrong, but it seems to me that rationalizing denominators is a vestige of an era before cheap pocket calculators. Let’s go back in time to an era before pocket calculators… say, 1927, when The Jazz Singer was just released and stars of silent films, like Don Lockwood, were trying to figure out how to act in a talking movie.

Before cheap pocket calculators, how would someone find \displaystyle \frac{1}{2 \sqrt{2}} ~~ or ~~ \displaystyle \frac{ \sqrt{2} }{4} to nine decimal places? Clearly, the first step is finding \sqrt{2} by hand, which I discussed in a previous post. So these expressions reduce to

\displaystyle \frac{1}{2 (1.41421356\dots)} or \displaystyle \frac{1.41421356\dots}{4}

Next comes the step of dividing. If you don’t have a calculator and had to use long division, which would rather do: divide by 4 or divide by 2.82842712\dots?

Clearly, long division with 4 is easier.

It seems to me that ease of computation was the reason that rationalizing denominators was required of students in previous generations. So I’m a little bemused why rationalizing denominators is still required of students now that cheap calculators are so prevalent.

Lest I be misunderstood, I absolutely believe that all students should be able to convert \displaystyle \frac{1}{2 \sqrt{2}} into \displaystyle \frac{ \sqrt{2} }{4}. But I see no compelling reason why the “simplified” answer to the above trigonometry problem should be the second answer and not the first.

Area of a circle (Part 2)

Math majors are completely comfortable with the formula A = \pi r^2 for the area of a circle. However, they often tell me that they don’t remember a proof or justification for why this formula is true. And they certainly don’t remember a justification that would be appropriate for showing geometry students.

In this series of posts, I’ll discuss several ways that the area of a circle can be found using calculus. I’ll also discuss a straightforward classroom activity by which students can discover for themselves why A = \pi r^2.green line

A circle centered at the origin with radius r may be viewed as the region between f(x) = -\sqrt{r^2 - x^2} and g(x) = \sqrt{r^2 - x^2}. These two functions intersect at x = r and x = -r. Therefore, the area of the circle is the integral of the difference of the two functions:

A = \displaystyle \int_{-r}^r \left[g(x) - f(x) \right] \, dx= \displaystyle \int_{-r}^r 2 \sqrt{r^2 - x^2} \, dx

This may be evaluated by using the trigonometric substitution x = r \sin \theta and changing the range of integration to \theta = -\pi/2 to \theta = \pi/2. Since dx = r \cos \theta \, d\theta, we find

A = \displaystyle \int_{-\pi/2}^{\pi/2} 2 \sqrt{r^2 - r^2 \sin^2 \theta} \, r \cos \theta d\theta

A = \displaystyle \int_{-\pi/2}^{\pi/2} 2 r^2 \cos^2 \theta d\theta

A = \displaystyle r^2 \int_{-\pi/2}^{\pi/2} (1 + \cos 2\theta) d\theta

A = \displaystyle r^2 \left[ \theta + \frac{1}{2} \sin 2\theta \right]_{-\pi/2}^{\pi/2}

A = \displaystyle r^2 \left[ \left( \displaystyle \frac{\pi}{2} + \frac{1}{2} \sin \pi \right) - \left( - \frac{\pi}{2} + \frac{1}{2} \sin (-\pi) \right) \right]

A = \pi r^2

We note that the above proof uses the fact that calculus with trigonometric functions must be done with radians and not degrees. In other words, we had to change the range of integration to [-\pi/2,\pi/2] and not [-90^o, 90^o].

Why do we teach students about radians?

Throughout grades K-10, students are slowly introduced to the concept of angles. They are told that there are 90 degrees in a right angle, 180 degrees in a straight angle, and a circle has 60 degrees. They are introduced to 30-60-90 and 45-45-90 right triangles. Fans of snowboarding even know the multiples of 180 degrees up to 1440 or even 1620 degrees.

Then, in Precalculus, we make students get comfortable with \pi, \displaystyle \frac{\pi}{2}, \displaystyle \frac{\pi}{3}, \displaystyle \frac{\pi}{4}, \displaystyle \frac{\pi}{6}, and multiples thereof.

We tell students that radians and degrees are just two ways of measuring angles, just like inches and centimeters are two ways of measuring the length of a line segment.

Still, students are extremely comfortable with measuring angles in degrees. They can easily visualize an angle of 75^o, but to visualize an angle of 2 radians, they inevitably need to convert to degrees first. In his book Surely You’re Joking, Mr. Feynman!, Nobel-Prize laureate Richard P. Feynman described himself as a boy:

I was never any good in sports. I was always terrified if a tennis ball would come over the fence and land near me, because I never could get it over the fence – it usually went about a radian off of where it was supposed to go.

Naturally, students wonder why we make them get comfortable with measuring angles with radians.

The short answer, appropriate for Precalculus students: Certain formulas are a little easier to write with radians as opposed to degrees, which in turn make certain formulas in calculus a lot easier.

The longer answer, which Precalculus students would not appreciate, is that radian measure is needed to make the derivatives of \sin x and \cos x look palatable.

CircularSector_1000

Source: http://mathworld.wolfram.com/CircularSector.html

1. In Precalculus, the length of a circle arc with central angle \theta in a circle with radius r is

s = r\theta

Also, the area of a circular sector with central angle \theta in a circle with radius r is

A = \displaystyle \frac{1}{2} r^2 \theta

In both of these formulas, the angle \theta must be measured in radians.

Students may complain that it’d be easy to make a formula of \theta is measured in degrees, and they’d be right:

s = \displaystyle \frac{180 r \theta}{\pi} and A = \displaystyle \frac{180}{\pi} r^2 \theta

However, getting rid of the 180/\pi makes the following computations from calculus a lot easier.

2a. Early in calculus, the limit

\displaystyle \lim_{\theta \to 0} \frac{\sin \theta}{\theta} = 1

is derived using the Sandwich Theorem (or Pinching Theorem or Squeeze Theorem). I won’t reinvent the wheel by writing out the proof, but it can be found here. The first step of the proof uses the formula for the above formula for the area of a circular sector.

2b. Using the trigonometric identity \cos 2x = 1 - 2 \sin^2 x, we replace x by \theta/2 to find

\displaystyle \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} = \displaystyle \lim_{\theta \to 0} \frac{2\sin^2 \displaystyle \left( \frac{\theta}{2} \right)}{ \theta}

\displaystyle \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} = \displaystyle \lim_{\theta \to 0} \sin \left( \frac{\theta}{2} \right) \cdot \frac{\sin \displaystyle \left( \frac{\theta}{2} \right)}{ \displaystyle \frac{\theta}{2}}

\displaystyle \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} =0 \cdot 1

\displaystyle \lim_{\theta \to 0} \frac{1 - \cos \theta}{\theta} =0

3. Both of the above limits — as well as the formulas for \sin(\alpha + \beta) and \cos(\alpha + \beta) — are needed to prove that \displaystyle \frac{d}{dx} \sin x = \cos x and \displaystyle \frac{d}{dx} \cos x = -\sin x. Again, I won’t reinvent the wheel, but the proofs can be found here.

green lineSo, to make a long story short, radians are used to make the derivatives $y = \sin x$ and $y = \cos x$ easier to remember. It is logically possible to differentiate these functions using degrees instead of radians — see http://www.math.ubc.ca/~feldman/m100/sinUnits.pdf. However, possible is not the same thing as preferable, as calculus is a whole lot easier without these extra factors of \pi/180 floating around.

Calculator errors: When close isn’t close enough (Part 1)

Far too often, students settle for a numerical approximation of a solution that can be found exactly. To give an extreme example, I have met quite intelligent college students who were convinced that \displaystyle \frac{1}{3} was literally equal to 0.3.

That’s an extreme example of something that nearly all students do — round off a complicated answer to a fixed number of decimal places. In trigonometry, many students will compute \sin \left( \cos^{-1} 0.3 \right) by plugging into a calculator and reporting the first three to six decimal places, like 0.95394. This is especially disappointing when there are accessible techniques for getting the exact answer (in this case, \displaystyle \frac{\sqrt{91}}{10}) without using a calculator at all.

pictsqrt9110

TIsqrt9110

Unfortunately, even maintaining eight, nine, or ten decimal places of accuracy may not be good enough, as errors tend to propagate as a calculation continues. I’m sure every math teacher has an example where the correct answer was exactly $\displaystyle\frac{3}{2}$ but students returned an answer of 1.4927 or 1.5031 because of roundoff errors.

Students may ask, “What’s the big deal if I round off to five decimal places?” Here’s a simple example — which can be quickly demonstrated in a classroom — of how such truncation errors can propagate. I’m going to generate a recursive sequence. I will start with \displaystyle \frac{1}{3}. Then I will alternate multiplying by 1000 and then subtracting 333. More mathematically,

 a_1 = \displaystyle \frac{1}{3}

a_{2n} = 1000 a_{2n-1}

a_{2n+1} = a_{2n} - 333 if n > 0

Here’s what happens exactly:

1000 \times \displaystyle \frac{1}{3} = \displaystyle \frac{1000}{3} = \displaystyle 333\frac{1}{3} = 333.\overline{3}

\displaystyle 333\frac{1}{3} - 333 = \displaystyle \frac{1}{3} = 0.\overline{3}

So, repeating these two steps, the sequence alternates between \displaystyle \frac{1}{3} and \displaystyle 333\frac{1}{3}.

But looks what happens if I calculate the first twelve terms of this sequence on a calculator.

TItrunc1

Notice that by the time I reach a_{11}, the terms of the sequence are negative, which is clearly incorrect.

So what happened?

This is a natural by-product of the finite storage of a calculator. The calculator doesn’t store infinitely many digits of $\displaystyle \frac{1}{3}$ in memory because a calculator doesn’t possess an infinite amount of memory. Instead, what gets stored is something like the terminating decimal 0.33333333333333, with about fourteen 3s. (Of course, only the first ten digits are actually displayed.)

So multiplying by 1000 and then subtracting 333 produces a new and different terminating decimal with three less 3s. Do this enough times, and you end up with negative numbers.

Taylor series without calculus

Is calculus really necessary for obtaining a Taylor series? Years ago, while perusing an old Schaum’s outline, I found a very curious formula for the area of a circular segment:

CircularSegment_1001

A = \displaystyle \frac{R^2}{2} (\theta - \sin \theta)

The thought occurred to me that \theta was the first term in the Taylor series expansion of \sin \theta about \theta = 0, and perhaps there was a way to use this picture to generate the remaining terms of the Taylor series.

This insight led to a paper which was published in College Mathematics Journal: cmj38-1-058-059. To my surprise and delight, this paper was later selected for inclusion in The Calculus Collection: A Resource for AP and Beyond, which is a collection of articles from the publications of Mathematical Association of America specifically targeted toward teachers of AP Calculus.

Although not included in the article, it can be proven that this iterative method does indeed yield the successive Taylor polynomials of \sin \theta, adding one extra term with each successive step.

I carefully scaffolded these steps into a project that I twice assigned to my TAMS precalculus students. Both semesters, my students got it… and they were impressed to know the formula that their calculators use to compute \sin \theta. So I think this project is entirely within the grasp of precocious precalculus students.

green line

I personally don’t know of a straightforward way of obtaining the expansion of \cos \theta without calculus. However, once the expansion of \sin \theta is known, the expansion of \cos \theta can be surmised without calculus. To do this, we note that

\cos \theta = 1 - 2 \sin^2 \left( \displaystyle \frac{\theta}{2} \right) = 1 - 2 \left( \displaystyle \frac{\theta}{2} - \frac{(\theta/2)^3}{3!} + \frac{(\theta/2)^5}{5!} \dots \right)^2

Truncating the series after n terms and squaring — and being very careful with the necessary simplifications — yield the first n terms in the Taylor series of \cos \theta.

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.

green line

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.

green line

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)!}

green line

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.

green line

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.