Calculus for Cats and Prime Number Theorem

<I was looking for a quick way to combine cats and mathematics this morning, and came across the book Calculus for Cats.

This is a book for people about to take calculus, and for survivors of calculus who still wonder what it was all about. It gently explains the basic concepts and vocabulary without making the reader ever do a single problem.

Basically, the book draws (quite literally) an analogy between the fluid motion of cats at play (or in pursuit of “prey”) and the concepts and techniques of calculus, which focuses on continuous functions.

We at CatSynth remember calculus fondly as a mathematical pursuit. But number theory is more my thing. Calculus primary concerns itself with continuous functions of real and complex numbers, while number theory deals with discrete entities, like integers. But in mathematics, all things are interconnected. For example, we demonstrated the connection between the gamma function, pi and factorials, combining continuous and discrete concepts.

Consider the function π(x), the prime-counting function. It's a bit unfortunate they chose the symbol π, but it is what it is. Basically, this function counts the number of primes less than or equal to a particular number. For example π(20) would be all the prime numbers less than 20: 2, 3, 5, 7, 11, 13, 17 and 19. So π(20) = 8.

So to calculate π(1000) would one have to literally count all the prime numbers less than 1000, including figuring out which numbers are prime? And what about π(1000000)? Unfortunately, the answer is yes. But there are good ways to approximate the number of primes, using the results of the Prime Number Theorem. Those interested in the formal theorem are encouraged to follow the link, but we will skip ahead to one of the interesting results. One of basic functions to come out of calculus is the natural logarithm ln(x), whose base is the famous constant e. If you don't know about it, go look it up. Otherwise, the rest of this article will not make much sense. One can use ln(x) to build more complicated functions in calculus, one of which is the offset logarithmic integral, or Li(x):

This is one of those functions, like the gamma function, that cannot be expressed without the use of calculus. Turns out, however, that it is a good approximately for π(x), which is very much a discrete concept and quite distant from the continuous motions involved in calculus. The prime number theorem provides the connection.

This article is included in Carnival of Mathematics #31 at recursivity.

The logistic function revisted

Today we revisit one of our most popular articles, on the logistic function:

f(x) = ax(x-1)

In the original article, we demonstrated how we can use this function as a “logistic map” by iterating (i.e.,applying it repeatedly to the previous result). The logistic map produced different sorts of behavior depending on the values of a. For example, for some values of a, iteration settles into a cycle, bouncing among two or more points on the function.

The original article provided more examples and more detail about the mathematics, and those who are interested are encouraged to go back and check it out. One of the main this we discussed was how one can characterize the logistic function over
different values of a using a graph called a bifurcation
. As the values of a increase (a is labelled as “r” in this graphic I shamelessly but legally ripped off from wikipedia), one can observe vertically the period doubling where the logistic map converges on a single value, then bounces between two points, then four, then eight, and so on, until the onset of chaos at approximately 3.57.

When a is greater than or equal to 4, the function “diverges”, i.e., it just gets bigger and bigger (or smaller and smaller because the numbers are negative) when you repeatedly apply it.

The bifurcation diagram shows what happens for real values of a, i.e., all integers, fractions and other numbers that can be expressed as a decimal. But suppose we allow a to be any complex number, or any combination of real and “imaginary” numbers (i.e., square roots of negative numbers). Real numbers can be expressed a line, while complex numbers are expressed on a plane. So we can produce an analog of the bifurcation diagram over a plane instead of a line as above.

In the following diagrams, we are looking at the complex plane of
different values for a. If the logistic map converges to either a single value or a cycle, the location on the plane is colored in black. If it diverges, i.e., gets infinitely farther away from zero, then the location is white. Unlike for real numbers, where the convergent “black” values of a form a simple line segment, for complex numbers the set of convergent values is a lot more “complex”:

Zooming in, we can see the structure of the set, with lots of smaller “bubbles” and “filaments” off of the main circles. The large circles are the complex-number equivalents of the single-line sections of the bifurcation diagrams, with the small bubbles representing cycles and period doubling.

Some readers might recognize similarities between this set and more well-known Mandelbrot set:

The similarity is more than coincidence, as the Mandelbrot set is based on a map similar to the logistic map. But the Mandelbrot set has the pronounced cardioid shape and asymmetry different from the logistic-map set. Zooming in further, we see that filaments and local areas of the two sets have more similarity. Indeed, we see small “Mandelbrot-like sets” at the junctions of the filaments:

It is interesting how these miniature versions have a shape similar to Mandelbrot set rather than the double-circle of the logistic-map set.

Although these sets have a “fractal-like” qualities, neither is a fractal in the strict sense of the word. They are not strictly self-similar, nor do they have fractional dimension. Nonetheless, we are featuring the logistic-map set as a “Friday Fractal” , an event started by our friend Andrée at meeyauw.

I am not sure the logistic-map set has a name like the Mandelbrot set has, so how about calling it the CatSynth set?

Submitted to Carnival of Mathematics #29.

Fun with Pi (Day)

We saw this picture on meeyauw, and thought it was a good way to open our own Pi Day offering. Pi Day, or π day is celebrated on March 14 (3/14) of every year.

π does turn up in some interesting places besides circles and standard trigonometry (and LOLcat photos). There is of course Euler's famous identity:

which unites π with four of the other most famous constants in mathematics: zero, 1, i (the imaginary root of -1) and e. But it also turns up in some more surprising places. Consider the well-known factorial function, where n! or “n factorial” is the product of all the integers between 1 and n. For example:

5! = 5×4×3×2×1 = 120.

Simple enough. But of course some troublemaker is eventually going to ask for the factorial of 1/2. Not so easy. Fortunately, there is a function, called the Gamma function, that provides a solution:

Not really as simple as the original integer-only factorial. Once calculus is involved, might as well forget about it. But if you go through the trouble of plugging in 1/2 to the formula, you get the following intriguing result:


So the factorial of one half is one half the square root of π. Who knew?

Mobius Transformations video (A YouTube hit)

From our friend Andrée at meeyauw:

An informative and beautifully produced YouTube mathematics hit. There is a YouTube link, where you will find a link to the original source of the video. You can download the video to your own drive. You really should watch this, even if you don't like math (gasp).

Well, we at CatSynth of course love mathematics, and appreciated this video. It is about Möbius transformations, an important concept involving complex numbers and geometry. You can watch the video below: