Let $f (x$) = $\sqrt{−x^2 + 20x + 400} + \sqrt {x^2 − 20x}$. How many elements in the range of $f$ are integers?
I first let $y= x^2 -20x +100$.
Then substitute it in the function -------> $f(x) = \sqrt{-y+500}+\sqrt{y-100}$.
Which means, $100\leq{y}\leq{500}$. I then tried to find values of $y$ that would make both radicals disappear. I found four values of $y$ that made $f(x)$ integers; $100, 500, 356,$ and $244$. I also checked their discriminants and all of them were greater than $0$, which means each value of $y$ means two solutions for $x$, meaning, there are $8$ elements in the range of $f$ are integers. But the correct answer is $9$ and I can't seem to find the last one.
Hint:
Can you show $f(x) = \sqrt{-y+500}+\sqrt{y-100}$ is at least $20,$
and it has a maximum at $20\sqrt2$ when $y=300$?
If so, you can see the $9$ integer elements in the range are $20, 21, ..., 28$.