17 September 2024

The Celebrity Irrationals

Let it be known that I know nothing of the irrational celebrities.
Last time, I mentioned the square root of 2 (√2), pi (π), the golden ratio phi (φ), and Euler's number (e).  I hadn't meant to leave us all hot and bothered.

   √2   
The square root of some number x is a number, that when multiplied by itself, is x.
So the positive square root of 64 is 8.
The positive square root of 25 is 5.
The positive square root of 2 is bigger than 1 but less than 2.
It is about 1.4142, and it's an irrational number.
In fact, the square roots of all non-square natural numbers are irrational.

That was all I had to say about it, but Sarah absolutely insists upon geometrical graphics.
(Sarah and I have been the best of friends since 1988.)
Below is a square with a side of unit 1.
It's bisected along the diagonal with the blue line.
The Pythagorean theorem states that for all right triangles,
    the sum of the squares of the two shorter sides is equal to the square of the hypotenuse.
So in the right triangle below, the sum of the squares of the two shorter sides, 12 + 12, is 2.
And that means that the hypotenuse squared is 2, which means that the hypotenuse = √2.
Put another way, the ratio of the length of the blue line over one of the red lines is √2.



   π   
Pi is everyone's favorite.
It is about 3.14159, and it's an irrational number.
All circles are the same, except for the fact that some are bigger than others.
So when something is true of one circle, it is true of all circles.
Pi is really helpful when discussing circles, because:
    The circumference of a circle with radius r is 2rπ, and
    the area of a circle with radius r is πr2.

Wouldn't you know it, but Sarah insisted on another geometrical graphic.
When I said that the circumference of a circle with radius r is 2rπ, this is what that looks like.

The circumference is red, and two radii make up the blue line.
This means that the ratio of the length of the red line over the length of the blue line is π.

And when I said that the area of a circle with radius r is πr2, this is what that looks like.
The blue square has an area of r2.
This means that the ratio of the area of the circle over the area of the blue square is π.

2π is another irrational number called tau (τ).
It is about 6.28328, and some people like it better than π.
Generally speaking, however, π won the popularity contest.
In a rebellious fury to this harsh reality, you could make two pies on June 28th.
But until then, here's my pi song: Old McDonald Had a Pie

   φ   
Two numbers x and y are said to be in the golden ratio φ if x > y > 0, and
    (x/y) = (x+y)/x.
Wait, don't go on until you understand that.
There's a number x, and it's bigger than y.
The ratio between these numbers, x/y, is the same ratio as their sum and x.
Think of a ratio and how this is almost always not true.
4/3 is NOT equal to 7/4.
It's only true for φ.

Let's solve for phi, which is x/y.
    φ = x/x + y/x
    φ = 1 + y/x
    φ = 1 + 1/φ
    φ2 = φ + 1
    0 = -φ2 + φ + 1

I don't know if you remember the quadratic equation.
One time I put it to the tune of "Pop Goes the Weasel" and it was helpful.
    x equals negative b
    plus or minus the square root
    of b squared minus four ac
    all over two a
Did you sing it?

If the format for the quadratic equation is 0 = ax2 + bx + c,
and we have 0 = -φ2 + φ + 1,
then x = φ, a = -1, b = 1, and c = 1.
So according to "Pop Goes the Weasel,"
    φ = [-1 ± √(1 - -4)]/[-2]
    φ = (-1 ± √5)/(-2)
    φ = about -.618 or 1.618
But because we defined φ as a positive ratio, we can throw out -.618.
(Meanwhile, notice how the √5 guaranteed we were dealing with an irrational.)
So let's double check our findings.
    about 1.618 = x/y, so we could call x about 1.618 and we could call y 1.
    1.618 should = about (1.618 + 1)/(1.618), and that checks out.

This is a rectangle with the height of 1 and the width of 1.618.

It looks pretty nice, doesn't it?
We can cut a golden ratio rectangle into a square and another golden ratio rectangle.

And we can keep going.


If we fill each of those squares with quarter circle arcs, we create the golden spiral.
It is pretty, and does not actually approximate nautilus seashell as legend claims.

Coincidentally, George and I, the most harmonious couple ever, got married on June 18th.

But wait!  Sarah wanted to tell us about one of her high school exes, Fibonacci.
The Fibonacci sequence begins thusly: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34...
    Let's call the nth term in the sequence Fn.
    Fn = F(n-1) + F(n-2)
If we take a look at the ratio Fn/ (Fn-1), something very interesting happens.
As n approaches infinity, the ratio approaches φ.
So 34/21 is much closer to φ than 2/1, and 832040/514229 is closer still.

   e   
Let's say I have $100.
And I get 4% interest one time a year.
At the end of that year, my $100 has turned into $104.
Let's call this amount, the money I get back, "m."
The equation to get m was
    m = $100(1 + .04).

Now let's say I have $100.
And I get 4% interest, but the interest is calculated or "compounded" twice a year.
So after 6 months, I'll get .02 of my $100, and after 12 months, I'll get .02 of what's in the bank.
At the end of the year, m = $104.04.
The equation to do that was
    m = $100(1 + .02) + [$100(1 + .02)](.02)
Simplified,
    m = $100[(1 + .02) + (1 + .02)(.02)].
Simplifying further,
    m = $100[(1 + .02)2].

Now let's say I have $100.
And I get 4% interest, but the interest is compounded four times a year.
Every quarter, I will get .01 added to what's in the bank.
At the end of the year, m = $104.06.
The equation to do that was:
    m = $100(1 + .01) at the end of the first quarter
    + [$100(1 + .01)](.01) at the end of the second quarter
    + [$100(1 + .01) + $100(1 + .01)(.01)](.01) at the end of the third quarter
    + [$100(1 + .01) + $100(1 + .01)(.01)(.01)](.01) at the end of the fourth quarter
And that's
    $101 + $1.01 + $1.0201 + 1.030301 = $104.060401
Simplified,
    m = $100[(1 + .01)4].

So it seems that the more often we compound our interest, the bigger m gets.
(However, it also seems that the amount it's growing is decreasing.)
What happens if we never stop compounding interest?
That's called "continuous compounding."

If we call our 4% "r" for rate,
and the number of times we compound interest "n" for number,
we get this.
    m = $100(1 + r/n)n.

When the interest rate is 100% instead of 4%,
we get this.
    m = $100(1 + 1/n)n.
And "continuously compounding" means we calculate that as n gets bigger and bigger.
In other words, we find the limit "as n approaches infinity."
The good news is that there's already number that equals "[(1 + 1/n)n] as n approaches infinity."
And that number is called Euler's number, or e.
It's an irrational number that begins 2.71828.

Furthermore,
    m = $100ert,
    where r is your rate per unit of time
    and t means how much time, measured in the same units, that you left your $100 in the bank.

So if I put my $100 at 4% and compound it continuously for 1 year,
    m = $100e(.04)(1) = a little less than 104.082.

And if I stopped continuously compounding to take a sip of coffee, I would make a little less.

   e   
There are lots of ways to discover e.
I asked my dad to tell me what e was, and he did that in two ways in under 5 minutes.
This is the first of them.

! means "factorial."
"3 factorial" or "3!" means 3*2*1.
10! means 10*9*8*7*6*6*5*4*3*2*1.

As n approaches infinity,
    e = (1 + 1/1! + 1/2! + 1/3! + 1/4!... + 1/n!)
Futhermore, as n approaches infinity,
    e= (1 + x/1! + x2/2! + ... xn/n!)

   e   
Here's the second, but you might want to make yourself comfortable.

We're not very good at understanding big numbers or small numbers.
We're really only kind of good at understanding the smaller positive numbers.
Even better if they're smaller positive integers!
    How many eggs shall I cook?
    How many sticks did you find?
    How many people are coming to the party?
But when we start talking about how many atoms or grains of sand, the numbers not only mean very little to us, but they're also difficult to compare and difficult to compute.
To get around that, we sometimes translate very big and very small numbers into smaller positive numbers times 10 to something, and that's called scientific notation.

A quick internet search will tell us that there are between 1078 and 1082 atoms in the universe.
And there are between 10111 and 10123 positions (including illegal moves) in the game of chess.
Did you know that there are more chess positions than atoms in the universe?
And by a LOT?
But if we're only counting legal moves in chess, there are 1040 positions.
That's sort of the square root of the number of atoms in the universe.

When we're thinking of big numbers in this way, we're thinking in powers.
And when we're thinking in powers, logarithms are helpful.
Here's something to stare at for a second.
    If log10(100) = x,
    then x = 2.
In other words, "log10(100)" means "10 to what power = 100?"

Here's a little chart expanding on this idea.
    log10(1000) = 3
    log10(100) = 2
    log10(10) = 1
    log10(1) = 0
    log10(.1) = -1
    log10(.01) = -2
    log10(.001) = -3

Here are some other examples.
    log2(2) = 1
    log2(4) = 2
    log2(8) = 3
    log2(16) = 4

    log5(5) = 1
    log5(25) = 2
    log25(5) = 1/2
    log125(5) = 1/3

    log7(7) = 1
    log7(1) = 0
    log7(1/7) = -1
    log7(1/49) = -2

    log3(3) = 1
    log3(9) = 2
    log3(1/9) = -2
    log3(1/√3) = -1/2

While we’re at it, here are some properties of logarithms.
    logx(1) = 0
    logx(x) = 1
    logx(ab) = logx(a) + logx(b)
    logx(a/b) = logx(a) - logx(b)
    logx(ab) = (b)logx(a)
    x^(logx(a)) = a
    logx(a) = logy(a)/logy(x)

The two most common bases to use for logarithms are 10 and e.
"loge" is called the "natural log" and is abbreviated "ln."
So ln(e) = 1.
loge or ln is so common, in fact, that "log" means "ln" to a mathematician.
Confusingly, "log" means “log10” to a scientist or engineer.

Notice that our last property of logarithms shows us how to change bases.
Because
    logx(a) = logy(a)/logy(x),
Then we can translate between log10 and ln.
    log10(x) = ln(x)/ln(10).

It is nearly beyond the scope of this post to understand why this matters.
But let's try to remember derivatives from high school.
We learned that when we're graphing curves, we can measure how quickly we're moving up or down.
That's done by drawing a tangent line to the curve at a given point, and then measuring its slope.

We learned that the derivative of xis 2x.
Do you remember that?  More generally speaking, if
    f(x) = xn, then the derivative (notated f'(x)) = nx(x-1).
And if you did lots of this stuff, you might remember that if
    f(x) = 3x4 + x3 + 4x2 x1 + 5, then
    f'(x) = 12x3 + 3x2 + 8x1 + 1.
That wasn't important, but I did sneak in 31415 just to be cute.

The point is that f’(x) gives us the slope of the line tangent to f(x) at x.
(This is worth a reread if it doesn't readily make sense.)

Sometimes, instead of graphing f(x) = xn, people graph equations like these:
    f(x) = 1x
    f(x) = 2x
    f(x) = 3x
And as it so happens, if
    f(x) = ax, then
    f'(x) = axln(a).

With the first equation, f(x) = 1x will always yield 1.
Courtesy of desmos graphing calculator, that looks like the picture below.
Its derivative, f'(x), is 1xln(1), and since ln(1) = 0, the slope is always 0.
f(x) is graphed in red and f'(x) is graphed in blue.

f(x) = 2x looks like this (in red).
f'(x) = 2xln(2) looks like this (in blue).
ln(2) is about .693, which is less than 1, so the slope of the tangent is less than the y value.

f(x) = 3x looks like this (in red).
f'(x) = 3xln(3) looks like this (in blue).
ln(3) is about 1.099, so the slope of the tangent is a LITTLE more than the y value.

But what about f(x) = ex?  That looks like this.
f'(x) = exln(e).
ln(e) = 1, so the slope of the tangent is always exactly the y value.
In other words, the derivative of f(x) = ex is ex.
What?  That was like Goldilocks and the 3 bears where f'(x) = 2xln(2) was too small,
f'(x) = 3xln(3) was too big, and f'(x) = exln(e) was just right.

   e   
Here's a fourth way to think about e.
f(x) = 1/x looks like this.

When x = 0, there is no y value; in fact, 1/x is undefined.
When x is very little, there is a y value, and it is very large.
When x = 1, y = 1.
What if we were to measure the space under the curve starting at x = 1?
That would look like this.

And now for the punchline.
If we stop that measurement at x = e, the area under the curve is exactly 1 square unit.

This is beautiful because 1/x is messy and e is messy, and you can combine them to get 1.
It's basically a magic trick, don't you think?
Please do not assume this is everything there is to know about e.
Mom read an entire book on e this year, and my reports don't even cover half the wiki article.
This was like a first date.

   i   
In a fit of whimsy, I'll leave you with a bonus celebrity irrational, i.
i is called an imaginary number because it's not real, and it is √-1.
Even though it's imaginary, we can compute things like this.
    i-2 = -1
    i-1 = -i
    i= 1
    ii
    i= -1
    i= -i
    i= 1
    (2i)= -4
    (3i)= -9

After 4 chapters on e, that was like a pillow mint.
Pillow mints are made with butter, powdered sugar, whipping cream, and peppermint extract.

No comments:

Post a Comment