<s>[INST] Circles question on proof It is given that a, b, and c are the sides of a triangle and c is the hypotenuse. There is an incircle inside the triangle with radius = r.
We need to prove that $r=\dfrac{a+b-c}{2}$
Image: 
My attempt
Area of circle = $\dfrac{ab}{2} = \dfrac{ar+br+cr}{2}$ (area of individual triangles)
$r=\dfrac{ba}{a+b+c}$
but we have to prove that $r=\dfrac{a+b-c}{2}$ . How can that be shown? Thank you very much
 [/INST] Continuing from where you had left, $$r=\frac{ab}{a+b+c}=\frac{ab(a+b-c)}{(a+b)^2-c^2}$$
$$\rightarrow r=\frac{ab(a+b-c)}{(a^2+b^2-c^2)+2ab}=\frac{ab(a+b-c)}{2ab}=\frac{a+b-c}{2}$$
</s>