<s>[INST] Calculate sides of right triangle with hypotenuse and area or perimeter I'm trying to find if it is possible to find the lengths of the base and height of a right triangle with only the hypotenuse and the area (or the perimeter) of the triangle. I would have just figured that it was impossible, but I found an online calculator that could do it, but it didn't provide formulas. 
 [/INST] For hypotenuse $h$ and area $A$, let the legs be $x$ and $y$. Then $x^2+y^2=h^2$ and $xy=2A$. It follows that
$$(x+y)^2=x^2+y^2+2xy=h^2+4A$$
and 
$$(x-y)^2=x^2+y^2-2xy=h^2-4A.$$
Thus $x+y=\sqrt{h^2+4A}$ and $x-y=\pm\sqrt{h^2-4A}$ and now we can solve for $x$ and $y$.
For hypotenuse $h$ and perimeter $p$, we have $x^2+y^2=h^2$ and $x+y+h=p$. Thus $x+y=p-h$.
Note that
$$(x-y)^2=2(x^2+y^2)-(x+y)^2=2h^2-(p-h)^2.$$
Now we know $x-y$ and $x+y$, so as before we can find $x$ and $y$.
</s>