If the inradius in a right angled triangle with integer sides is $r$. Prove that
Q1) If $r= 4$, the greatest perimeter (in units) is $90$
Q2) If $r=5$, the greatest area (in sq. units ) is $330$
I tried to solve the question by
$=(s-a)\tan(A/2)$
where, $s$=semi perimeter, $a$ and $A$ are side length and angle corresponding to vertex $A$.
So I assumed vertex $A$ to be right angled and get $$r=(s-a)$$ But to maximise $s$ we need one more equation in $r$ and $a$.
Let the legs of the right-angled triangle be $a,b$, and the hypotenuse be $c$. For question $1$, we known that $r = \frac{1}{2}(a+b-c)\Rightarrow 8 = a+b-c$.
Now use the fact that any Pythagorean triple can be uniquely written in the form:
$$a = k(m^2 -n^2), \ b = k(2mn), \ c = k(m^2+n^2)$$
where $m,n,k$ are positive integers, $m > n$, $m$ and $n$ are coprime and are not both odd (Wikipedia).
Then $a+b-c = 8$ gives:
$$k(m^2 - n^2 + 2mn - m^2 - n^2) = 8$$ $$k(-2n^2+2mn) = 8$$ $$kn(-n+m) = 4$$
There are only a few cases to check, where each case corresponds to a factor pair of $4$. Can you continue?