All the data you need.

Tag: Mathematica

Adjacency networks
Suppose you want to color a map with no two bordering regions having the same color. If this is a map on a plane, you can do this using only four colors, but maybe you’d like to use more. You can reduce the problem to coloring the nodes in a …
A traveling salesman tour of Africa
Suppose you’d like to tour Africa, visiting each country once, then returning to your starting point, minimizing the distance traveled. Here’s my first attempt at a solution using Mathematica, based on an example in the documentation for FindShortestTour. africa = CountryData["Africa"] pos = GeoPosition[CountryData[#, "CenterCoordinates"]] & /@ africa FindShortestTour[africa] GeoGraphics[{Thick, …
Random Blaschke products and Mathematica binding
A Blaschke product is a function that is the product of Blaschke factors, functions of the form b(z; a) = |a| (a – z) / a (1 – a*z) where the complex number a lies inside the unit circle and a* is the complex conjugate of a. I wanted to …
Inversion in a circle
Inversion in the unit circle is a way of turning the circle inside-out. Everything that was inside the circle goes outside the circle, and everything that was outside the circle comes in. Not only is the disk turned inside-out, the same thing happens along each ray going out from the …
Catenary kiln
Will Buckner sent me an email with the following question recently. (I’m sharing this with permission.) I am building a kiln using a catenary arch. The rear wall and front wall/door will be vertical and fill in the space under the arch, which has the dimensions of 41″W x 39.5″H. …
A closer look at zero spacing
A few days ago I wrote about Kneser’s theorem. This theorem tells whether the differential equation u ″(x) + h(x) u(x) = 0 will oscillate indefinitely, i.e. whether it will have an infinite number of zeros. Today’s post will look at another theorem that gives more specific information about the …
Quintic trinomial root
This post looks at an exercise from Special Functions, exercise 6 in Appendix E. Suppose that xm+1 + ax – b = 0. Show that Use this formula to find a solution to x5 + 4x + 2 = 0 to four decimal places of accuracy. When m = 0 …
Numbering the branches of the Lambert W function
The previous post used the Lambert W function to solve an equation that came up in counting partitions of an integer. The first solution found didn’t make sense in context, but another solution, one on a different branch, did. The default branch k = 0 wasn’t what we were after, …
Partitions and Pentagons
This post will present a remarkable theorem of Euler which makes a connection between integer partitions and pentagons. Partitions A partition of an integer n is a way of writing n as a sum of positive integers. For example, there are seven unordered partitions of 5: 5 4 + 1 …
Everywhere chaotic map on the sphere
Let f be a complex-valued function of a complex variable. The Julia set of f is the set of points where f is chaotic. Julia sets are often complicated fractals, but they can be simple. In this post I want to look at the function f(z) = (z² + 1)² …
Plotting the Gauss map
A recent post looked at an example from one of Michael Trott’s tomes. This post looks at another example from the same tome. Trott made a contour plot of the Gauss map over the complex plane. I copied his code (almost) and reproduced his plot. ContourPlot[ Abs[1/(x + I y) …
Nonlinear phase portrait
I was reading through Michael Trott’s Mathematica Guidebook for Programming and ran across the following plot. I find the image aesthetically interesting. I also find it interesting that the image is the phase portrait of a differential equation whose solution doesn’t look that interesting. That is, the plot of (x(t), …
Laplacian in various coordinate systems
The recent post on the wave equation on a disk showed that the Laplace operator has a different form in polar coordinates than it does in Cartesian coordinates. In general, the Laplacian is not simply the sum of the second derivatives with respect to each variable. Mathematica has a function, …
Lambert W strikes again
I was studying a statistics paper the other day in which the author said to solve t log( 1 + n/t ) = k for t as part of an algorithm. Assume 0 < k < n. Is this well posed? First of all, can this equation be solved for …
Does chaos imply period 3?
Sharkovskii’s theorem says that if a continuous map f from an interval I to itself has a point with period 3, then it has a point with period 5. And if it has a point with period 5, then it has points with order 7, etc. The theorem has a …
Fourier uncertainty principle
Heisenberg’s uncertainty principle says there is a limit to how well you can know both the position and momentum of anything at the same time. The product of the uncertainties in the two quantities has a lower bound. There is a closely related principle in Fourier analysis that says a …
Fourier transforms in Mathematica
Unfortunately there are many slightly different ways to define the Fourier transform. So the first two questions when using Mathematica (or any other software) to compute Fourier transforms are what definition of Fourier transform does it use, and what to do if you want to use a different definition. The …
Adding tubes to knots
Several months ago I wrote a blog post about Lissajous curves and knots that included the image below. Here’s an improved version of the same knot. The original image was like tying the knot in thread. The new image is like tying it in rope, which makes it easier to …