by John on February 1, 2012
This afternoon I ran across the jinc function for the first time.
The sinc function is defined by
sinc(t) = sin(t) / t.
The jinc function is defined analogously by
jinc(t) = J1(t) / t
where J1 is a Bessel function. Bessel functions are analogous to sines, so the jinc function is analogous to the sinc function.
Here’s what the sinc and jinc functions look like.
[click to continue...]
by John on January 31, 2012
Sometimes a graph looks wiggly because it’s actually quite flat.
This isn’t much of a paradox; the resolution is quite simple. A graph may look wiggly because the scale is wrong. If the graph is flat, graphing software may automatically choose narrow vertical range, accentuating noise in the graph. I haven’t heard a name for this, though I imagine someone has given it a name.
Here’s an extreme example. The following graph was produced by the Mathematica command Plot[Gamma[x+1] - x Gamma[x], {x, 0, 1}].

This is unsettling the first time you run into it, until you notice the vertical scale. In theory, Γ(x + 1) and x Γ(x) are exactly equal. In practice, a computer returns slightly different values for the two functions for some arguments. The differences are on the order of 10-15, the limit of floating point precision. Mathematica looks at the range of the function being plotted and picks the default vertical scaling accordingly.
In the example above, the vertical scale is 15 orders of magnitude smaller than the horizontal scale. The line is smooth as glass. Actually, it’s much smoother than glass. An angstrom is only 10 orders of magnitude smaller than a meter, so you wouldn’t have to look at glass under nearly as much magnification before you see individual atoms. At a much grosser scale you’d see imperfections in the glass.
The graph above is so jagged that it demands our attention. When the horizontal axis is closer to the proper scale, say off by a factor of 5 or 10, the problem can be more subtle. Here’s an example that I ran across yesterday.

The curves look awfully jagged, but this is just simulation noise. The function values are probabilities, and when viewed on a scale of probabilities the curves look unremarkable.

by John on January 24, 2012
What we call “differential equations” are usually not just differential equations. They also have associated initial conditions or boundary conditions.
With ordinary differential equations (ODEs), the initial conditions are often an afterthought. First you find a full set of solutions, then you plug in initial conditions to get a specific solution.
Partial differential equations (PDEs) have boundary conditions (and maybe initial conditions too). Since people typically learn ODEs first, they come to PDEs expecting boundary values to play a role analogous to ODEs. In a very limited sense they do, but in general boundary values are quite different.
The hard part about PDEs is not the PDEs themselves; the hard part is the boundary conditions. Finding solutions to differential equations in the interior of a domain is easy compared to making the equations have the specified behavior on the boundary.
No model can take everything into account. You have to draw some box around that part of the world that you’re going to model and specify what happens when your imaginary box meets the rest of the universe. That’s the hard part.
Related posts:
Three views of differential equations
Nonlinear is not a hypothesis
Approximating a solution that does not exist
by John on January 20, 2012
You may know that ratios of consecutive Fibonacci numbers tend to the golden ratio in the limit. But do know how they tend to the limit? The ratio oscillates, one above the golden ratio, the next below, each getting closer. The plot shows F(n+1) / F(n) where F(n) is the nth Fibonacci number. The height of the horizontal line is the golden ratio.

We can prove that the ratio oscillates by starting with the formula

where φ = (1 + √5)/2 is the golden ratio.
From there we can work out that

This shows that when n is odd, F(n+1) / F(n) is below the golden ratio and when n is even it is above. It also shows that the absolute error in approximating the golden ratio by F(n+1) / F(n) goes down by a factor of about φ2 each time n increases by 1.
Related posts:
Honeybee genealogy
Fibonacci numbers at work
Breastfeeding and the golden ratio
by John on January 17, 2012
Here are a few diagrams I’ve created that summarize relationships in analysis and probability. Click on a thumbnail image to go to a page with the full image and explanatory text.
Special functions

Gamma and related functions

Probability distributions

Conjugate priors

Convergence theorems

Bessel functions

by John on January 14, 2012
I noticed an ad for Super Bowl XLVI on a pizza box this morning. The Roman numeral XLVI does not repeat any character. This brought up a couple questions.
- How many Roman numerals are possible if you’re not allowed to repeat a character?
- Could you write a (reasonably short) regular expression to find all such numbers?
You can post your solutions to either question in the comments.
There has never been universal agreement on the rules for constructing Roman numerals, so your solution would depend on your choice of rules. For our purposes here, assume the valid characters are I, V, X, L, C, D, and M. Also, assume any character can be subtracted from a larger character. For example, you can assume IL is a valid representation of 49.
For a more challenging problem, you can use the more restrictive subtraction rules.
- I can be subtracted from V and X only.
- X can be subtracted from L and C only.
- C can be subtracted from D and M only.
- V, L, and D can never be subtracted.
Other puzzle posts:
A Renaissance math puzzle
Technology history quiz
A log puzzle
by John on January 4, 2012
I studied nonlinear PDEs in grad school. My advisor, Ralph Showalter, would remind us occasionally what ‘nonlinear’ means.
“Nonlinear” is not a hypothesis but the lack of a hypothesis.
He meant a couple things by this. First, when people say “nonlinear,” they often mean “not necessarily linear.” That is, they use “nonlinear” as a generalization of linear. If a statement doesn’t hold for linear equations, it can’t hold more generally. So try the linear case first.
Second, and more importantly, you usually have to specify in what way an equation is nonlinear before you can say anything useful. If you’re not assuming linearity, what are you assuming? Maybe you need to assume a function is convex. Or maybe you need to assume an upper or lower bound on a function’s growth. In any case, focus on what you are assuming rather than what you are not assuming, and make your assumptions explicit.
Related post: Three views of differential equations
by John on January 3, 2012
by John on December 25, 2011
By the nth day of Christmas, my true love had sent to me n(n+1)(n+2)/6 gifts.
Explanation and proof here.
by John on December 19, 2011
by John on December 10, 2011
by John on November 30, 2011
The previous post presented a problem first posed by Johannes Müller in 1471.
Where you should stand so that a vertical bar appears longest?
To be more precise, suppose a vertical bar is hanging so that the top of the bar is a distance a above your eye level and the bottom is a distance b above your eye level. Let x be the horizontal distance to the bar. For what value of x does the bar appear longest?
In the following diagram, we wish to maximize the angle θ.

Since tangent is an increasing function, it suffices to maximize tan(θ). Let α = θ + β. Then

Now use tan α = a/x and tan β = b/x to reduce the expression above to

Now we have a function of x to maximize. Take the derivative and find where it is zero. The maximum occurs at √ab, the geometric mean of a and b.
However, when Müller proposed his problem in 1471, calculus had not yet been invented, so we can be pretty sure Müller did not take derivatives. I don’t know how (or even if) Müller solved his problem, but the book where I found the problem showed how it could be solved without calculus. The derivation is a little longer, but it only depends on simple algebra and the arithmetic-geometric mean inequality, i.e. the observation that (a + b) /2 ≥ √ab.
Update: Here is a purely geometric solution by George Papademetriou.
Update: See this post for more historical background.
Other posts about the geometric mean:
Means and inequalities
The middle size of the universe
by John on November 29, 2011
In 1471, Johannes Müller asked where you should stand so that a vertical bar appears longest.
To be more precise, suppose a vertical bar is hanging so that the top of the bar is a distance a above your eye level and the bottom is a distance b above your eye level. Let x be the horizontal distance to the bar. For what value of x does the bar appear longest?
Note that the apparent length of the bar is determined by the size of the angle between your lines of sight to the top and bottom of the bar.
Please don’t give solutions in the comments. I’ll post my solution tomorrow, and you can give your solutions in the comments to that post if you’d like.
Source
Update: See this post for more historical background.
by John on November 23, 2011
Fermat’s last theorem is so named because it was the last of his asserted theorems to be proved or disproved. But there are variations on another conjectures of Fermat that remain unresolved.
Fermat conjectured that numbers

are always prime. We now call these “Fermat numbers.” Fermat knew that the first five, F0 through F4, were all prime.
In some ways, this conjecture failed spectacularly. Euler showed in 1732 that the next number in the sequence, F5, is not prime by factoring it into 641 × 6700417. So are all the Fermat numbers prime? No.
But that’s not the end of the story. Now we go back and refine Fermat’s conjecture. Instead of asking whether all Fn are prime, we could ask which Fn are prime.
The next several values, F5 through F32, are all known to be composite. So we might turn Fermat’s original conjecture around: are all Fn composite (for n > 4)? Nobody knows.
Well, let’s try weakening the conjecture. Is Fn composite for infinitely many values of n? Nobody knows. Is Fn prime for infinitely many values of n? Nobody knows that either, though at least one of these two statements must be true!
Here’s why I find all this interesting.
- It shows how proof by example fails. Fermat knew that the first five numbers in his series were prime. It was reasonable to guess from this that the rest might be prime, though that turned out not to be the case.
- It shows how what appears to be a dead end can be opened back up with a small refinement of the original question.
- Like many questions in number theory, the revised question is easy to state but has defied proof for centuries.
by John on November 17, 2011
The comments in the previous post touched on surprising applications of math, so I thought I’d expand this theme into it’s own post. Below I’ll give a couple general examples of surprising applications and then I’ll give a couple more personal applications I found surprising.
Number theory has traditionally been the purest of pure mathematics. People study number theory for the joy of doing so, not to make money. At least that was largely true until the advent of public key cryptography. The difficulty of solving certain number theory problems now ensures the difficulty of decrypting private communication, or so we hope. (By the way, I’ve always thought Euler deserved part of the credit for the RSA encryption scheme. Maybe it should be called RSAE encryption. R, S, and A came up with the brilliant idea to apply E’s theorem to cryptography.)
Non-euclidean geometry started as a pure mathematical abstraction. Of course the physical world is Euclidean, but let’s see what happens if we monkey with Euclid’s fifth postulate. Then along came Einstein and suddenly the real world is non-Euclidean.
One personal application of math that I found surprising was using Fibonacci numbers in practical computation. Computing Fibonacci numbers is a computer science cliché, but I actually needed to compute Fibonacci numbers for a numerical integration problem. I wrote up the details in Fibonacci numbers at work.
Another application that surprised me was using the trapezoid rule for real work. The trapezoid rule is a crude numerical integration technique. It’s good for teaching because it’s very simple, but it’s not very accurate. Or so I thought. It’s not very accurate in general, but in the right circumstances, it can be extraordinarily accurate. I explain more in Three surprises with the trapezoid rule.
One surprising non-application has been differential equations. For the past three centuries, differential equations have been at the heart of applied math. One could argue that to first approximation, applied math equals differential equations and supporting material. But I personally have not had nearly as much opportunity to use differential equations professionally as I expected, even though that was my specialization in grad school.
Related posts:
Ten surprises in numerical linear algebra
Impure math