Calculators and complex numbers (Part 2)

In yesterday’s post, I showed a movie (also provided at the bottom of this post) that calculators can return surprising answers to exponential and logarithmic problems involving complex numbers. In this series of posts, I hope to explain why the calculator returns these results.

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.

For example, the point z = -\sqrt{3} + i is in the second quadrant of the complex plane. The modulus is

r = \sqrt{ (-\sqrt{3})^2 + (1)^2 } = \sqrt{4} = 2.

(Notice that 1, and not i, appears in the above expression.) Also,

\tan \theta = \displaystyle \frac{1}{-\sqrt{3}}, so that \theta = \displaystyle -\frac{\pi}{6} + n \pi

Since -\sqrt{3} + i is in the second quadrant, we choose \theta = \displaystyle -\frac{\pi}{6} + \pi = \displaystyle \frac{5\pi}{6}. Therefore,

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

This can be checked by simply evaluating the right-hand side and distributing:

\displaystyle 2 \left( \cos \frac{5\pi}{6} + \sin \frac{5\pi}{6} \right) = \displaystyle 2 \left( -\frac{\sqrt{3}}{2} + i \frac{1}{2} \right) = -\sqrt{3} +i

complexplane2

When teaching this in class, I’ll run through about 2-4 more examples to make sure that this concept is stuck in my students’ heads.

Notes:

  • The angle \theta is not uniquely defined… any angle that is coterminal with \frac{5\pi}{6} would also have worked. For example,

-\sqrt{3} + i = \displaystyle 2 \left( \cos \frac{17\pi}{6} + \sin \frac{17\pi}{6} \right)

and

-\sqrt{3} + i = \displaystyle 2 \left( \cos \frac{-7\pi}{6} + \sin \frac{-7\pi}{6} \right)

  • It’s really important to remember that \theta need not be equal to \displaystyle \tan^{-1} \frac{b}{a}. After all, the arctangent of an angle must lie between -\pi/2 and \pi/2, which won’t work for complex numbers in either the second or third quadrant. That said, it is true that

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

  • The above procedure is also the essence of converting from rectangular coordinates to polar coordinates (or vice versa), which is a function pre-programmed on many scientific calculators.
  • When teaching this topic, I often use physical humor to get the above points across.
  1. I’ll pick the direction parallel to the chalkboard to be the positive real axis, and the direction perpendicular to the chalkboard (i.e., pointing toward my students) as the positive imaginary axis. I’ll pick some convenient spot in front of the class to be the origin.
  2. Standing at the origin, I’ll face the positive real axis, spin in an angle of 5\pi/6 = 150^\circ, and take two steps to arrive at the point -\sqrt{3} + i.
  3. Returning to the origin, I’ll face the positive real axis, spin the other direction in an angle of -210^\circ, and take two steps to arrive at the same point.
  4. Returning to the origin, I’ll face the positive real axis, spin in an angle of 510^\circ (getting more than a little dizzy while doing so), and take two steps to arrive at the same point.
  5. Returning to the origin, I’ll face the positive real axis, spin in an angle of only -30^\circ, and take two steps backwards (while doing the moonwalk) to arrive at the same point.

green line

We will need to use this concept of writing a complex number in trigonometric form in order to explain the calculator’s results. For completeness, here’s the movie that I used to begin this series of posts.

 

 

Calculators and complex numbers (Part 1)

What is \ln(-5)? Or (-8)^{1/3}? Easy, right? Well, let’s plug into a calculator and find out. (Click anywhere in the image below to start the movie. The important stuff is the screen at the top; you can see the keystrokes that I used if you following the mouse arrow toward the bottom.)

In this series of posts, I’ll try to explain why the calculator provides these unexpected answers. This series of posts will have 24 posts (!) and will contain some fairly sophisticated mathematics to explain why the calculator does what it does as well as some pedagogical discussion when I present these topics to my class of future secondary teachers. Each post can be thought of as a 5-10 minute portion of one of my lectures.

 

 

Fun with combinatorics

I found the following videos through UpWorthy: http://www.upworthy.com/see-this-teachers-amazing-response-to-the-question-but-when-are-we-gonna-have-to-use-this. Hats off to this wonderful middle school math teacher for engaging his students in some surprisingly rich problems.

Part 1 (be sure to read the comments in the original YouTube video to see why the answer isn’t 2^{10} \cdot 10!):

Part 2:

You just can’t, Nemo!

During in-class discussions, students often but inadvertently make the same mistakes over and over again… say, thinking that \sqrt{a^2+b^2} = a + b or \displaystyle \frac{d}{dx} (uv) = \displaystyle \frac{du}{dx} \cdot \frac{dv}{dx}. Naturally, such mistakes need to be corrected, but hopefully politely and in a memorable way.

After the third or fourth such repetition of the same mistake during a semester, I’ll try to lighten the mood by saying, “You think that you can do these things, but you just can’t, Nemo!”

Pop culture reference:

See also my one-liner about the Third Classic Blunder: https://meangreenmath.com/2013/06/07/laws-of-logarithms/

Forgot algebra

Source: http://www.xkcd.com/1050/

2014 MAA T-shirt contest

MAA contest

The 2014 MAA T-shirt contest is on right now.

Source: https://www.facebook.com/maanews/photos/a.10152498997855419.1073741827.153302905418/10152498997995419/?type=1&theater

A bit of a fixer upper

I always encourage students to answer occasional questions in class; naturally, this opens the possibility that a student may suggest an answer that is completely wrong or is only partially correct. Naturally, I don’t want to discourage students from participating in class¬† by blunting saying “You’re wrong!” So I need to have a gentle way of pointing out that the proposed answer isn’t quite right.

Thanks to a recent movie, I finally have hit on a one-liner to do this with good humor and cheer: “To quote the trolls in Frozen, I’m afraid your answer is a bit of a fixer-upper. (Laughter) So it’s a bit of a fixer-upper, but this I’m certain of… you can fix this fixer-upper up with a little bit of love.”

If you have no idea about what I’m talking about, here’s the song from the movie (you can hate me for the rest of the day while you sing this song to yourself):

An ode to bubble tests

Source (especially helpful for reading the annotations): http://learningmatters.tv/images/blog/FINALMENDING.jpg.

 

How to check if a student really can perform the Chain Rule

In my experience, a problem like the following is the acid test for determining if a student really understands the Chain Rule:

Find f'(x) if f(x) = \left[6x^2 + \sin 5x \right]^3

The correct answer (unsimplified):

f'(x) = 3 \left[6x^2 + \sin 5x \right]^2 \left(12x + [\cos 5x] \cdot 5 \right)

However, even students that are quite proficient with the Chain Rule can often provide the following incorrect answer:

f'(x) = 3 \left[6x^2 + \sin 5x \right]^2 \left(12x + \cos 5x \right) \cdot 5

Notice the slightly incorrect placement of the 5 at the end of the derivative. Students can so easily get into the rhythm of just multiplying by the derivative of the inside that they can forget where the derivative of the inside should be placed.

Needless to say, a problem like this often appears on my exams as a way of separating the A students from the B students.

Teaching the Chain Rule inductively

I taught Calculus I every spring between 1996 and 2008. Perhaps the hardest topic to teach — at least for me — in the entire course was the Chain Rule. In the early years, I would show students the technique, but it seemed like my students accepted it on faith that their professor knew what he was talking about it. Also, it took them quite a while to become proficient with the Chain Rule… as opposed to the Product and Quotient Rules, which they typically mastered quite quickly (except for algebraic simplifications).

It took me several years before I found a way of teaching the Chain Rule so that the method really sunk into my students by the end of the class period. Here’s the way that I now teach the Chain Rule.

On the day that I introduce the Chain Rule, I teach inductively (as opposed to deductively). At this point, my students are familiar with how to differentiate y = x^n for positive and negative integers n, the trigonometric function, and y = \sqrt{x}. They also know the Product and Quotient Rules.

I begin class by listing a whole bunch of functions that can be found by the Chain Rule if they knew the Chain Rule. However, since my students don’t know the Chain Rule yet, they have to find the derivatives some other way. For example:

Let y = (3x - 5)^2. Then

y = (3x - 5) \cdot (3x -5)

y' = 3 \cdot (3x -5) + (3x -5) \cdot 3

y' = 6(3x-5).

Let y = (x^3 + 4)^2. Then

y = (x^3 + 4) \cdot (x^3 + 4)

y' = 3x^2 \cdot (x^3 + 4) + (x^3 + 4) \cdot 3x^2

y' = 6x^2 (x^3 + 4)

Let y = (\sqrt{x} + 5)^2. Then

y = x + 10 \sqrt{x} + 25

y' = 1 + \displaystyle \frac{5}{\sqrt{x}}

Let y = \sin^2 x. Then

y = \sin x \cdot \sin x

y' = \cos x \cdot \sin x + \sin x \cdot \cos x

y' = 2 \sin x \cos x

Let $y = \sin 2x$. Then

y = 2 \sin x \cos x

y' = 2 \cos x \cos x - 2 \sin x \sin x

y' = 2 (\cos^2 x - \sin^2 x)

y' = 2 \cos 2x

The important thing is to list example after example after example, and have students compute the derivatives. All along, I keep muttering something like, “Boy, it would sure be nice if there was a short-cut that would save us from doing all this work.” Of course, there is a short-cut (the Chain Rule), but I don’t tell the students what it is. Instead, I make the students try to figure out the pattern for themselves. This is absolutely critical: I don’t spill the beans. I just wait and wait and wait until the students figure out the pattern for themselves… though I might give suggestive hints, like rewriting the 6 in the first example as $\latex 3 \times 2$.

This can take 20-30 minutes, and perhaps over a dozen examples (like those above), as students are completely engaged and frustrated trying to figure out the short-cut. But my experience is that when it clicks, it really clicks. So this pedagogical technique requires a lot of patience on the part of the instructor to not “save time” by giving the answer but to allow the students the thrill of discovering the pattern for themselves.

Once the Chain Rule is discovered, then my experience is that students have been prepared for differentiating more complicated functions, like y = \sqrt{4 + \sin 2x} and y = \cos ( \sqrt{x} ). In other words, there’s a significant front-end investment of time as students discover the Chain Rule, but applying the Chain Rule generally moves along quite quickly once it’s been discovered.