I am trying to solve $y(x)' = \sqrt{y(x)}$ with initial condition $y(0)=0$ for $x\in \mathbb{R}$. I have tried this:
DSolve[{y'[x] == Sqrt[y[x]], y[0] == 0}, y[x], x]
but this gives
{{y[x] -> x^2/4}}
which is not the correct solution. The correct solution should be
$$ y(x)= \begin{cases} 0 \quad\quad\quad x<c,\\ \frac{(x-c)^2}{4} \quad x \geq c, \end{cases} $$
where $c\geq0$.
Is there any way to get Mathematica to solve this correctly? Thanks!