For which $(n,m,l)$ does $L_n^2+L_m^2=L_l^2$ hold?

Let $L_n = 2 \sin(\frac{\pi}{n})$ be the length of a side of the regular $n$-gon inscribed in a circle.

For which $(n,m,l)$ does $$L_n^2+L_m^2=L_l^2$$ hold?

I found by computer search that (3,6,2), (4,4,2), (4,6,3), (6,6,4), (6,10,5) do, and I think these are the complete set of solutions but how could I prove it?

My idea was to consider solving $\sin(\frac{\pi}{n} r_1)^2 + \sin(\frac{\pi}{n} r_2)^2 = \sin(\frac{\pi}{n} r_3)^2$ for a fixed $n$ with each $r\mid n$. Then $n = 2 \cdot 3 \cdot 5$ works for all the knows triples so if we could show for example that if $7\mid n$ the the $L_n$ algebraic integers can't cancel out because of some property of cubic irrationals?

-
An initial consideration is that your equation is equivalent to $$\cos\frac{2\pi}{n}+\cos\frac{2\pi}{m}-\cos\frac{2\pi}{l}=1,$$ and that $$\cos\frac{2\pi}{n}$$ is an algebraic number over $\mathbb{Q}$ with degree $\frac{\phi(n)}{2}$. – Jack D'Aurizio Nov 12 '12 at 14:18
Should a "trigonometry" tag be added here? – Michael Hardy Nov 12 '12 at 15:08
Moreover, if $m,n,l$ are big enogh, $\frac{1}{m^2}+\frac{1}{n^2}$ must be quite close so $\frac{1}{l^2}$. Unfortunately, this fact does not imply anything about $\phi(m),\phi(n),\phi(l)$. – Jack D'Aurizio Nov 12 '12 at 15:24
A possible approach is to grasp some information on the minimal polynomial $p_{(m,n)}(x)$ of $\cos\frac{2\pi}{n}+\cos\frac{2\pi}{m}$, then to compare it with the minimal polynomial of $1+\cos\frac{2\pi}{l}$ and say, for example, that they cannot be equal since the coefficient of a certain monomial is different. – Jack D'Aurizio Nov 12 '12 at 15:42

Here is a way to bound $n,m,l$ from which a computer can find the rest of the solutions then.

As Jack D'Aurizio points out it is equivalent to showing $\cos \frac{2\pi}{n} + \cos \frac{2\pi}{n} - \cos \frac{2\pi}{l} = 1$. Let $L = lmn$ and denote $\zeta_k = e^{2\pi i/k}$.

Consider the field $\mathbb{Q}[\zeta_L]$. Let $S$ denote the set of residues modulo $L$ that are relatively prime with $L$ and then denote $f_k$ the automorphism that sends $\zeta_L$ to $\zeta_L^k$ (if it exists. Then: $$\sum_{k \in S} f_k(LHS) = \sum_{k \in S} f_k(RHS)$$ Now, by using $2 \cos \frac{2\pi}{n} = \zeta_L^{ml} + \zeta_L^{-ml}$ one can show $$\sum_{k \in S} f_k(\cos \frac{2\pi}{n}) = \frac{\phi(lmn)}{\phi(n)}\mu(n)$$

Thus we require that $$\frac{\mu(n)}{\phi(n)} + \frac{\mu(m)}{\phi(m)} - \frac{\mu(l)}{\phi(l)} = 1$$

Which bounds $m,n,l$ quite nicely and a computer can finish from here.

If $n=2$ then note that $$\frac{\mu(m)}{\phi(m)} - \frac{\mu(l)}{\phi(l)} = 2$$ which is easy to check has no solutions because note that $\phi(m) = \phi(l) = 1$ is forced. Similarly $m=2$ has no solutions. Now, if $l=2$ then use the original equation of $L_n^2 + L_m^2 = L_l^2$ to deduce that $\frac{1}{m} + \frac{1}{n} = 1$ from which it is easy to find all solutions.

Now take $l,m,n > 2$. Note that then $$\frac{\mu(n)}{\phi(n)} + \frac{\mu(m)}{\phi(m)} \le 1$$

Thus for a solution to occur we need either $\mu(l) = 0$ or $\mu(l) = -1$. The $\mu(l) = 0$ case its easy to find $(m,n) = (6,6)$ is the only solution so let's take $\mu(l) = -1$.

We can assume now that $\mu(n) = \mu(m) = 1$ because otherwise by very similar stategies to above we can find all solutions otherwise. But then note that we have $$\frac{1}{a} + \frac{1}{b} + \frac{1}{c} = 2$$

where $a = \phi(n)/2$, etc. This only has the solution where $a,b,c$ are a permutation of $(1,2,2)$ so from here we have bounded all the variables and we are done.

-
So given $l$ we can bound $m,n$, but can we find a bound for $l$? – sperners lemma Nov 15 '12 at 14:50
Sorry, I should have elaborated on how to bound $m,n,l$. I'll edit this answer on how to give explicit bounds on $m,n,l$. – dinoboy Nov 15 '12 at 19:48
I think I see it! – sperners lemma Nov 15 '12 at 19:55
It appears I made a typo, I meant the equation bounds $m,n,l$. I've added in more in-depth details as to how to bound the variables. In fact, I show $\phi(n),\phi(m), \phi(l) \le 4$ and find a lot of solutions. – dinoboy Nov 15 '12 at 20:06