71.1.8 problem 22

Internal problem ID [14238]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 1. Introduction. Exercises page 14
Problem number : 22
Date solved : Wednesday, March 05, 2025 at 10:41:00 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=diff(y(x),x)-2*abs(y(x))^(1/2) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ x +\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.222 (sec). Leaf size: 31
ode=D[y[x],x]-Sqrt[Abs[y[x]]]==0; 
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.210 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*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} + 2 x \]