A triangle has sides $a, b, c$, and its area is $\frac{(a+b+c)(a+b-c)}{4}$. What is the measure of the largest angle of the triangle?
I. solution. Let the center of the inscribed circle of the triangle be $O$, and its radius be $r$. Then the area of the triangle is $r \frac{a+b+c}{2}$, and from the condition of the problem:

$$
r=\frac{a+b-c}{2}
$$

follows. If the vertices of the triangle are denoted by $A, B, C$ in the usual way, and the points of tangency of the inscribed circle on the sides are $D, E$, and $F$, then $C D=C E=\frac{a+b-c}{2}$. (A proof of this can be found, for example, in Kiss Gy.: What is Good to Know About Triangles, KöMaL, 2002/3 issue, pp. 130-139.)

![](https://cdn.mathpix.com/cropped/2024_05_02_bbe8ded23f565b726f87g-1.jpg?height=288&width=499&top_left_y=539&top_left_x=802)

The quadrilateral $O D C E$ is thus a rhombus, because each of its sides is $\frac{a+b-c}{2}$ long, and it has two right angles, because the tangent to the circle is perpendicular to the radius at the point of tangency. Therefore, $O D C E$ is a square, which means that the angle at $C$ in the triangle $A B C$ is a right angle.

This is also the largest angle of the triangle, so the sought angle is $90^{\circ}$.

II. solution. According to Heron's formula, the area of the triangle is:

$$
\frac{1}{4} \sqrt{(a+b+c)(a+b-c)(a-b+c)(b+c-a)}
$$

Thus, in our case,

$$
\sqrt{(a+b+c)(a+b-c)(a-b+c)(b+c-a)}=(a+b+c)(a+b-c)
$$

From this, squaring and dividing by $(a+b+c)(a+b-c)$, we get that

$$
(a-b+c)(b+c-a)=(a+b+c)(a+b-c)
$$

Rearranging this, we get $c^{2}-(a-b)^{2}=(a+b)^{2}-c^{2}$, and solving for $c^{2}$, we find that $c^{2}=a^{2}+b^{2}$.

According to the converse of the Pythagorean theorem, this means that the angle opposite the side $c$ of the triangle is a right angle. It is obvious that this right angle is also the largest angle of the triangle.