Back to Riemann, Part 3


I’ve already talked about “i” as a placeholder that represents rotation around the origin, and how f(x) = x^z works when z = a + bi across the complex plane. “a” represents changes in magnitude of the vector line drawn from the origin to the point x^(a+bi), and “bi” contributes to the angle of that vector. As “b” varies, the angle varies (the angle is referred to as the “argument” of the function).

So, how does e^i tie into all this? In the last entry, I introduced the natural logarithm ln(), and said that it is the log of base e. And I talked about real exponents from minus to plus infinity. Before we go to the next step, for imaginary exponents of base e, let’s look at “e” a bit more.

Jacob Bernoulli (1655-1705) was a Swiss mathematician. In the early 1680’s he was studying a problem on compound interest. If you have simple interest, then you spend whatever money you make on your investment, and your investment always makes you the same amount each time. That is, $100 at 5% annually is $5. After 10 years, you still have your initial $100 investment, plus the extra $50 in interest which you’d spent on coffee at the end of each year. However, if you put the interest you make back into savings, then you get something like this for those same 10 years:

100 ———— 5
105 ———— 5.25
110.25 ——— 5.5125
115.7625 ——- 5.788125
121.550625 —- 6.07753125
127.6281563 — 6.381407813
134.0095641 — 6.700478203
140.7100423 — 7.035502113
147.7455444 — 7.387277219
155.1328216 — 7.75664108

As can be seen here, you’re making interest on your interest, plus the principle, and the result is that your total net worth goes up. The question, though, is what happens when you calculate the interest monthly rather than annually, or even if you calculate it daily. Bernoulli used the formula:

Which is read as taking the limit of (1 + 1/n) ^ n as “n” goes to infinity. In his example, the account pays 100% interest annually. If the payments are made every 6 months, at 5%, then my formula becomes $100 * (1 + 0.05/2)^2, or $105.06 for the year. Monthly, it’s $100 * (1 + 0.05/12)^12 = $105.10. Granted, it’s not much of an extra gain, but it does show that the more often you calculate interest during the compounding period, the more money you make. So, compounding daily would give you $105.13 in the first year. Now, what Bernoulli did was to use that 100% interest value, and he noticed that the formula tended to reach a limit as “n” went to infinity, specifically, that limit was 2.7182818. (As an approximation, calculating with 100% on one dollar daily for one year, $1 * (1 + 1/365)^365) = 2.707.)

The more general rule is that compounding = e^Rt, where R is the rate as a decimal value (5% => R = 0.05), and t is the number of years you’re going to hold the account.

If the principal is $100, R = 0.05, and we want to save the money for 10 years, the total with compounded interest would be,
y = 100 * e^(0.05 * 10) = $164.87

According to the wiki entry, the first known reference to this constant was in correspondence from Gottfried Leibniz to Christiaan Huygens in 1690 and 1691, where it was given the letter “b”. Leonhard Euler assigned it to the symbol epsilon (e) in 1731 as the base for the natural logarithm, ln().

One of the starting points in teaching calculus is the idea of measuring the area of a curve by summing the areas of rectangles under the curve that all have the same width (I talked about this in the Riemann Prose series, and it’s the basis of what Bernoulli did above in finding e). The larger the number of boxes, the smaller their widths and the closer the sum total gets to the actual area under that curve. When the number of boxes approaches infinity, their widths approach 0, as does their individual areas. Doing this is called taking the derivative of that equation, f(x). So, the derivative of f(x) -> f'(x) = d/dx f(x).

If f(x) = x^2, then the derivative is 2 * x. The derivative of 2 * x is 2. If you drop a rock from the top of a tall building and measure how long it takes to reach the bottom, and you figure that gravity is an acceleration constant of g feet per second per second, then if the rock covers 400 feet in 5 seconds, and:

x = 1/2 * g * t^2
velocity at time t = g * t
acceleration = g

g = 2 * x / t^2 = 2 * 400 / 5^2 = 32 feet per sec^2
velocity = 32 * 5 = 160 feet per second.

The general rule of taking the derivative of an exponential function in the form of x ^ b is to multiply the function by “b”, and subtract 1 from the exponent.

That is:
d/dx of the function f(x) = x^2 is: 2 * x
d/dx of the function f(x) = x^3 is: 3 * x^2

The reason to go through all this is that e^x is a special case.
d/dx e^x = e^x

And, d/dx of ln(x) = 1/x

To put it graphically, when you draw a line through 2 points on a curve (x1,y1) and (x2,y2), the difference between the two points (x2 – x1, y2 – y1) is the slope of that line running through those points. And, as those points get closer together, the line more closely approximates the tangent line to that curve. Therefore, taking the derivative f'(x) of a function f(x) yields the line tangent to that curve at point x. And, the slope of the curve e^x at point x is the line defined by e^x.


(Graph of e^x for 0.1 <= x <= 3.0, and the tangent line for the derivative at an arbitrary point x ~ 2.3.)

Ok, so we now know one way to calculate e, why e is useful, and how to take the derivatives of both e^x and ln(x).

Let’s get back on topic for e^bi.
Next week.

Back to Riemann, Part 2


The idea of exponents is weird, if you think about it. Take the function:

f(x) = n^x

If “n” is positive and greater than 1, then f(x) goes to 0 as x approaches negative infinity, and it goes to infinity very quickly for x-> infinity. There are two special cases: f(x) = 1 for all “n” when x=0; and f(x) = “n” when x=1. But, what’s really happening here?


(n^x for x from -3 to 3, and n=2.)

By definition, n^x is the area of a square when x=2 (n*n), and the volume of a cube when x=3 (n*n*n). When x is a positive integer > 1, then f(x) is simply the result of multiplying “n” by itself x times. By convention, f(x) becomes (1/n)^|x| if x is a negative integer. That is, you’re taking the reciprocal of “n”, and f(x) is then the result of multiplying (1/n) by itself positive x times.

If x is a fraction, such as 1/2, we treat this as taking the root of “n”. In other words, for a square of area 10, what is the length of side “n” that gives us the answer 10 when f(x) = n*n? Answer: f(x) = sqrt(10) = approx. 3.162 (3.162 x 3.162 => 10). For f(x) = 10 = n^(1/3), n = 2.154 (n*n*n = 10).

What initially seems odd about this is that we can take any random fractional root and get a reasonable answer back. This is because 1/2 = 0.5, and 1/3 = 0.33333, and the line drawn by f(x) = 10^x is continuous over the range from 0.33333 to 0.5. Plugging in x = 0.5 works just as well as x = 0.52.

Actually, x=0.52 isn’t that bad, because exponents with the same base are additive, so that 10^0.52 is the same as 10^(0.5) * 10^(0.02) = 10^(1/2) * 10^(1/50), where we multiply the square root of 10 (3.162) by the 50th root of 10 (1.047). But, still. Something like 10^3.14159 looks bizarre to me.

Anyway, negative real numbers work the same way. x = -3.14159 would be like taking the reciprocal of 10 cubed times the reciprocal of the 0.14159th power of 10 (1 / 0.14159 = the 7.06th root, so 10^1/7.06 = 1.385).

The point is that f(x) = n^x is on a continuous curve over minus infinity to plus infinity, for any real value of x.

Now, assume that I have f(x) = 3 = 10^x, and I want to find x. How do I do that?

Yes, this is where logarithms come in.

y = logb(x) for b^y = x.

where b is the base value for the exponential function. That is, if f(x) = 10^2 = 100, then 2 = log10(100).

To answer the above question, for 10^x = 3, log10(3) = x = 0.477, which is just a bit less than one half (1/2.096) (which is reasonable, because 3 is a bit under the square root of 10, so 3 = 10^0.477 makes sense).

What makes logarithms so useful is that while f(x) = 10^x is a curve that gets big really fast, x itself is a straight line with a slope of 1. This means that if you’re working with really big numbers with weird curves, it makes a lot more sense to draw the curves of the logarithms of those numbers.

I’ll end with the introduction of the natural log, or ln(). Keeping in mind that log(1) of any base number = 0 (f(x) = n^0 = 1) , and that log(0) is undefined (because it would mean f(x) = 0^x, which applies to all values of x, or that x is negative infinity), what value of “k” would we need for the area under the curve y=1/x, from x=1 to k, to equal 1?


(I may have drawn the left side of the shaded area a little too far to the right of 1.)

There are several ways to derive this value for k, but the answer at the moment is 2.71828…, and is identified by the constant “e”. Then, with “e” as the base of f(x) = y = e^x, x = loge(y). log base e is the natural logarithm, and is shortened to ln(). And, naturally, ln(e) = 1.

Logs and e also covered in Riemann Prose part 7.

Back to Riemann



(Image from Amazon)

I mentioned about a week ago that I received this book for Christmas. It’s a pretty thin volume, at only 144 pages, with 54 pages dedicated to exercise solutions and the index, but it lays out the math for the Riemann hypothesis clearly enough that I’m getting pretty close to understanding how to put the formulas into Excel this time. So, I’m going to try to write up my thoughts as I go in an attempt to understand everything myself.

This book, compiled by der Veen and de Craats, started out as an online internet course at the University of Amsterdam, aimed at advanced secondary school students to get them interested in university-level math. It includes URLs for a couple free web-based math applications that can be used to help solve some of the exercises, or draw plots of functions of interest. These are: Wolfram Alpha and Sage. The authors make extensive use of Alpha for the book exercises.

When I left off at the end of my Riemann prose series I’d gotten stuck with the fact that the standard representation of Riemann’s zeta function doesn’t work for the region we need it for.

Where “s” is a complex number in the form of s = a + bi. (Later, written as z instead of s.)

If b=0, that is we only look at numbers on the real number line, we get something like the following graph.

This just shows the results of summing “n” from 1 to 11, while calculating “a” from -5 to plus 5. It’s pretty clear from this graph that f(x) is going to infinity fast as “a” goes more negative (a < 0). Even for a=0, summing “n” from 1 to 11, the total reaches 11. Limiting the graph to the portion for a >= 1, we get the next chart.

If a=1, f(1) reaches 3.02. If n goes to infinity, so does f(1). That is, when f(1) = 1/1 + 1/2 + 1/3 + 1/4…, f(1) doesn’t converge. However, when a = 2 or greater, the function does converge. f(2) = 1/1 + 1/4 + 1/9 + 1/16… goes to about 1.6, and larger values of “a” converge closer and closer to 1.

What’s important to take away from this graph at the moment is that f(a) never crosses the x-axis, and therefore there’s never any point at which f(a) = 0. Which is the part we want.

If z (or, “s”) = a + bi for non-zero values of b, what happens? Well, in the previous blog series I’d shown that “i” represents a phase shift, where we can move from the x-axis to the y-axis in the complex plane, and then back.

1 * i = i
i * i = -1
-1 + i = -i
-1 * i = 1

And, x^bi represents a rotation around the origin in the form of x*cos(b) + x*i*sin(b).

So, if z = a + bi, and f(z) = x^z = x^(a + bi),
this is functionally the same as (x^a) * x*(cos(b) + i*sin(b)).

Summing 1 + 1/2^z + 1/3^z + 1/4^z …

where z = a + bi

Just means that we keep using the function n^a * n(cos(b) + i*sin(b)) to get each individual term of f(z), and then add that to the current running total.

If a > 1, we’re going to get a spiral converging on a non-zero point:

And if a < 1, the function goes to infinity.

This is where I’d given up, because the wiki article kept using notation that I had trouble rewriting to fit into Excel. However, the der Veen and de Craats book is very promising. To go any further, I need to cover some of the basics a bit more.

Questions:
How did Riemann decide on the zeta function in the first place?
What was he trying to prove with the zeta function?
What is the correlation between the zeta function and prime numbers?
If the important part of the zeta curve is where f(z) = 0, and the existing version of the zeta function never equals 0, what do we do to fix things?
What are logs, what is e, and how do they relate to the zeta function?

Current status


Nothing really new to add here this time, science-wise. The weather has been too windy for flying the little drones outside, so I haven’t been able to practice with them at all lately. I don’t have any more synthesizer albums to include in the “now playing” category because I don’t listen to music when working at the computer much anymore, although I did get the Jean Michel Jarre “Equinoxe” CD as a Christmas present and I do have it on my MP3 player for walking to and from work. The thing is, I already included that in a previous “now playing” blog entry.

There probably won’t be anything else new from Gakken for months from now, if not for another year or so. I do have the 9-pin serial to USB adapter cable, but I haven’t had time to sit down with it yet to see if it works with the robot kit (or even if even the robot kit works at all). This is partly because I’ve been busy with work, but also because I’m in the middle of playing Zelda – Mask of Majora in what little free time I can get.

I did receive several books for Christmas as well, including two Cerebus the Aardvark phonebooks (Melmoth and Jaka’s Story), The Riemann Hypothesis by Roland van der Veen and Jan van de Craats, and The Colossal Book of Short Puzzles and Problems by Martin Gardener. I finished the two Cerebus books, which are must-reads for any Cerebus fan, but if you’ve never read this comic before, you really need to start from the beginning; picking it up in the middle will just be confusing. I’ve started reading the Riemann book, which was originally presented as a 4-week educational course for advanced high school kids looking to get into mathematics as a career. The first couple chapters just lay down the groundwork for understanding prime number distribution, derivatives, integration, infinite sums and limits. There are many exercises for readers to apply proofs to various problems, making pretty math-heavy. Some of the exercises use free online math software to draw plots of the prime number distribution curves and infinite sums. It’s a short book, but very deep. I haven’t gotten to the Gardener book yet – that’s absolutely colossal, as said in the title. That’s not a book you carry along to read during your commute on a crowded train.

Gakken Kaeda Kit comments


Okay, the latest Gakken kit is finally out – the Kaeda drone, so named because the main prop blade resembles a maple seed. 3,980 yen ($39 USD) without the 8% tax. It’s been over a year since the last kit came out, in Sept., 2015, and the anticipation for the Kaeda Drone was probably blown out of proportion because of it. This one wasn’t much of a challenge to build, since the drone itself was already pre-assembled. The controller required assembly, but it only consisted of the two halves of the case shell, the battery cover, three knobs, the circuit board, and 6 screws, (and there are 2 replacement propeller blades).


(The controller parts, plus the two replacement blades.)

The suggested assembly time was 15 minutes, and I think I did it in 10. (It takes 4 AAA batteries.) The only issue was with the power LED leads, which had been bent 180 degrees, and the requirement is for the leads to be bent 90 degrees so the LED is sticking out the side of the case. But, that’s an easy fix. The drone is powered by a lithium polymer battery that takes about 30 minutes to recharge to 60% when plugged into the controller. That will give you roughly 7 minutes of flight time. If you want the battery at full power, you have to give it a second charge. The instructions are: 1) Turn off the controller and the drone. 2) Pull the charge cable out of the well at the back of the controller, under the battery cover. Plug the cable into the drone. 3) Turn on the controller power switch. The green LED will light on the controller. When it goes out, the first charge cycle is finished. 4) Repeat steps 1-3 for the second charge.


(The assembled controller.)

The controller talks to the drone via an infrared LED, so it has to be aimed directly at the drone at all times, or the drone will lose signal and touch down on the ground. And, it works up to 15 feet away. The controller itself is simple – a power switch, the power LED and charge LED, the propeller speed slider and the directional knob. You hold the knob in the direction you want to go, and the horizontal tail prop turns on and off to get the sideways movement desired. The one tail prop prevents the body unit from rotating, and the other contributes to directional movement. The main styrofoam blade gives you lift, and it maintains its height pretty well. The drone is light, at 12 grams, and if it bumps into something, it’ll just bounce away without anything getting damaged, including the styrofoam blade. The kit dimensions are 9.8″ x 7″ x 1″.

Overall, it’s a nice little toy, and is fine for use indoors, but the $39 price tag IS on the high side. Especially when you look at the magazine. This is one of the thinner volumes in a long time. It’s only 36 pages. The first section is a 4-page photo essay with the model/idol talent, Riina flying the drone in a house. This is followed by 6 pages of explanation for how the drone works and how to fly it. There’s 4 pages for building the controller, and 1 page of troubleshooting Q&A. 2 pages of photo essay for the shapes of tree seeds, and 2 pages for an interview with a Japanese drone racer. The editor-suggested mods are to replace the blade with balsa wood, and to put LEDs on the main blade and connect the controller to a PC via an Arduino box for computer-controlled light art. The last 5 pages are an explanation of what drones are, and what uses they’re being put to. There’s no manga this time, no science, and very little theory. There’s also no mention of any future kits.


(Bottom side of the drone.)

I get the feeling that Gakken is having trouble figuring out how to make money on their publications, and they’re cutting corners on projects that appear over-staffed or over-promoted. This is a shame because I like building these kits, and I’d love to see more of them in the electronic music series. Oh well. Anyway, I recommend the Kaeda drone if you can get it in Japan at cover price, without the import mark-up.


(The drone, plugged into the controller to recharge the lithium polymer battery.)

Direct youtube link