71.8.19 problem 8 (b)

Internal problem ID [14382]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.4.4, page 115
Problem number : 8 (b)
Date solved : Monday, March 31, 2025 at 12:20:33 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (-1\right )&=0 \end{align*}

Maple. Time used: 0.011 (sec). Leaf size: 5
ode:=diff(y(x),x) = y(x)^(1/2)/x; 
ic:=y(-1) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 0 \]
Mathematica. Time used: 0.109 (sec). Leaf size: 24
ode=D[y[x],x]==Sqrt[y[x]]/x; 
ic={y[-1]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 0 \\ y(x)\to -\frac {1}{4} (\pi +i \log (x))^2 \\ \end{align*}
Sympy. Time used: 0.220 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - sqrt(y(x))/x,0) 
ics = {y(-1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (x \right )}^{2}}{4} - \frac {i \pi \log {\left (x \right )}}{2} - \frac {\pi ^{2}}{4} \]