50.7.8 problem 2(a)

Internal problem ID [7912]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.9. Reduction of Order. Page 38
Problem number : 2(a)
Date solved : Sunday, March 30, 2025 at 12:36:57 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.047 (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.156 (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.954 (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 ] \]