29.4.9 problem 98

Internal problem ID [4700]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 4
Problem number : 98
Date solved : Sunday, March 30, 2025 at 03:39:57 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=\sqrt {{| y|}} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 29
ode:=diff(y(x),x) = abs(y(x))^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ x +2 \left (\left \{\begin {array}{cc} \sqrt {-y} & y\le 0 \\ -\sqrt {y} & 0<y \end {array}\right .\right )+c_1 = 0 \]
Mathematica. Time used: 0.195 (sec). Leaf size: 31
ode=D[y[x],x]==Sqrt[Abs[y[x]]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{\sqrt {| K[1]| }}dK[1]\&\right ][x+c_1] \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.220 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(Abs(y(x))) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \limits ^{y{\left (x \right )}} \frac {1}{\sqrt {\left |{y}\right |}}\, dy = C_{1} + x \]