Maximum area of a square in a triangle
I want to calculate the area of the largest square which can be inscribed in a triangle of sides $a, b, c$ . The "square" which I will refer to, from now on, has all its four vertices on the sides of the triangle, and of course is completely inscribed within the triangle, and by "largest square", with the maximum area of such squares.
I did some research. I found that in the case of right triangles, there seemed to be only two kinds of squares being formed. One with a side of $\frac{ab}{a+b}$ and the other of $\frac{abc}{c^2 + ab}$, $c$ being the hypotenuse.
After some time, I realized that there was a common formula for all triangles. And that is:
$$side = \frac{ch}{c+h}$$ or $$\frac{1}{side} = \frac{1}{c} + \frac{1}{h}$$ where, $h$ is height on base $c$, or $$h = \frac{2\sqrt{(s(s-a)(s-b)(s-c))}}{c}$$
I achieved the above results using similar triangles, and have added a figure, to make the point clear. But that is all, I can prove. I tested for many triangles, and found that the smaller side always yields the larger square, but I am not able to prove it. For example, I can say that the largest square of a $4,7,10$ triangle, has area of approximately $\fraq{16}{3}$. I also want to make another conjecture (with an intuitive proof) that any triangle will give at most three squares.
So I want to ask you, are my calculations, proofs ... correct? Have I got them right? And those predictions? Are they right, and if so, proofs? Conclusively, do we have a sure-fire formula to get the area of the largest square?
There is a famous book of Polya ("How to solve it"), in which the problem of inscribing a square in a triangle is treated in a really interesting way, I strongly suggest the reading.
The inscribed square is clearly unique once we choose the triangle side where two vertices of the square lie. If we suppose that the square has two vertices on $AB$ and side $l$, then:
$$l+l\cot A + l\cot B = c,$$
so:
$$ l = \frac{c}{1+\cot A+\cot B} = \frac{2R \sin A \sin B \sin C}{\sin C + \sin A\sin B}=\frac{abc}{2Rc+ab},$$
where $R$ is the circumradius of $ABC$. In order to maximize $l$, you only need to minimize $2Rc+ab = 2R\left(c+\frac{2\Delta}{c}\right)$, or "land" the square on the side whose length is as close as possible to $\sqrt{2\Delta}$, where $\Delta$ is the area of $ABC$.
Say $x$ be the side of the largest square within a triangle with sides $a,b,c$. Say one side of the square is on the side $BC$. So we get a square and 3 triangles. Equating the area of the bigger triangle with the sum of area of the 3 small triangle and the square we get:
$$\frac12 ch = x^2\text{[area of the square]}+ \frac12 x(c - x) \text{[area of two small base triangle]} + \frac12 x( h - x)\text{[area of the upper triangle]}$$
Upon solving:
$$x= \frac{ch}{(c+h)}$$