Right triangle with its perimeter and median and altitude A right triangle $ABC$ is given with $\measuredangle ACB=90^\circ$. If the perimeter of the triangle is $72$ and the difference between the lengths of the median and the altitude to the hypotenuse is $7$, find the area.

Let $CD=x$ $(x>0)$, then $CM=x+7$. By the Pythagorean theorem, it follows that $$MD=\sqrt{(x+7)^2-x^2}=\sqrt{14x+49}.$$
For the perimeter as $AM=MB=CM=x+7$ we have $$P_{ABC}=2x+14+a+b=72\Rightarrow a+b=58-2x,$$ where $BC=a,AC=b$.
We have to find $S_{ABC}=\dfrac{2(x+7)x}{2}=x(x+7)=x^2+7x$. I can't see how to do that.
On the other hand, if the sides of the triangle are $a,b$ and $c$, then $$\begin{cases}a+b+c=72\\\dfrac{c}{2}-\dfrac{ab}{c}=7\\a^2+b^2=c^2\end{cases}$$ and we only need to solve it for $\dfrac{ab}{2}$. I cannot do that as well. Thanks!
 A: For the last three equations, there is a way to solve them.
$$a+b=72-c$$
$$a^2+2ab+b^2=5184-144c+c^2$$
$$2ab=5184-144c$$
Now, we know that:
$$\frac{c}{2}-\frac{ab}{c}=7$$
$$2ab=c^2-14c$$
$$c^2-14c=5184-144c$$
And that yields $c=32$ and $c=-162$, and obviously we'll use the positive value. Since we now have $c$, its very easy to calculate the rest
A: Here is a solution which, beyond giving the area, establishes that there is a unique triangle having the given properties (indeed one could have a same area for different triangles).
Let $A'$ be the midpoint of $BC$, and $B'$ the midpoint of $AC$.
Here are the unknowns we are going to work with:
$$a'=:a/2=A'C, \ b':=b/2=B'C, \ c'=c/2=MA=MB=MC$$
with height $h$.
One has the system of 4 equations with 4 unknowns:
$$\begin{cases}
a'^2+b'^2&=&c'^2&(a)\\
a'+b'+c'&=&36&(b)\\
c'-h&=&7&(c)\\
hc'&=&2a'b'&(d)
\end{cases}\tag{1}$$
Please note that equation (1)(d) is issued from the classical relationship $hc=ab$ in a right triangle.
A comment about formula (1)(a): one can have an immediate "grasp" on it, when reasoning in rectangle $A'CB'M$.
System (1) has a single solution (if we assume arbitrarily that $a' \le b'$ ; indeed, the rôles of $a'$ and $b'$ can be interchanged):
$$a'= 10 - 2 \sqrt{7}, \ \  b'= 10 + 2 \sqrt{7}, \ \ c'=16, \ \ h=9$$
As a consequence, the area of the triangle is :
$$S=\frac12 ab = 2a'b'=144$$

Explanation about the resolution of system (1):
From (c), one extracts $h=c'-7$ ; this variable is then eliminated by plugging its value in (d) which becomes $2a'b'=c'(c'-7)$
Now, system (1) implies:
$$\begin{cases}
a'^2+b'^2&=&c'^2&(a_1)\\
a'^2+b'^2+2a'b'&=&(36-c')^2&(b_1)\\
2a'b'&=&c'(c'-7)&(c_1)
\end{cases}\tag{2}$$
It remains to subtract $(b_1)-(a_1)$ in order to get $2a'b'=(36-c')^2-c'^2$. Equating with equation $(c_1)$ gives a quadratic equation in $c'$ whose unique positive solution is $16$. Once we have $c'$, we get at once the area, and also the explicit values of $a',b'$ (also solutions of a qudratic equation) and $h$.
A: Let $a = BC$, $b = AC$, $c = AB$ and $S$ the area of the triangle $ABC$ then $S = \dfrac{a b}{2}$.

*

* We have $a + b + c = 72$ then $a + b = 72 - c$ so :
$$(72 - c)^2 = (a + b)^2 = a^2 + b^2 + 2 a b = c^2 + 4 S$$
We deduce that :
$$4 S = (72 - c)^2 - c^2 = 5184 - 144 c \quad (1)$$

* We have :
$$S = \dfrac{1}{2} CD \times c = \dfrac{1}{2} (CM - 7) \times c$$
then :
$$4 S = (2 CM - 14) \times c = (c - 14) \times c = c^2 - 14 c \quad (2)$$

From $(1)$ and $(2)$ :
$$c^2 - 14 c = 5184 - 144 c$$
then :
$$c^2 + 130 c - 5184 = 0$$
The discriminant is $\Delta = 37636 = 194^2$ then :
$$c = \dfrac{-130 + 194}{2} = 32 \text{ or } c = \dfrac{-130 - 194}{2} = -162$$
We deduce that $c = 32$ because $c \geq 0$ then :
$$S = \dfrac{1}{4}(5184 - 144 c) = 144$$
