Let $f (x$) = $\sqrt{−x^2 + 20x + 400} + \sqrt {x^2 − 20x}$. How many elements in the range of $f$ are integers? 
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.

One way to solve this problem is to differentiate the function. $$\frac{d}{dx}f(x) = \frac{-x+10}{\sqrt{-x^2+20x+400}} + \frac{x-10}{\sqrt{x^2-20x}}$$. This equals $0$ at $x = 10 \pm 10\sqrt{3}$. The domain of $f(x)$ is $[10-10\sqrt{5}, 0]$ $\cup$ $[20, 10+10\sqrt{5}]$. This means the six values to plug into the function are $10-10\sqrt{5}, 10-10\sqrt{3}, 0, 20, 10+10\sqrt{3}, 10+10\sqrt{5}$. 
Plugging in these values finds $f(x) = 20, 20\sqrt{2}, 20, 20, 20\sqrt{2}, 20$, respectively. The minimum of these is $20$, the maximum is $20\sqrt{2}$. This means the range of the function is $[20, 20\sqrt{2}]$. Since $20\sqrt{2}$ ~ $28.28$, there are $9$ integers in the range.
