<s>[INST] The triangle that has the longest possible smallest side of a triangle inscribed in a unit square is equilateral The points $A$, $B$ and $C$ lie on the sides of a square of side $1$ cm and no two points lie on the same side. Show that the length of at least one side of the triangle $ABC$ must be less than or equal to $(√6−√2)$ cm.
The given result can easily be derived by asserting that (1) the triangle is equilateral and (2) touches one of the corners.

This is a perfectly intuitive result, but how can I prove (1) and (2) rigorously?
 [/INST] Here is an entirely analytical attempt. Let $(x_1,0), (1,y),(x_2,1)$ be the vertices of the triangle inscribed in the unit square $[0,1]^2$. Since only one of them can be in a vertex of the square, we will allow only $x_1 \in [0,1\rangle$ and $x_2,y \in \langle 0,1\rangle$. Also we can assume $x_1 \le x_2$. The length of the smallest side is then given by the function $f : \{(x_1,x_2,y) \in [0,1\rangle \times \langle 0,1\rangle^2 : x_1\le x_2\}\to \Bbb{R}$ defined as
$$f(x_1,x_2,y) = \min\left\{\sqrt{(x_2-x_1)^2+1},\sqrt{(1-x_1)^2+y^2},\sqrt{(1-x_2)^2+(1-y)^2}\right\}.$$
Let $(x_1,x_2,y)$ be the triple which maximizes $f$. Assume that this triangle is not equilateral. Then we can offset the vertices a bit so that the same side remains the smallest but it is a bit larger than before. For example if
$$\sqrt{(x_2-x_1)^2+1} < \sqrt{(1-x_1)^2+y^2}, \sqrt{(1-x_2)^2+(1-y)^2}$$
then by continuity there exists $\varepsilon > 0$ such that
$$\sqrt{((x_2+\varepsilon)-x_1)^2+1} < \sqrt{(1-x_1)^2+y^2}, \sqrt{(1-(x_2+\varepsilon))^2+(1-y)^2}$$
and hence $$f(x_1,x_2+\varepsilon,y) =\sqrt{((x_2+\varepsilon)-x_1)^2+1} > \sqrt{(x_2-x_1)^2+1} = f(x_1,x_2,y)$$
which contradicts maximality of $(x_1,x_2,y)$. Similarly in the other cases.
We conclude that the triangle is equilateral, so in particular $$f(x_1,x_2,y) = \sqrt{(x_2-x_1)^2+1}=\sqrt{(1-x_1)^2+y^2}=\sqrt{(1-x_2)^2+(1-y)^2}.$$
The term $\sqrt{(1-x_1)^2+y^2}$ is maximized when $x_1 = 0$ (since $y=1$ is not allowed). Therefore
$$f(x_1,x_2,y) = \sqrt{x_2^2+1}=\sqrt{1+y^2}=\sqrt{(1-x_2)^2+(1-y)^2}.$$
and hence $y=x_2$ and $1+y^2=2(y-1)^2$. This yields $$x_1=0,\quad x_2=y=2-\sqrt{3}$$
and $f(x_1,x_2,y) = \sqrt{1+y^2} = \sqrt{6}-\sqrt{2}$.
</s>