A few episodes of Wrong But Useful ago, Dave posed the problem:

A regular unit heptagon 1 has two different diagonal lengths, a and b. Show that a+b=ab

Heptagon puzzle setup

Unusually, I didn’t blog a solution. Sorry about that.

A hat-rack trick

I’ve come up with two approaches, but wanted to showcase one by [twit handle=’notonlyahatrack’] (who is Will in real life) first. He spotted that you can make a cyclic quadrilateral from any four of the corners, and that you can pick the corners so that the sides are (in order) 1, 1, a and b, as shown here:

Will's solution

He then uses a circle theorem I didn’t know, but probably should have: Ptolemy’s Theorem for cyclic quadrilaterals, which states:

The product of the diagonals of a cyclic quadrilateral is equal to the sum of the products of opposite sides

In the picture, that means |CF||BD|=|CD||BF|+|BC||BF|, or ab=a+b, as required.

Very elegant! While it’s perfectly legit, I didn’t know Ptolemy’s theorem, and had to resort to other methods.

Similar triangles

My first stab looked like this:

similar triangles

Looking back, it wasn’t entirely obvious that triangles FED and FHD were congruent (although they are) - this is because the angle FD^E is the same as angle FG^D, because FC and ED are parallel.

Cosine rule

There’s another reason the angles are the same, too: it comes down to another circle theorem (the one about the angles at the edge being half the angles in the middle), from which you can prove that the angles between adjacent diagonals and/or sides from any point on a regular shape are the same. That means their cosines are all the same, too.

Cosines

There are three distinct triangles here:

  • FDE, from which you can say the cosine of the angle is a2;
  • FDC, from which you can say the cosine of the angle is a2+b212ab
  • FCB, which tells you the cosine is 2b212b2

Working from a2=a2+b212ab, we get a2b=a2+b21. That rearranges to 1=a2+b2a2b.

Working from 2b212b2=a2, we get 2b21=ab2, or 1=b2(2a)

Eliminating the 1, we end up with b2(2a)=a2+b2a2b. Take away a b^2 from either side:

b2(1a)=a2(1b), which expands to b2b2a=a2a2b, or b2a2=b2aa2b; some nifty factorising:

(ba)(b+a)=ab(ba) - and since ba, we can divide by ba to get:

b+a=ab as required.

There’s probably a way through the algebra that’s a bit quicker, but I’m quite pleased with that one; the Mathematical Ninja would hate it.

Footnotes:

1. a seven-sided shape where all the angles are the same, and all the sides are 1 unit long