Problem 3. Find the maximum possible value of the inradius of a triangle with vertices in the interior or on the boundary of a unit square.
3. It it easy to see that if a triangle contains another triangle, then its inradius is greater than the inradius of the second one. So we may consider triangles with vertices on the boundary of the square. Moreover, we may assume that at least one vertex of the triangles is a vertex of the square and the other two vertices belong to the sides of the square containing no the first vertex. So we shall consider $\triangle O A B$ such that $O=(0,0), A=(a, 1)$ и $B=(1, b)$, $0 \leq a, b \leq 1$.

Consider also $\triangle O C D$, where $C=(a+b, 1)$ and $D=(1,0)$. Denote by $S$ and $P$ the area and perimeter of $\triangle O A B$, respectively. Set $x=O A=\sqrt{1+a^{2}}, y=$ $A B=\sqrt{(1-a)^{2}+(1-b)^{2}}, z=O B=\sqrt{1+b^{2}}, u=O C=\sqrt{1+(a+b)^{2}}$ and $v=C D=\sqrt{1+(1-a-b)^{2}}$. Note that $O D=1, u \geq z \geq 1, x \geq 1$ and $v \geq 1$.

Comparing the perimeters of $\triangle O A B$ and $\triangle O C D$ gives

$$
\begin{aligned}
(u+v+1)-(x+y+z) & =\frac{u^{2}-x^{2}}{u+x}+\frac{v^{2}-y^{2}}{v+y}+\frac{1-z^{2}}{1+z} \\
& =\frac{2 a b+b^{2}}{u+x}+\frac{2 a b}{v+y}-\frac{b^{2}}{1+z} \\
& \leq \frac{2 a b+b^{2}}{1+z}+\frac{2 a b}{v+y}-\frac{b^{2}}{1+z} \\
& =2 a b\left(\frac{1}{v+y}+\frac{1}{1+z}\right) \leq 3 a b \leq(u+v+1) a b
\end{aligned}
$$

Hence

$$
(u+v+1)(1-a b) \leq x+y+z \Longleftrightarrow \frac{1}{u+v+1} \geq \frac{1-a b}{x+y+z}=\frac{2 S}{P}=r
$$

On the other hand,

$$
u+v+1=\sqrt{1+(a+b)^{2}}+\sqrt{1+(1-a-b)^{2}}+1 \geq \min _{x \geq 1} F(x)
$$

where $F(x)=\sqrt{1+x^{2}}+\sqrt{1+(1-x)^{2}}+1$. Since $\min _{x \geq 1} F(x)=\sqrt{5}+1$, we get that $r \leq \frac{1}{\sqrt{5}+1}=\frac{\sqrt{5}-1}{4}$.