# 2006 iTest Problems/Problem U7

## Problem

Triangle has integer side lengths, including , and a right angle, . Let and denote the inradius and semiperimeter of respectively. Find the perimeter of the triangle ABC which minimizes .

## Solution

First, label the other leg and the hypotenuse . To minimize , must be maximize and must be minimized. Through logic, it becomes clear that the triangle must be as close to equilateral as possible to maximize and minimize (Think about stretching one vertice of an equilateral triangle. The perimeter increases “faster” than the inradius).

From the Pythagorean theorem, , applying difference of squares yields . Since the question states and must be integers, we can find possible values of and by finding the prime factorization of , which is . The two values of and that are closest to each other are the values that satisfy , and . Solving the system yields and . Thus, the perimeter is

~Someonenumber011

## Solution 2 (calculus)

As before, label the other leg and the hypotenuse . Let the opposite angle to be , and let ; let the area be and the semiperimeter . Then we have . This means that . By calculus, we know that this function is minimized at , which corresponds to and ; by geometry, we know that this function, expressed in terms of , is symmetric around this point.

Then we proceed as before, searching for Diophantine solutions of with closest to , and we find that is the closest. (We can do so by noting that we would want .) Then the perimeter is as before, and we are done.

~duck_master