Spurious solution to differential equation

dynamical systemsinitial-value-problemsnumerical methodsordinary differential equations

I have the differential equation

$$ \frac{d}{dx}y = 2\sqrt{y} $$

which starts at $x=0$ with $y=0$. Wolfram Alpha says the solution is $y=x^2$.

I can see that when I insert this into the original equation. But I don't understand two things here.

  1. Shouldn't $y=0$ also be a solution? But maybe that is only a Wolfram Alpha issue as it displays only one solution?

  2. I don't understand how $y=x^2$ can "actually happen" in reality. With that I mean using a solver. Because when $y=0$ then also $2\sqrt{y} = 0$ and so $y$ should not ever change at all.

I can confirm this with Matlab:

y0=0;
ode45(@(t,y)(2*sqrt(y)),0:0.01:10,y0);

The code produces:

enter image description here

So this is obviously the $y=0$ solution.

Is the $y=x^2$ some kind of spurious solution that doesn't "exist" in reality? If so how can we know when a solution is "bad"? Or if it does exist how can we get a solver to produce this output?

Best Answer

Both $y = x^2$ and $y = 0$ are solutions for $x \ge 0$. $y = \sqrt{x}$ is not a solution for $x < 0$. There are "piecewise" solutions of the form $$ y = \cases{0 & for $x \le c$\cr (x-c)^2 & for $x \ge c$\cr}$$

The point is that $\sqrt{y}$ is not Lipschitz continuous at $0$, so this equation does not satisfy the hypotheses of the Picard-Lindelöf Existence and Uniqueness Theorem for differential equations, and in this case the solution is not uniquely determined by an initial condition.