Saturday, March 22, 2014

Another Math Extra

I learned how to attach a document to a blog post from this video.

Here's another Math Extra - a short cut for adding long sequences of integers. It has no practical use other than demonstrating a way to derive a simple and fun formula.

Here it is.

Tuesday, March 18, 2014

Math Extra #1

My son is 12 and mathematically advanced, so right on schedule, he's getting bored with the math he gets at school. I can't blame him, because all he's seen is arithmetic year after year for six years now. So I've started writing up little "math extras" for him to show that there's a lot more to math than arithmetic. I might as well post these in case others find them of interest.

Here are some meta words to attract Googlers to this page:

math enrichment middle school algebra complex problems afraid the kid might be smarter than me

Today's extra explains how complex numbers were invented. You already know how to solve equations like

3x + 4 = 10.

There are three numbers in that equation: 3, 4 and 10, and the solution is x = 2. All of those numbers are integers; that is, the kinds of numbers we use to count objects. But if the equation had been

3x + 4 = 9,

you'd get x = 5/3. What's that? It's not a number we use to count things. It's a new kind of number - call it a fraction or a decimal (5/3 = 1.6666...). Notice that the solution of an equation with integer coefficients led to a non-integer solution. The non-integer solution was sort of forced on us. We either had to admit that some numbers aren't integers, or else not be able to solve what appears to be a very simple equation.

If we consider a more complicated equation, a new kind of number is forced on us. Look at

x2 + x = -1.

Even if you don't know the formula for solving equations like this, you can see pretty quickly by trial and error that no kind of counting number is going to solve this equation. The answer can't be positive or less  than -1, because for numbers like that, x2 + x is positive. What about -1/2? Nope, that gives -1/4. So fractions aren't working either.

It looks like we need a number whose square is negative. But a positive squared is positive, and a negative squared is...positive.

We start to get out of it by inventing a new number, called i, that has the property i2  = -1. i stands for "imaginary." But if you try i in the equation, you see another problem: i2 + i would be -1 + i, but the right-hand side is plain old 1. We need a way to get rid of the imaginary part. So let's try numbers of the form

a + bi

where a and b are real (not imaginary) numbers.  Here's where you have to do some work on your own. Show that if we substitute xa + bi into the equation, we get

a2 - b2 + 2abi + a + bi = -1

(Hint: Use FOIL and the fact that i2  = -1.)

It looks like we have two unknowns, a and b, but only one equation. That is usually trouble, but we have a trick. For two complex numbers to be equal their real parts have to be equal and their imaginary parts have to be equal. It's the only way. So we really have two equations! Breaking the equation into its real and imaginary parts,

a2 - b2 + a  = -1

2ab + b = 0

Notice that the second equation has zero on the right, because the original equation above didn't have an imaginary part on the right. Said differently, the right-hand side of the original equation is -1+0i.

From the second one we get a = -1/2. We're halfway done! If we then substitute that into the first equation, we get

1/4 - b2 -1/2  = -1

which you can show has the solution

b = √(3/4).

And, don't forget about the other solution (there are two square roots to any number except zero):

b = -√(3/4).

So, we've got two solutions to our equation:

x = -1/2+i√(3/4) and x = -1/2-i√(3/4).

We had to invent a whole new kind of number, a complex number, to solve this equation whose coefficients are plain old integers. A number that is a real number plus an imaginary number is called a complex number. We weren't very careful about defining what a real number is, but I think you have the idea by now. It's a "not imaginary" number. Real numbers include integers, fractions and those non-repeating decimals we call irrational numbers.

Your challenge: Solve the equation

x2 - x = -1



Now that I'm done writing this, I don't know how many more I'm going to do this way. Ordinarily I would write math using LaTeX. In HTML, it is a real chore and it looks terrible. Maybe I can find a way to attach a PDF to a blog post. There are also some LaTeX to HTML converters out there, but they never work very well.




Damned If You Do...

A philosopher thinks it should be a crime to conduct an "organized campaign funding misinformation" about climate change, and describes the criminal conviction of Italian scientists for not adequately warning the public about the earthquake in L'Aquila a few years ago. While he says this shouldn't have been a crime, he provides a rather nauseating apologia for the court that convicted them. This is clearly the opinion of someone who has never had to provide scientific advice in a situation where it really matters.

He frames the earthquake example in classic textbook manner, completely ignoring that there is a cost to avoiding risk. If the Italian scientists had warned people to flee the city, and then the earthquake didn't happen, I guess the stupid Italian law would have made them liable for losses due to interruption of business, travel expenses, and so on. How sure do you have to be before you warn people? 50%? 90%? Who decides? Who the heck would be a scientist if it means you have to go around with a target painted on your back?

The other problem is that to win damages for fraud, you should have to prove that you suffered harm. At least in the Italian case, the earthquake actually happened. We won't know until years in the future, if ever, whether people suffered because of bad climate models, so there's no way to prove harm. But our philosopher friend wants to throw people in jail now, just in case. I daresay he would be more moderate if we could throw him in jail should the climate models prove off-base. Having skin in the game makes you think a little harder before opening your mouth.

Essentially, he thinks it should be a crime to give self-serving advice. But if he knows the truth about climate change, can't he simply ignore advice that contradicts that truth? I have news for him: 99.9% of what people say is self-serving. If it gets too self-serving, we call it lying, but if you can't stomach self-serving advice, you should go live in a cave. If he's worried about governments basing pollution laws on research done by oil companies, then the problem is the government, not the oil companies.

A Buddhist teacher once told me, "Buddhist teachers are full of shit." He didn't have to complete the statement, which is that the rest of us are, too. By the time most of us grew up, we developed sort of a sliding scale of trust. People whose interests line up very well with yours (your parents, for instance) can be trusted. People whose interests don't line up with yours (a stranger from Nigeria sending you an email) can't. If someone doesn't owe you the truth, then you probably aren't going to get it.

The liars aren't the problem --- the believers are the problem.





Monday, March 17, 2014

Mathematical Holidays

So, last Friday (3/14) marked another Pi Day. Next year will be even more exciting, because we'll cover pi to an extra two decimal places: 3/14/15... I suppose at 9:26:53 a.m., all the mathematicians will shoot their guns in the air.

I think I wrote last year how people in countries that write dates as Day/Month instead of Month/Day don't get to have Pi Day, because there's no 14th month. I've always been partial to writing the month first, because it makes more sense from a place-value perspective. Day/Month/Year makes sense, and so would Year/Month/Day, but Month/Day/Year? It's all out of whack. I like the military style: 14 MAR 2014. No mistaking that.

However, the base-ten representation of pi is no more fundamental than its representation in any other base. The only other bases that make any sense are base seven (7 days in a week) or base 12 (12 months in a year). You could do base 30, but not all months have 30 days.

In base 7, pi = 3.066... Rounding this to two places, you get 3.10 (not 3.07 - there is no digit 7 in base 7!) So Pi Day could be the 10th day of the 3rd month or the 3rd day of the 10th month. In base 10, that translates to the 7th day of the 3rd month or the 3rd day of the 7th month, so March 7 or July 3 depending on how you write your dates.

In base 12, pi = 3.185... Rounding this to two places, you get 3.19. The 19th month in base 12 is the 17th month in base 10, but there is no 17th month, so the only date that makes sense is the 19th day of the 3rd month in base 12. But 19 in base 12 is 17 in base 10, so that would make Pi Day March 17th. That won't work because people are too drunk on green beer to care about pi on March 17.

Arguably, the base of natural logarithms (e) is even more important than pi, for reasons I won't bore you with. But the decimal expansion of e is 2.718..., which doesn't give a good date. Maybe the 271st day of the the year, which would be September 28 in a non-leap year. September 28 is the 272nd day of the year in a leap year, which is OK because e really rounds to 2.72. It's 2.501... in base 7 is and in base 12 it's 2.875... Can't make any dates from those.

I've always been partial to the Euler-Mascheroni constant, gamma = 0.5772... That's totally unworkable as a decimal date.  I also like the Golden Ratio, 1.618... Because it's a ratio, it's logical (for the purpose of this silly post, I guess) to use it to divide the year. In a non-leap year, August 14 divides the year into 226 days that have passed and 139 that remain, and 226/139 is as close as you get to the Golden Ratio with a whole number of days. I'd trade Labor Day for a Golden Ratio Day on August 14. You'd get a day off before the kids have gone back to school, and it would eliminate that annoying short week the first week of school.