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.
-
1$\begingroup$ What are $\alpha$ and $\beta$? Do you have boundary conditions for this problem? $\endgroup$– VladCommented Jun 9, 2015 at 21:21
-
$\begingroup$ @Vlad I've edited the question $\endgroup$– user55268Commented Jun 9, 2015 at 21:26
-
$\begingroup$ @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$. $\endgroup$– the_candymanCommented Jun 9, 2015 at 21:28
-
$\begingroup$ @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 $\endgroup$– user55268Commented Jun 9, 2015 at 21:29
-
$\begingroup$ I have made recently a few related questions here, here and here, where on the answers you could find interesting insights, but summarizing, what you have is a Singular solution. $\endgroup$– JoakoCommented May 26, 2022 at 23:05
4 Answers
$\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:
Observe that $y(t) = 0$ is a solution in an arbitrary interval.
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}$.
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}$.
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.
-
1$\begingroup$ 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$. $\endgroup$ Commented Jun 10, 2015 at 1:53
$$y=0$$ is a trivial solution, and as $\sqrt{|y|}\ge0$, any solution must be growing. More precisely, negative growing, then zero for a while, then positive growing.
If $y>0$, we can write
$$\frac{y'}{2\sqrt y}=\frac12$$ and
$$\sqrt y=\frac{x-x_+}2$$ for $x>x_+$ or $$y=\frac{(x-x_+)^2}4.$$
Similarly, if $y<0$,
$$y=-\frac{(x_--x)^2}4$$ for $x<x_-$.
Note that the negative and positive sections are optional. In case they both exist, we must have $$x_-\le x_+,$$ and with the given initial condition,
$$x_-\le0\le x_+$$
You can easily figure out that for Z ≤ y ≤ 2Z, y' is between $\sqrt Z$ and $\sqrt {2Z}$, so for y to change from Z to 2Z, x must increase by some amount from $\sqrt Z / \sqrt 2$ to $\sqrt Z$, that is x roughly changes by $\sqrt y$. This can give us the idea that maybe $y = x^2$, but in this case $y' = 2x = 2 \sqrt y$.
This is close, but not quite right. So we guess that $y = a \cdot x^2$, so $y' = 2ax = \sqrt {ax^2}$ with two solutions, a = 0 and a = 1/4. Since x is not part of the equation, f(x-c) is a solution if and only if f(x) is a solution, so we get the solutions $y = 0$ and $y = (x-c)^2 / 4$ for x ≥ c.
This doesn't take into account the absolute value of y in the square root. So if $y ≤ 0$ then the differential equation is $y' = -\sqrt y$ and we have the solutions $y = 0$ and $y = -(x-d)^2 / 4$ for y ≤ d.
The solution is unique around any point where y ≠ 0. But if y = 0 then y can stay zero up to some point to the right when it becomes positive, and it can be zero for some point to the left when it becomes negative. So to find all solutions:
Pick some d ≤ c, including d = -inf and c = +inf. Then let y = 0 for d ≤ x ≤ c, let $y = -(x-d)^2 / 4$ for x ≤ d, and $ y=(x-c)^2/4$ for x ≥ c. This includes the solutions y = 0 (let d = -inf, c = +inf), or where y is zero for all small x or for all large x.
Now you have the starting condition y(0) = 0, this just implies that you need d ≤ 0 ≤ c.
Since you have the initial condition $y(0)=0$, we should now focus on solving the equation $y'=\sqrt{|y|}$ on $\mathbb{R}\setminus\{0\}$. For $y\lt0$, $|y|=-y$, and for $y\gt0$, $|y|=y$. Hence for $y\lt0$, $y=-(-y)=-\sqrt{-y}^2=-\sqrt{|y|}^2$, and for $y\gt0$, $y=|y|=\sqrt{|y|}^2$. Hence $$-2\sqrt{-y}\left[\sqrt{-y}\right]'=\left[-\sqrt{-y}^2\right]'=\sqrt{-y},\,y\lt0$$ $$2\sqrt{y}\left[\sqrt{y}\right]'=\left[\sqrt{y}^2\right]'=\sqrt{y},\,y\gt0,$$ leaving you with $$\left[\sqrt{-y}\right]'=-\frac12,\,y\lt0$$ $$\left[\sqrt{y}\right]'=\frac12,\,y\gt0$$ which implies $$\sqrt{-y(t)}=A-\frac12t,\,y\lt0$$ $$\sqrt{y(t)}=B+\frac12t,\,y\gt0.$$ If we want the equation to be satisfied on $\mathbb{R}$ rather than just $\mathbb{R}\setminus\{0\}$, then the condition $y(0)=0$ forces $A=B=0$. This causes somewhat of a problem. In fact, the two equations that were just derived imply this much: $A\geq\frac12t$ and $B\geq-\frac12t$, which for a choice of constants $A,B$, this constrains the domain of $y$ for any individual case rather significantly. However, what we have is that $\sqrt{-y(t)}=-\frac12t,\,y\leq0$ implies $t\leq0$, and $\sqrt{y(t)}=\frac12t,\,y\geq0$ implies $t\geq0$. In fact, we have that $y(t)=-\frac{t^2}{4},\,t\leq0$, $y(t)=\frac{t^2}{4},\,t\geq0$ is the nontrivial solution of the equation in $\mathbb{R}$. To put it succinctly, $$y(t)=\frac{t|t|}{4}.$$ It is easy now to verify, $$y'(t)=\frac{|t|}{2}=\sqrt{|y|}$$ for every $t\in\mathbb{R}$.