# Solving $y' = \sqrt{|y|}$

I would like to solve the differential equation given by $$y' = \sqrt{|y|},\qquad y(0) = 0$$ This is equivalent, if we suppose that $y > 0$, to $$\frac{dy}{dt} = y^{1/2} \text{ if and only if } y^{-1/2} dy = dt$$ so it should be: $$2 y^{1/2} = t + c \implies y = \frac{(t+c)^2}{4}$$ As a test I have checked that $$y' = \frac{t+c}{2} = \sqrt{|y|} = \sqrt{y}$$ However, I would like to know how to obtain other solutions, just as: $$y_{\alpha,\beta}(t) = \begin{cases} (t-\alpha)^2 / 4 & t < \alpha,\\ 0 & \alpha \leq t \leq \beta,\\ (t-\beta)^2/4 & t > \beta \end{cases}$$ for any $\alpha < 0 < \beta$, real numbers. I mean, I don't know how would you find out every solution to this differential equation. Thanks in advance.

• What are $\alpha$ and $\beta$? Do you have boundary conditions for this problem? – Vlad Jun 9 '15 at 21:21
• @Vlad I've edited the question – user55268 Jun 9 '15 at 21:26
• @AlbertT. What Vlad asked you is the role of $\alpha$ and $\beta$ in your problem. The fact that $\alpha < \beta$ is just an hypotesis you had, not the "meaning" of $\alpha$ and $\beta$. – the_candyman Jun 9 '15 at 21:28
• @the_candyman For every two $\alpha,\beta \in \mathbb R$, such that $\alpha < \beta$, $y$ defined as above satisfies the equation, so there are infinite solutions – user55268 Jun 9 '15 at 21:29

$\newcommand{\Strut}{\vphantom{(}}$When performing separation of variables, you can't re-write your ODE as $y^{-1/2}\, dy = dt$ in a neighborhood of $t_{0}$ if $y(t_{0}) = 0$.

What you might do instead is:

1. Observe that $y(t) = 0$ is a solution in an arbitrary interval.

2. If $y(t_{0}) = y_{0} > 0$, separate variables in a neighborhood of $t_{0}$ on which $y$ is positive: $$t - t_{0} = \int_{t_{0}}^{t} y^{-1/2}\, dy = 2\left(\sqrt{y(t)} - \sqrt{y_{0}\Strut}\right),$$ so $y(t) = \frac{1}{4}\bigl(t - t_{0} + 2\sqrt{y_{0}\Strut}\bigr)^{2}$.

3. If $y(t_{0}) = y_{0} < 0$, separate variables in a neighborhood of $t_{0}$ on which $y$ is negative: $$t - t_{0} = \int_{t_{0}}^{t} (-y)^{-1/2}\, dy = -2\left(\sqrt{-y(t)} - \sqrt{-y_{0}\Strut}\right),$$ so $y(t) = -\frac{1}{4}\bigl(t - t_{0} + 2\sqrt{-y_{0}\Strut}\bigr)^{2}$.

4. Observe that all three solutions have $y' = 0$ when $y = 0$ (as required by the ODE), so piecing together formulas over abutting intervals gives continuously-differentiable solutions.

• Incidentally, every solution $y$ is non-decreasing (obvious from the ODE, or can be read off the integrated equations in 2 and 3). The quadratics as given come with implicit "fine print": The solutions are the "right half" ($t > t_{0} - 2\sqrt{y_{0}\Strut}$) of the quadratic in 2, or the "left half" ($t < t_{0} - 2\sqrt{-y_{0}\Strut}$) in 3. Particularly, the function $y_{\alpha,\beta}$ in the question appears not to be a solution; you'd need a minus sign in the portion where $t < \alpha$. – Andrew D. Hwang Jun 10 '15 at 1:53