What, you don’t believe me? Ok, ok, I’m leaving something out. Let’s do some background before I tell you what it is.
The first thing we need is the incredibly interesting and important Euler’s formula. It’s the key that relates the exponential and trigonometric functions. We won’t pause to figure out why it’s true, for now we’ll just take it as a given:
Now replace x with -x, and we’ll use the fact that cos(x) is the same as cos(-x), and sin(-x) is the same as -sin(x).
So that’s two ways of saying the same thing. Now we’ll subtract the second equation from the first. The cosines will cancel and we’ll end up with
Now divide out that 2i, and we’ve figured out a new way to write the sine function:
What I’ve done in the above graph is let x = i t, where t is a usual real number in this case between -4 and 4. Plugging this into the above expression means what I’m actually graphing is
This is a pure imaginary number, and so I’m actually plotting the magnitude of that imaginary quantity.
Is all this useful for anything. You bet it is! This kind of manipulation between exponential and trig functions permeates mathematics and physics in almost every possible context. Contour integrals, differential equations, the theory of real and complex functions, you name it. Incidentally, you can find the same sort of relationship for the cosine and tangent functions using the same method. Between them it makes proving the various high-school trig identities much easier. Cool stuff, and very useful.
Homework for the mathematically inclined reader: tan(z) is undefined by virtue of a vertical asymptote at z = n*pi/2 for all odd n. Is it undefined for any z which is not a real number? If so, where?