Problem: Which integer is closest to the difference? (Contest math)
$$\large\underbrace{1000\cdots}_{2020} \thinspace-\sqrt{\underbrace{99\cdots9}_{2019}\thinspace \thinspace \underbrace{00\cdots0}_{2019}}$$
My attempts:
$\underbrace{1000\cdots}_{2020}=10^{2019}$
$\sqrt{\underbrace{99\cdots9}_{2019}\thinspace \thinspace \underbrace{00\cdots0}_{2019}}=\sqrt{\underbrace{99\cdots9}_{2019}\thinspace \thinspace \underbrace{99\cdots 9}_{2019}-\underbrace{99\cdots9}_{2019}\thinspace \thinspace }=\sqrt{10^{4038}-1-10^{2019}+1}=\sqrt{10^{2019}(10^{2019}-1)}$
We have, $\underbrace{1000\cdots}_{2020} \thinspace-\sqrt{\underbrace{99\cdots9}_{2019}\thinspace \thinspace \underbrace{00\cdots0}_{2019}}=10^{2019}-\sqrt{10^{2019}(10^{2019}-1)}$
But, I can not continue from here and I don't know if my attempts are true or not.
Do my attempts correct?
Your attempt can be continued $$ 10^{2019} = \sqrt{10^{2019} 10^{2019}} > \sqrt{10^{2019}(10^{2019}-1)} > \sqrt{(10^{2019}-1)(10^{2019}-1)} = 10^{2019}-1 \text{,} $$ so the closest integer to $10^{2019} - \sqrt{10^{2019}(10^{2019}-1)}$ is either $0$ or $1$. So let's compare $10^{2019}(10^{2019}-1)$ with \begin{align*} (10^{2019} - 1/2)^2 &= (10^{2019})^2 - 10^{2019} + 1/4 \\ &= 10^{2019}(10^{2019}-1) + 1/4 \\ &> 10^{2019}(10^{2019}-1) \text{,} \end{align*} discovering that we are not subtracting enough for the result to be $1/2$, so the result is in the interval $(1/2,1)$ and $1$ is the closest integer to $10^{2019} - \sqrt{10^{2019}(10^{2019}-1)}$.