78.7.8 problem 2 (a)

Internal problem ID [18123]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 11 (Reduction of order). Problems at page 87
Problem number : 2 (a)
Date solved : Monday, March 31, 2025 at 05:12:22 PM
CAS classification : [[_2nd_order, _missing_y], [_2nd_order, _exact, _nonlinear], [_2nd_order, _reducible, _mu_poly_yn]]

\begin{align*} \left (x^{2}+2 y^{\prime }\right ) y^{\prime \prime }+2 x y^{\prime }&=0 \end{align*}

With initial conditions

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

Maple. Time used: 0.052 (sec). Leaf size: 15
ode:=(x^2+2*diff(y(x),x))*diff(diff(y(x),x),x)+2*x*diff(y(x),x) = 0; 
ic:=y(0) = 1, D(y)(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= 1 \\ y &= -\frac {x^{3}}{3}+1 \\ \end{align*}
Mathematica. Time used: 0.146 (sec). Leaf size: 32
ode=(x^2+2*D[y[x],x])*D[y[x],{x,2}]+2*x*D[y[x],x]==0; 
ic={y[0]==1,Derivative[1][y][0] == 0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {Indeterminate} \\ y(x)\to 0 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},\frac {1}{4},\frac {5}{4},\text {ComplexInfinity}\right )-\frac {x^3}{6}+1 \\ \end{align*}
Sympy. Time used: 6.787 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*Derivative(y(x), x) + (x**2 + 2*Derivative(y(x), x))*Derivative(y(x), (x, 2)),0) 
ics = {y(0): 1, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 1 - \frac {x^{3}}{6}, \ y{\left (x \right )} = 1 - \frac {x^{3}}{6}\right ] \]