Posted by: Dave Richeson | June 8, 2011

## Some LaTeX odds and ends

Here are a few LaTeX tricks I’d like to share. None of them are earth-shattering, but maybe they’d be useful to some of you. (If you want to try these out, you can download this sample tex file and bib file that contains these tricks.)

1. I have always wanted LaTeX to support inline comments. In many computer programming languages you can insert comments /* like this */ in the middle of a line. You can’t in LaTeX. You can add comments using a % symbol, but then everything on the line after it is commented out.

The chief reason I would like to have inline comments is because I like to leave little notes to myself in the LaTeX—facts that I’ve decided to omit, clarifying details, word choices that I haven’t decided on, etc. Wouldn’t it be nice to write this?

The rain in Spain /* or is it France? */ falls mainly on the plain.

Of course, you can effectively leave inline comments like this (with no space between the two lines):

The rain in Spain%or is it France?
falls mainly on the plain.

But I’ve never been happy with the look of that in my code.

Today I had an idea for how to get inline comments in my LaTeX code. I defined a new function that takes one argument and does nothing with it:

\newcommand{\comment}[1]{}

Now I can write inline comments like this:

The rain in Spain\comment{or is it France?} falls mainly on the plain.

2. That inspired me to work on something else on my wish list. When you put

\cite[p. 100]{richeson:2008}

in your article it leaves a citation to the book, includes the page number, and puts the book in the bibliography. When you put

\nocite{richeson:2008}

in your article it does NOT put a citation in the article, but it does put the book in the bibliography. Great. But what I would like to do is put this in my code:

\nocite[p. 100]{richeson:2008}

I want to do this not for the reader, but for me. If I’ve obtained a piece of information from a book, I’d like to make note of it in the body of my text so that I can go back and find it later. For long books, page numbers are crucial. I could use my new comment system

Euler's formula is $V-E+F=2$.\nocite{richeson:2008}\comment{p. 100} Isn't that cool?

Instead, I defined a new command:

\newcommand{\pgnocite}[2]{\nocite{#2}}

This new command takes two arguments—the page numbers and the citation. It ignores the page number and does a “nocite” on the citation. So I write

Euler's formula is $V-E+F=2$.\pgnocite{p. 100}{richeson:2008} Isn't that cool?

3. I do a lot of collaborating using DropBox and LaTeX. When I get the document back from my collaborator, it is difficult to tell what edits he made. So my collaborator and I came up with these commands to highlight new or changed text:

\usepackage[normalem]{ulem}
\usepackage[usenames,dvipsnames]{color}
\newcommand{\remove}[1]{{\color{Red}\sout{#1}$^{\text{remove}}$}}
\newcommand{\moved}[1]{{\color{ForestGreen}#1$^{\text{moved}}$}}
\newcommand{\fix}[1]{{\color{Orange}\uwave{#1}$^{\text{fix}}$}}
\newcommand{\new}[1]{{\color{NavyBlue}#1$^{\text{new}}$}}

When I add a new sentence to the document I put
\new{This is a new sentence.}

in the text. It appears blue with a little superscript “new” next to it. After I’ve read it, I can remove the \new tag. We also defined \remove, \moved, and \fix. You can create your own, add your own colors, and even decorate it with underlines from the ulem package (in the example above, \remove has a strike-through and \fix is underlined with a wavy line).

4. Lastly, we created a command that allows us to put notes in the margin.

\newcommand{\marginnote}[1]{\mbox{}\marginpar{\raggedleft\hspace{0pt}#1}}

Now we type this to get a margin note.

Here's a neat proof of this result.\marginnote{Jim, is this proof correct?}
Posted by: Dave Richeson | June 5, 2011

## Extreme examples and counterexamples

I recently read this puzzle at the Futility Closet and it reminded me of a technique that I like to use to test conjectures (when possible). I don’t know if it has a name, so I’ll call it “looking for extreme examples and counterexamples.” I like this technique because when it works it is fast and easy, and it can often be used without writing anything down. I’ll give three examples to illustrate this technique.

Example 1. Let me rephrase the puzzle in the form of a conjecture.

Two runners are in an airport standing at one end of a moving walkway (one of those 100 foot long treadmills). They run at equal speeds to the end of the walkway and back—but one runs on the moving walkway and the other runs on the (unmoving) floor next to the walkway. Conjecture: they both finish at the same time.

The idea, of course, is that the runner on the walkway will get helped by the treadmill going one direction and hindered (by the same amount) in the other direction. He’s traveling the same distance both ways, so the effect of the treadmill cancels itself out.

When you’re imagining the problem in your head you’re thinking that a person runs 15 mph and the treadmill is going 3 miles an hour, or something like that. You may reach for some paper to do some calculations…

But there are no details about velocity in the conjecture. So consider an extreme example—the walkway and the runner are moving at the same speed. Then, running with the walkway the runner goes very fast, but when he tries to come back, he runs on it like a gym-goer does on an exercise treadmill, and makes no progress. He not only loses, he never reaches the finish line. Thus the conjecture is false.

(Note that in the original puzzle the question is: who wins? If the answer HAS a correct answer, then you can use the extreme example given above to conclude that it is not the person running on the moving walkway.)

Example 2. There is a long history of mathematical cranks claiming to be able to trisect an angle. Recall the problem: you are given an angle with measure $\theta$. Is it always possible, using only a straightedge and compass, to construct an angle with measure $\theta/3$? It is a famous result of Pierre Wantzel that while it is sometimes possible, it is not possible in general (in particular, it is impossible to trisect a $60^\circ$ angle).

Here is a favorite “trisection method” given by the mathematical cranks. Suppose you are given an angle $\angle ABC$. Draw a circle with center $B$ and radius $AB$. We may as well assume that $C$ is on this circle. Draw the chord $AC$. Trisect this chord; that is, find a point $D$ on $AC$ such that $AD=AC/3$ (it is well known that it is possible to trisect a line segment using the Euclidean tools). Then $\angle ABD=\angle ABC/3$.

Conjecture: this is a valid method of angle trisection.

For small angles, this technique looks convincing (see below).

But it must work for all angles. Don’t dust off your copy of Elements and start looking for relevant propositions, look for an extreme example! For example, suppose $\angle ABC\approx 180^\circ$. Clearly, as we see below, this technique does not trisect such an angle. Thus the technique fails.

Example 3. My last example is the famous Monty Hall problem. I’m sure this problem is well known to many of the readers of this blog, but here’s the setup. Monty Hall (a game show host) presents 3 closed doors to a contestant. He promises that behind one door is a new car and behind the other two are goats (obviously, the contestant wants to win the car). The contestant picks a door. Monty says that he will open one of the two remaining doors to reveal a goat (which he does). Then he asks the contestant if she wants to switch doors.

Conjecture: there is no advantage to switching. (Your rationale: at first your chance of winning was 1/3. But now there are two doors, one hiding a car and one hiding a goat, so it is a 50/50 shot either way.)

Of course this conjecture is FALSE. Here’s an extreme example to illustrate this point. Suppose there are 1000 doors hiding 1 car and 999 goats. You pick one door. There’s a 99.9% chance that the car is behind one of the other doors. Now Monty (who knows what is behind each of the doors) opens up 998 of the remaining doors. There are two closed doors—your door and one other. Using the same rationale as above, your chance of winning is now 50%, right? No! I hope it is clear that you want to switch!

(By the way, I read this explanation in The Drunkard’s Walk by Leonard Mlodinow.)

Posted by: Dave Richeson | May 31, 2011

## Hankel on Diophantus

Diophantus of Alexandria was one of the last (c. 250 AD) great mathematicians of the Hellenistic period. He is often called the “father of algebra.” An entire branch of mathematics is named for him. It was in the margin of his book Arithmetica that Fermat penned his famous note.

Today, while looking up some information on Diophantus, I came across this wonderfully descriptive quote by Hermann Hankel (1874) on Diophantus and his mathematics (the English translation is by Heath).

Of more general comprehensive methods there is in our author no trace discoverable: every question requires a quite special method, which often will not serve even for the most closely allied problems. It is on that account difficult for a modern mathematician even after studying 100 Diophantine solutions to solve the 101st problem; and if we have made the attempt, and after some vain endeavors read Diophantus’ own solution we shall be astonished to see how suddenly he leaves the broad high-road, dashes into a side-path and with a quick turn reaches the goal with reaching which we should not be content; we expect to have to climb a toilsome path, but to be rewarded at the end by an extensive view; instead of which our guide leads by narrow, strange, but smooth ways to a small eminence; he has finished! He lacks the calm and concentrated energy for a deep plunge into a single important problem; and in this way the reader also hurries with inward unrest from problem to problem as in a game of riddles, without being able to enjoy the individual one. Diophantus dazzles more than he delights. He is in a wonderful measure shrewd, clever, quick-sighted, indefatigable, but does not penetrate thoroughly or deeply into the root of the matter. As his problems seem framed in obedience to no obvious scientific necessity, but often only for the sake of the solution, the solution itself also lacks completeness and deeper signification. He is a brilliant performer in the art of indeterminate analysis invented by him, but the science has nevertheless been indebted, at least directly, to his brilliant genius for few methods, because he was deficient in the speculative thought which sees in the True more than the Correct. That is the general impression which I have derived from a thorough and repeated study of Diophantus’ arithmetic.

Posted by: Dave Richeson | May 11, 2011

## What shape are the golden arches?

Every day for lunch I eat salad (made with vegetables from our local farmers’ market or from our college’s organic farm) and homemade yogurt and granola. The only time I ever eat fast food is on long car trips. So why, I ask you, did the question “What shape are the golden arches?” pop into my head?

I have no idea. But once it did, I just had to investigate. A quick internet search was inconclusive. Commenters on discussion forums assert that they are a pair of parabolas or a pair of catenary curves. But the credibility of the sources is questionable. So I thought I’d see what I could determine using Geogebra.

It turns out that the arches are definitely not parabolas (I didn’t think they were). The catenary is a good fit, but it still isn’t quite perfect. The best fit is an ellipse (or part of an ellipse)! Check out the applet that I made, and see for yourself.

Posted by: Dave Richeson | May 4, 2011

## Auden: minus times minus equals plus, the reason for this we need not discuss

I stumbled upon this quote by W. H. Auden (from A Certain World: A Commonplace Book, 1970).

Of course, the natural sciences are just as “humane” as letters. There are, however, two languages, the spoken verbal language of literature, and the written sign language of mathematics, which is the language of science. This puts the scientist at a great advantage, for, since like all of us, he has learned to read and write, he can understand a poem or a novel, whereas there are very few men of letters who can understand a scientific paper once they come to the mathematical parts.

When I was a boy, we were taught the literary languages, like Latin and Greek, extremely well, but mathematics atrociously badly. Beginning with the multiplication table, we learned a series of operations by rote which, if remembered correctly, gave the “right” answer, but about any basic principles, like the concept of number, we were told nothing. Typical of the teaching methods then in vogue is this mnemonic which I had to learn.

Minus times Minus equals Plus:
The reason for this we need not discuss.

Posted by: Dave Richeson | April 27, 2011

## A pyramidologist’s value for pi

Recently I came across two theories about the design of Great Pyramid of Giza.

• If we construct a circle with the altitude of the pyramid as its radius, then the circumference of the circle is equal to the perimeter of the base of the pyramid. Said another way, if we build a hemisphere with the same height as the pyramid, then the equator has the same length as the perimeter of the pyramid.
• Each face of the pyramid has the same area as the square of the altitude of the pyramid.

Apparently these are favorite mathematical facts (especially the first one) for pyramidologists who look for mathematical relations in the measurement of the pyramids that help justify their cultish belief in the mystical power of the pyramids.

Of course we should separate the mathematical properties of the pyramids that may have been legitimate design decisions by the architects, from the crazy meanings that are often attached to them. I have no training in the history of Egyptian mathematics or in the history of the pyramids, so I can’t really assess their likelihood of being true (my guess: the first one is an amazing coincidence, the second is more likely to be intentional). However, one interesting fact is that if the first one was intentional, then they were using the value 3.143 for pi, which is significantly better than the value found in the Egyptian Rhind papyrus (3.16), which was written 600-800 years after the construction of the pyramids.

Just for fun, here are a few mathematical exercises:

1. Check these facts using the actual measurements of the pyramid (you can take altitude to be 146.6 meters and the length of one side of the pyramid to be 230.4 meters). They are indeed remarkably close!

2. Assume that the first one is true. Use the measurements given in (1) to show that the architects were using the value 3.143 for pi.

3. Assume that we have a pyramid for which both of these facts are true. Show that this would imply that

$\pi=2\sqrt{2\sqrt{5}-2}=3.1446\ldots$

Has anyone seen this approximation for pi before? I didn’t find it after performing a quick search of the internet. [Update, another way of writing this approximation is $4\sqrt{1/\varphi}$, where $\varphi$ is the golden ratio.]

[The photograph of the Pyramid of Giza is from Wikipedia.]

Posted by: Dave Richeson | April 26, 2011

## What do you want on your tombstone?

I’ve come across a few mathematicians or scientists who have been so proud of their scholarly achievements that they’ve asked for them to be put on their headstone when they die (or have had their achievements placed on their headstones by someone else). Please let me know if you know of others. [Update: thanks to folks on Twitter I learned of a few more. I’ve added them to the list.]

Archimedes—sphere/cylinder

Archimedes’s mathematical accomplishments are numerous. But he requested that his tombstone display a sphere inscribed in a cylinder with the ratio 3:2. He was proud of his discovery that the ratio of the volume of the cylinder to the sphere and the ratio of the surface area of the cylinder (including the top and bottom) to the sphere are both 3:2. (He not only discovered the volume and surface area formulas for the sphere, but also showed that the same constant, pi, appeared in these formulas and the formulas for the circle.)

The Greeks knew how to inscribe in a circle, using only a straightedge and compass, an equilateral triangle (3-gon), a square (4-gon), a regular pentagon (5-gon), a regular pentadecagon (15-gon), and any $(2^k)$-gon, $(2^k\cdot 3)$-gon, $(2^k\cdot 5)$-gon, and $(2^k\cdot 15)$-gon. That’s it. Then, 2000 years later, the 18 year old Gauss showed that it was possible to do the same with a 17-gon (and later certain other regular polygons). He was so proud of this discovery that he decided to pursue a career in mathematics.  He also asked that a 17-gon be inscribed on his tombstone. His wish was not honored, but it was later inscribed on a memorial in his honor in his home town of Brunswick. (If anyone knows where I can find a photo of it, please link to it in the comments.) [Update:] a 17-pointed star was inscribed on a memorial erected in his honor in his home town of Brunswick. In the photo below you can (barely) see the star under Gauss’s right foot. Here is a closeup.

Ludolph Van Ceulen—the first 35 digits of π

Ludolph Van Ceulen spent most of his life computing the first 35 digits of pi. He used Archimedes’ technique and polygons of $2^{62}$ sides! His tombstone contained his upper and lower bounds for pi. The original tombstone disappeared some time around 1800; a replica is shown below.

Bernoulli was so enamored with the logarithmic spiral that he wanted it engraved on his headstone. However, the engraver accidentally carved an Archimedean spiral.

The tombstone of physicist Ludwig Boltzmann contains his entropy formula $S=k \log W$.

Paul Dirac—the Dirac equation

This burial plaque can be found in Westminster Abbey, not far from Isaac Newton’s resting place. It contains Dirac’s relativistic electron equation, $i\gamma\cdot\partial\psi=m\psi$.

Ferdinand von Lindemann—circle, square, pi

In 1882 Lindemann proved that pi is a transcendental number. This put to rest the 2000+ year old question of whether it is possible to “square the circle“—i.e., construct, using only a compass and straightedge, a square having the same area as a given circle. (He proved that it was impossible.) His grave has a circle superimposed on a square, surrounding the symbol pi.

[Update: Here’s a memorial for Lindemann that also has the circle/square/pi in it. It is in the city of his birth, Hanover. Thanks to Pat Ballew for the image!]

Henry Perigal—proof of the Pythagorean theorem

Henry Perigal was an amateur mathematician who discovered the “dissection proof” of the Pythagorean theorem. The proof can now by found carved into his headstone.

Alfred Clebschhis grave says “Mathematiker” on it

Posted by: Dave Richeson | April 15, 2011

## Happy birthday Uncle Leonhard, I hope you enjoy your new home

On today, Leonhard Euler’s 304th birthday, we find that the Euler Archive has a new home!

This labor of love, created and run by Dominic Klyve, Lee Stemkoski, and Erik Tou, houses thousands of pages of Euler’s original works as well as a growing number of translations of Euler’s works.

The site had been located at Dartmouth College, where the trio attended graduate school. But it has now move to the servers of the MAA: http://eulerarchive.maa.org/

Check it out, and if you are interested and able, translate one of Euler’s articles (that’s what I did…with help).

(By the way, to celebrate, the MAA is selling their five books on Euler at the discounted price of \$20.)

Posted by: Dave Richeson | April 14, 2011

## Math books for young children

I have a child in first grade and another who will be in elementary school in a couple years. So I’m on the lookout for good children’s books about mathematics. Below is a collection of books that I’ve read or that have been recommended to me. (I got some of these suggestions from people on Twitter.) I’d really appreciate it if you would add your own suggestions in the comments (if you want to give age-ranges, descriptions, or links, that would be great too). I’ll add more to the list as I find them.

Again, I’d say that the primary focus would be books for kids ages 5-12. Thanks!

Posted by: Dave Richeson | March 22, 2011

## Albrecht Dürer’s ruler and compass constructions

Albrecht Dürer (1471–1528) is a famous Renaissance artist. Mathematicians probably know him best for his work Melencolia I which contains a magic square, a mysterious polyhedron, a compass, etc.

Today I was reading his book Underweysung der Messung mit dem Zirckel und Richtscheyt (The Painter’s Manual: A manual of measurement of lines, areas, and solids by means of compass and ruler). It was published in 1525 and was reprinted posthumously in 1538 with additional material. Our library has a nice English translation of the first edition by Walter L. Strauss (1977). The book has scans of the old German on the left and the English translations on the right. (You can see scans of the original 1538 book online—see pp. 110–119 for this material.)

Dürer wrote this book as a technical manual for artists, craftsmen, etc. For example, it gave elementary instructions for how to draw regular polygons with a ruler and compass. In Dürer’s time the old works of the Greeks were just becoming available again. Dürer apparently had access to them. In fact, the book begins, “The most sagacious of men, Euclid, has assembled the foundation of geometry. Those who understand him well can dispense with what follows here.” This is an odd beginning because, although he gives some Euclidean constructions, many are new; moreover, he must have known that the vast majority of the readers knew no Euclid.

Because this is a technical manual, Dürer’s emphasis is on easy-to-draw constructions that look good—in particular, some are just good looking approximations. Many of them were known to craftsmen of the day (techniques passed down through the generations) or appeared in print earlier, but some may have been discovered by Dürer.

I was led to the book because I wanted to see his construction of the regular pentagon. He gives two constructions. One is a classical Greek construction, but it is the second that I wanted to see.

This construction has two notable features. One is that it is drawn using a rusty compass—that is, the compass is set to one opening for the entire construction. This was probably a great bonus to the artisan; I imagine that not having to continually adjust the compass made the construction fast and accurate. The second interesting fact is that it is only approximately a regular pentagon—but it is a very good approximation. By my calculations, the error in the height of the pentagon is less than 1%. The construction is shown below. You begin with the line segment labeled ${ab}$ and you set the compass to this radius. I’ll leave it as an exercise to the reader to reverse engineer the construction.

Dürer never says that this is an approximation.

I found what I was looking for. But then I found more. Dürer goes on to give ruler and compass constructions of regular polygons with sides numbering 3, 4, 5, 6, 7, 8, 9, 11, and 13. As you may know, some of these are impossible constructions (7, 9, 11, and 13). Hence Dürer’s constructions must be approximations.

The heptagon (7-gon) and the nonagon (9-gon) are excellent approximations. So I though I’d share them with you.

Durer’s heptagon is remarkably easy to construct. Begin with an equilateral triangle inscribed in a circle. Then half of the side of the triangle is nearly the same length as the side of the inscribed heptagon. So all we must do is bisect one side, and sweep an arc to obtain the first side of the heptagon. Then use this side to draw the rest.

The construction of the nonagon is a little more involved. Draw a circle. Then with the same opening of the compass draw three “fish-bladders” (as he calls them)—to do this you need the centers on the vertices of an inscribed equilateral triangle. Draw a radial segment inside one fish-bladder and divide it into thirds. Draw a perpendicular line at the 1/3 mark. It intersects the bladder in two points (${e}$ and ${f}$ in Dürer’s diagram). Draw a circle with the same center as the large circle, passing through ${e}$ and ${f}$. Then ${ef}$ is one side of an (approximate) nonagon inscribed in the smaller circle.

As with the pentagon, Dürer does not mention that the heptagon and the nonagon are approximations. However, he admits that the constructions of the 11-gon and the 13-gon (which I will omit) are “mechanical [approximate] and not demonstrative.”

As if that is not cool enough, Dürer tackles the famously impossible angle trisection and circle squaring problems.

To see his (approximate) angle trisection solution we begin with an arc of a circle and the corresponding chord. (He actually trisects the arc, but that is equivalent to trisecting the central angle.) He begins by trisecting the chord. The points in his diagram are, in order left-to-right, ${a}$, ${c}$, ${d}$, and ${b}$. Draw perpendicular lines from ${c}$ and ${d}$ to the arc, then swing arcs from these points (with centers ${a}$ and ${b}$) down to the chord. These new points are ${j}$ and ${k}$. Trisect the segments ${cj}$ and ${kd}$. Using the points closest to ${j}$ and ${k}$, sweep arcs back up to the original arc of the circle to obtain ${l}$ and ${m}$. Then arcs ${al}$, ${~lm}$, and ${mb}$ are approximately equal (he does not admit to this being an approximation).

Finally we turn to his circle squaring. It is very crude. He writes “The quadratura circui, which means squaring the circle so that both square and circle have the same surface area, has not been demonstrated by scholars. But it can be done approximately for minor applications or small areas in the following manner.” In the first edition of the book he uses an approximation of ${\pi\approx 3\frac{1}{8}}$, and in the second he uses ${\pi\approx 3\frac{1}{7}}$. He writes simply, “Draw a square and divide its diagonal into ten parts and then draw a circle with a diameter of eight of these parts.”

What a great find and an enjoyable read! By the way, I encourage you to try performing these constructions. I did so using Geogebra and was amazed by the resulting figures.