Wednesday, March 12, 2008

The only trig identity you will ever need

If you have ever taken trigonometry, you may have gotten the impression that trig is all about memorizing dozens of barely distinguishable equations. In reality trig is all about filling time; the number of trig concepts that will find future use in calculus or in the arsenal of an engineer or physicist is quite small, and they can be learned in a couple of weeks at most. How trigonometry morphed into a semester long course I do not understand. But I digress- every year millions of students take a trigonometry class and come away with their heads full of bizarre facts like the "Angle sum formulas", the "Reciprocal identities", and other such arcana. All of these must be memorized, wasting many hours which could otherwise be spent doing fun things. Surely there is a better way! In fact, there is; if you're comfortable with complex arithmetic and know what the graphs of sine and cosine look like, you can get away with remembering just one equation:

eix = cos x + i sin x.

This wondrous time saver is known as Euler's formula, after the 18th century mathematician Leonhard Euler (pronounced 'oiler'). Most of the trig formulas you had to memorize are easily derived from this one using only basic algebra. I'm going to walk through some of the steps to do this; if you're interested, I encourage you to try the derivations yourself. It's good practice, and being able to derive formulas rather than just memorizing them is like data compression for your brain. It goes without saying that this skill will also make you more popular at parties. :)

We can use Euler's formula to derive the following trig identities:
  • The Pythagorean identity,
  • Angle sum and difference formulas,
  • Multiple angle formulas,
  • Half angle formulas,
  • Product to sum formulas, and
  • Sum to product formulas.

In order to follow along, you'll need to be comfortable with complex numbers. A complex number looks like a polynomial, but instead of x or y the variable is i. You can add, subtract, and multiply complex numbers as if they were ordinary polynomials. There is one hitch, though; anytime you see i2, replace it with -1. For instance, to multiply 1 + i and 2 + 3i, we can start by FOILing;

(1 + i)(2 + 3i)
= 2 + 5i + 3i2


= 2 + 5i - 3


= -1 + 5i,

replacing i2 with -1 in the second step and then combining like terms. Given a complex number a + bi, where a and b are real numbers, a is called the real part and b is called the imaginary part. Just like polynomials, two imaginary numbers are equal precisely when their real parts and imaginary parts are equal. That's about as complex as it's going to get. (yuk yuk.)

Okay; here's what you're going to need to know:
  • Euler's formula
  • How to add and multiply complex numbers
  • That cosine is an even function, meaning that cos(-x) = cos x, and that sine is an odd function, meaning that sin(-x) = -sin x. To see this, remember that you can 'fold' the cosine graph along the y-axis and 'spin' the sine graph halfway around the origin. In both cases, the folded and spun graphs sit on top of the originals. Or, if you will, cosine eats negative signs while sine passes them undigested.

Let's start with an easy one, the Pythagorean identity. In case you forgot, the Pythagorean identity says that sin2 x + cos2 x = 1. This is actually a pretty handy fact in calculus, and you are likely to simply remember it. However, mathematicians like to be as lazy as possible. If we can derive this identity from Euler's formula, then we have one fewer thing to remember. First, note that ei(x - x) = e0 = 1. Also, using a property of exponents,

ei(x - x) = eix ei(-x)

= [cos x + i sin x][cos(-x) + i sin(-x)]

just using Euler's formula. Now the oddness of sine and the evenness of cosine come in:


= [cos x + i sin x][cos x - i sin x]

= cos2 x + i cos x sin x - i cos x sin x + sin2 x
ei(x - x) = cos2 x + sin2 x.

So sin2 x + cos2 x = 1. Not bad at all. Now for the angle sum formulas; we get ei(x + y) = cos(x + y) + i sin(x + y) just by plugging x + y into Euler's formula. Also, using a property of exponents again,

ei(x + y) = eix eiy

= [cos x + i sin x][cos y + i sin y]

= (cos x cos y - sin x sin y) + i(sin x cos y + cos x sin y)

And because imaginary numbers are equal when their real and imaginary parts are equal, we can say

cos(x + y) = cos x cos y - sin x sin y
sin(x + y) = sin x cos y + cos x sin y,

which are precisely the angle sum formulas. The angle difference formulas can be derived in almost the same way; (hint: plug x - y into Euler's formula and use the odd/even properties of sine and cosine.) In exchange for 4 lines of algebra, we got two trig identities; so far we have 7 for the price of 1.

For the double angle formulas, just use the angle sum formulas on x and x:

sin(2x) = 2 sin x cos x
cos(2x) = cos2 x - sin2 x

Most textbooks and trig cheat sheets give two alternate formulas for cos(2x); I will leave these to you to figure out. (Hint: use the Pythagorean identity.) Now we have 9 for the price of 1. But what about triple angle formulas? Quadruple angle? It seems we could try to derive a multiple angle formula for any multiple we want. Let's give it a shot with the angle sum formulas:

sin((k+1)x) = sin(x + kx)

= sin x cos(kx) + cos x sin(kx)
cos((k+1)x) = cos(x + kx)

= cos x cos(kx) - sin x sin(kx)

Take a moment to notice what's happening here. We can find a formula for sin((k+1)x) as long as we know one for sin(kx) and cos(kx), and similarly for cos((k+1)x). This is called a mutually recursive definition, and with it we can find a closed form sine or cosine identity for any integer multiple of an angle. So we have an infinite number of identities, two for each positive integer, all wrapped up in two mutually recursive definitions.

The Half angle formulas are not much harder:

eix/2 = cos(x/2) + i sin(x/2)
eix/2 = √(eix)

√(eix) = cos(x/2) + i sin(x/2)
eix = (cos(x/2) + i sin(x/2))2
cos x + i sin x = [cos2(x/2) - sin2(x/2)] + i[2sin(x/2)cos(x/2)]

So cos x = cos2(x/2) - sin2(x/2). Using the Pythagorean identity, then, cos x = cos2(x/2) - (1 - cos2(x/2)) and we can solve for cos(x/2); using another substitution we can solve for sin(x/2).

I will leave the sum to product and product to sum formulas to you, as you don't need to use Euler's formula to derive them. These are equations like cos x + sin y = {something} and (cos x)(sin y) = {something}. (Hint: try adding the angle sum/difference formulas to themselves and to each other.)

Well, there you have it; as long as you know Euler's formula, you can easily derive 21 common trig identities, as well as an infinite number of not-so-common ones. That's a pretty good compression ratio. So go ahead, fill up those other 20 slots in your memory with some really useful information.

Sunday, March 9, 2008

First Post: what's this all about?

Hello! My name is Nathan B, and I am a graduate student and teacher-in-training living in the midwestern US.

Genius Not Required is a blog about math. In 2007, I started teaching algebra to college students as a graduate assistant. In that role, I teach the usual gauntlet of college algebra topics as dictated by my university's curriculum; factoring polynomials, solving various kinds of equations, graphing, yadda yadda. It's horrible. My students will never take another math class in their lives, and I have to sleep at night knowing that, despite the wealth of truly wonderful and enlightening ideas the subject has to offer, I have to drill them on the quadratic formula a hundred times.

So I started this blog to serve several purposes:
  • It is evident that, at least for now, I'm stuck teaching 17th century mathematics. Which has it's place, mind you, but by ignoring everything since Descartes, the usual math curriculum is missing some very cool and important ideas. (Can you imagine if high school history classes pretended the Civil War didn't exist? Yeah, it really is that bad in math education.) A blog gives me a chance to make `lessons' on more modern/interesting topics available.
  • One day I will not be a lowly graduate student; with providence I will be a full professor with the authority to design my own classes. This blog is a prototype, so that future version of myself will have some experience to draw from, along with comments and critique by the Teeming Internet Masses.
  • There are two foolproof ways to make sure you understand something: (1) explain it to someone else and (2) teach a computer to do it.
  • If I can make one idea accessible to one person I'll have done something worthwhile. Behind all the funny words and symbols, math is designed to make sense. Genius is not required.
Well, there you go. The idea for this has been kicking around in my head for a few months, and I was inspired to actually get started by Paul Lockhart's article, A Mathematician's Lament. It's a quick, entertaining, and very well written piece; If you are a math educator or school administrator, I highly recommend it.