Right Triangles and Lagrange Multipliers

930 Views Asked by At

Suppose that you have a right triangle $a^2+b^2=c^2$ with integral sides. Given a perimeter $p=a+b+c$, how can you use Lagrange multipliers to determine the maximum length of $a$?

1

There are 1 best solutions below

0
On

The continuous case has been dealt with by Ted Shifrin in the comments: the maximum is attained at the boundary $a=c=p/2$, $b=0$. Since the perimeter $p$ of a Pythagorean triangle must be even, this also solves the integer problem if we allow degenerate triangles.

Suppose we don't. I'll borrow from the senior thesis Perimeters of primitive Pythagorean triangles by L. Witcosky. Since $p$ is even, we can work with $p/2$, the semiperimeter. Suppose it factors as $p/2=uv$ with $u<v<2u$. Then $$a=2uv-2u^2,\quad b=2uv-v^2,\quad c=2u^2-2uv+v^2 \tag1$$ is a Pythagorean triangle with desired perimeter. To maximize $\max(a,b)$ amounts to minimizing $\min(\sqrt{2}u,v)$: that is, look for the smallest possible $u$, then the smallest possible $v$, and compare the results.