Ricochet is the best place on the internet to discuss the issues of the day, either through commenting on posts or writing your own for our active and dynamic community in a fully moderated environment. In addition, the Ricochet Audio Network offers over 50 original podcasts with new episodes released every day.

# A Little Fun with Math for your Weekend

Back when I was in high school I would memorize things. Equations, the values of constants, I was that kind of nerd. In my college career I ascended to another kind of nerd, the physicist who never memorizes anything because he can always rederive it. But to rederive things you need somewhere to start. There are a few things I find to be so fundamental that I memorize those. Euler’s formula is one of them:

### Euler’s Formula and how to Check It

e^(a+b*i*) = (e^a)*cos(b) + *i**(e^a)*sin(b)

And the way that you check that to make sure you’ve got it right is to see if it resolves to Euler’s identify. Substitute a = 0 and b = pi into that you get

e^(0+π*i*) = (e^0)*cos(π) + *i**(e^0)*sin(π)

I suppose you’ve also got to remember that anything at all raised to the zeroeth power is equal to one, and the sines and cosines of π. Those I can get by picturing the curves: sine and cosine. If you can remember those shapes and know that at multiples of π it’s going to be 1, 0, or -1 that’s plenty.

e^πi = (1)*(-1) + *i**(1)*(0)

e^π*i* = -1

Or, if you’d prefer,

e^π*i* + 1 = 0

Which gives you a flabbergastingly simple equation relating five of the weirdest numbers out there.

### Why Bother Memorizing Euler’s Formula?

Because you can derive all kinds of amazing things from there. For example, if you also remember the power series definition for e

e^x = Σ(n=0 to ∞) x^n/n!

You can get from there to the power series definitions of the sine and cosine. Start by spelling out a couple exponents:

e^x*i* = 1/0! + *i*(x)/1! -x²/2! – *i*(x³)/3! + x^4/4! + *i*x^5/5! – (x^6)/6! – *i*(x^7*)/7!* …

Now let’s rearrange that sequence a bit. Separate out all the terms with an *i* in them from all the terms that don’t have one:

e^x*i* = (1-x²/2! + x^4/4! – x^6/6! + … ) + *i**(x – x³/3! + x^5/5! – x^7/7! … )

but since we know Euler’s formula we know that e^x*i* = cos(x) + *i**sin(x), which means that

cos(x) + *i**sin(x) = (1-x²/2! + x^4/4! – x^6/6! + … ) + *i**(x – x³/3! + x^5/5! – x^7/7! … )

It’s not much of a leap from there to realize that the first parenthetical is cos(x), while the second term, which is all multiplied by *i*, must be sin(x).

### What Does that Do for You?

The first thing it does for you is it gives you a way to calculate sines and cosines that isn’t dependent on having a calculator handy. The arithmetic would be annoying but you could work it out for yourself in time. In other words, if I’m stuck on a desert island I’ll be the guy building a sextant out of coconuts rather than chatting up the convenient movie star. Wait, let me rethink this plan.

The second thing you can do with those definitions is that it allows you to do a quick and dirty approximation of sines and cosines. For an x less than one, we know that x^3 is less than x. If x is much less than one, then x^3 is much much less than x. A one in ten chance isn’t bad, but cube that it’s a one in a thousand chance. For a lot of applications you can assume that sin(x) = x and cos(x) = 1 and get interesting results. At least that’s what they assured me in my physics classes.

But there are other things you can do. for example

### Remember your Trig Identities?

sin²(x)+cos²(x) =, what was that again?

Well, we can square those infinite sequences.

#### Start with the Cosine:

cos²(x) = (1-x²/2! + x^4/4! – x^6/6! + … ) * (1-x²/2! + x^4/4! – x^6/6! + … )

To work that out, you take each term in the first sequence and multiply it by each term in the second sequence. I mean, not all the way since they’re infinite and ain’t nobody got time for that, but we can go a ways and see. Here we’re going to use a trick, working out all the terms that’ll end with a certain exponent, starting with the smallest ones.

cos²(x) = 1*1 + 1*(-x²/2!) + (-x²/2!)*1 + …

Stop right there for a moment. Those are all the terms with x² in them. Every term in the … sections of the infinite series is going to have larger exponents, and you can’t multiply two terms with larger exponents and get a smaller one. So even though there’s an infinite number of terms in the series, I know all the ones of order 2 are those x² terms above. (order 2 meaning the term has an x² in it, and so on for other orders.) Let’s go to the order 4 terms and have done with this one:

cos²(x) = 1*1 + 1*(-x²/2!) + (-x²/2!)*1 + 1*(x^4/4!) + (x^4/4!)*1 + (-x²/2!)*(-x²/2!) + …

That’s all of order 4 or less. Now we multiply them out, add them together, and get them down to one term per order:

cos²(x) = 1 -2x²/2! + 2x^4/4! +x^4/(2!*2!) + …

cos²(x) = 1 – x² + x^4/3 + …

Those are all the terms with exponents of 0, 2, or 4.

#### Now the Sine:

sin²(x) = (x – x³/3! + x^5/5! – x^5/7! … )*(x – x³/3! + x^5/5! – x^7/7! … )

(What happened to the “*i*“s? We got rid of ’em cause we’re dealing with just the sine here, not calculating e of anything.)

Then, much like the last, multiplying out term by term and arranging them from lowest to highest on up:

sin²(x) = x*x – (x³/3!)*x + x*(-x³/3!) …

And that’s plenty; that’ll give us all the terms order 4 and lower, which is all we computed on the cosine.

sin²(x) = x² -x^4/3! -x^4/3! + …

sin²(x) = x² – x^4/3 + …

#### Now Add the Cosines and the Sines:

sin²(x) + cos²(x) = (x² – x^4/3 + … ) + (1 – x² + x^4/3 + … )

Which, if we break it out of the parenthesis:

1 – x² + x² + x^4/3 – x^4/3 …

See that? x² cancels with it’s negative, same with the fourth order term, and though I’m not bothering to prove it (because I’m rederiving something I already know to be true, not inventing new math here) you’ll get that at every level as you add more and more exponents and factorials on there. In other words:

sin²(x) + cos²(x) = 1

Quod Erat Demonstrandum, punks.

You can derive every single one of those trig identities from Euler’s formula. And more and more other things too. I’m not going to drop into calculus here (as the Bard had it “tempt not a desperate man!”) but if you happened to forget the derivative or the integral of any one of those functions you could work it out from here. And that’s the idea of rederiving things. The number of things I have to remember is pretty small. The number of things I know is enormous. With a little work.

Published in Science & Technology
Fun with Math? Woo Hoo, it’s a party!!

It’s always a party when I waddle up to the chalkboard.

This is what I get for posting pictures.

The internet truism “pics or it didn’t happen” has a disturbing converse.

Bravo, Hank! You stumped me, but I’ll keep trying to comb my unruly synapses into line until I understand more. This brain-busting piece is a welcome change of late summer pace around here, and its brain -building aspects are Ricochet at its best.

But I have to admit that much of this reads to me like the prerecorded teaching messages left in baby Kal-El’s Kryptonian escape capsule by Jor-El: “The root of the cube times the square root of the hypotenuse equals Planck’s Constant propagating at the speed of light…”

Yeah, that’s the problem with math. We all struggled to carry the one back in first grade even though it seems simplicity itself to us now. I had a real hard time with power series the first time I encountered them in a class, and the second time too, until eventually I got a little more comfortable with them.

One thing that helps, and take this from a guy who’s gone back over the derivations in his textbooks cold some ten years after using the material last, take it line by line. The step from one line to the next is (hopefully) not that bad, but if you’re glancing through it and skipping steps you get to the end of it and realize that you don’t understand anything.

You’re right, of course. This is one of those (many) things where you can’t gloss over anything; if you follow the bread crumb trail faithfully and perform the math operations in the correct order, you can make it to the next line.

And then, fame, fortune, power!

“I could create an entire world…and then steal everything in it!”

(Stolen from Dr. Zachary Smith’s dialog in Mad Magazine’s parody, “Loused Up in Space”.)

Well said.

In fact, so well said, I’m going to start saying it myself. With regular application.

Study your math, kids…

Think of Ricochet as a desert island. Don’t forget to take photos and video.

You provide the coconuts I’ll give it a shot.

Racist.

My head is spinning. I’m going to listen to some Sinehead O’Connor.