Area of triangle = sqrt(p×(p-a)×(p-b)×(p-c)) where p = perimeter/2

p = (9 + 40x + 41x)/2 = (9 + 81x)/2

Area^2 = ((9 + 81x)/2)×((81x - 9)/2)×((9+x)/2)×((9-x)/2)

Area = 9/4×sqrt(6562x^2 - 81x^4 - 81)

d(Area)/dx = -(729x^3 - 29529x)/2×(sqrt(-81x^4 + 6562x^2 - 81)) = 0

To get maxima (because minima is area = 0 for x=0 in this case)

x = +/- 6.3644

Therefore for **x = 6** we have maximum triangle area with sides

9, 240, 246.