[Math] Solve Differential equation with absolute value

absolute valueinitial-value-problemsordinary differential equations

Hi guys I'm kinda stuck with this problem:

$\frac{dx}{dt} = \sqrt{|x|}$

$x(0)=0$

I could easily solve this if I knew x would be positive but I can't combine solutions for x negative and positive because this is not a linear differential equation right?

I found out that x=constant solves the problem but that doesn't help much.

Best Answer

For positive $x$,

$$\frac{dx}{\sqrt x}=dt$$ and

$$2\sqrt x=t,$$ already taking into account the initial condition.

For negative $x$,

$$\frac{dx}{\sqrt{-x}}=dt$$ and

$$-2\sqrt{-x}=t.$$

You can summarize the solution as

$$x=\frac{\text{sgn}(t)\,t^2}4=\frac{t\,|t|}4.$$

Related Question