I am trying to understand a solution to the differential equation $$ \frac{dx}{dt} = - \sqrt{x}, \qquad x(0)=1, $$ where $x$ is a function of $t$ for $t \geq 0$. The problem statement claims that there is a unique, non-negative, continuously differentiable solution.
The solution I am reading leads off with what it claims is the unique solution: $$ x(t) = \begin{cases} \frac{(t-2)^2}{4} & \text{ $t \leq 2$} \\ 0 & \text{$t \geq 2$} \end{cases} $$ The first case I believe I understand. But I am unsure on why the solution tends to $0$ as $t \geq 2$.
I tried to solve this using separation of variables. In order to do that, I need to divide by $\sqrt{x}$, so I can't do that when $x = 0$. So I noted that $x = 0$ is an equilibrium solution with $\frac{dx}{dt} < 0$ for every $x > 0$. (I believe this makes it "asymptotically stable," which I think may explain the end behavior of the system.) For $x > 0$, I separate variables and integrate to get $$ x^{1/2} = \frac{-t + C}{2}. $$ I'm not sure at what point I should apply the initial condition or try to restrict $t$. The first thing I notice is that square roots have to be non-negative (in this case positive since I ruled out $x = 0$ above) so I need to have $-t + C > 0$ and therefore $t<C$. By plugging in $x(0) = 1$, I get $C = 2$. I can then square both sides to get the first solution $$ \frac{(-t+2)^2}{4} = \frac{(t-2)^2}{4} $$ for $t < 2$. But at this point, I am unsure of what to do when $t \geq 2$. I can check that the above solution works, but I don't understand how I would come up with this without either guessing it or being told beforehand. I believe it has something to do with the "asymptotically stable" equilibrium solution deduction above, but how would I know for which values of $t$ this applies to?