In a right triangle, the perimeter is equal to 30. How many integer values can the hypotenuse take? (Answer:2)
I did:
$a+b+h = 30\rightarrow a+b = h-30\\
a^2+b^2 = h^2 \rightarrow h = \sqrt{a^2+b^2}\\
a-b<h<a+b \rightarrow a-b < h < \sqrt{a^2+b^2}-30...\\
\text{I didn't find other relationships...}
 $

Lower bound: use AM-QM inequality:
$$\frac{h^2}{2}=\frac{a^2+b^2}{2}\ge\left(\frac{a+b}{2}\right)^2=\frac{(30-h)^2}{4}$$
Solving the quadratic inequality for positive $h$ will give to you $h\ge 30(\sqrt{2}-1)= 12.42\ldots$ (lowest $h$ is achieved when the triangle is isosceles)
Upper bound: use $a+b>h$
$30=a+b+h>h+h=2h$
Therefore $h<15$
So the integral values of $h$ are $13$ and $14$
You can verify by solving $a+b=30-h$ and $a^2+b^2=h^2$
For $h=13$ you will get the well-known Pythagorean triplet $5,12,13$
For $h=14$ you will get $8-\sqrt{34},8+\sqrt{34},14$
