2023 WSMO Tiebreaker Round Problems/Problem 3

Problem

Let $S$ be the set of all values of $a$ such that the area of a triangle with side lengths $5, 7, a$ is a positive integer. Find $\sum_{x\in S}\left(x^2\right).$

Solution

Letting $5$ be the base of the triangle, we have a height of $\frac{2h}{5}$ for $0<\frac{2h}{5}\le 7\implies h\in\{1,2,\dots,17\}$. Note for each height, we have two posible values of $a$, if the triangle if acute or obtuse. We have \begin{align*} a_1^2 &= \left(5-\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\right)^2+\left(\frac{2h}{5}\right)^2\\ &= 5^2+\left(7^2-\left(\frac{2h}{5}\right)^2\right)-10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}+\left(\frac{2h}{5}\right)^2\\ &= 74-10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\\ \end{align*} for when the triangle is acute and \begin{align*} a_2^2 &= \left(5+\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\right)^2+\left(\frac{2h}{5}\right)^2\\ &= 5^2+\left(7^2-\left(\frac{2h}{5}\right)^2\right)+10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}+\left(\frac{2h}{5}\right)^2\\ &= 74+10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\\ \end{align*} for when the triangle is obtuse. We have \[a_1^2+a_2^2=\left(74-10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\right)+\left(74+10\sqrt{7^2-\left(\frac{2h}{5}\right)^2}\right)=148.\] So, \[\sum_{x\in S}\left(x^2\right) = \sum_{h\in\{1,2,\dots,17\}}148 = 148\cdot17=\boxed{2516}.\]

~pinkpig