52.2.34 problem 34

Internal problem ID [10457]
Book : Second order enumerated odes
Section : section 2
Problem number : 34
Date solved : Tuesday, September 30, 2025 at 07:27:37 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} y^{\prime \prime }-2 x y^{\prime }+2 \left (x^{2}+1\right ) y&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 23
ode:=x^2*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+2*(x^2+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (c_1 \sin \left (\sqrt {2}\, x \right )+c_2 \cos \left (\sqrt {2}\, x \right )\right ) \]
Mathematica. Time used: 0.028 (sec). Leaf size: 48
ode=x^2*D[y[x],{x,2}]-2*x*D[y[x],x]+2*(1+x^2)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 e^{-i \sqrt {2} x} x-\frac {i c_2 e^{i \sqrt {2} x} x}{2 \sqrt {2}} \end{align*}
Sympy. Time used: 0.128 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 2*x*Derivative(y(x), x) + (2*x**2 + 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{\frac {3}{2}} \left (C_{1} J_{\frac {1}{2}}\left (\sqrt {2} x\right ) + C_{2} Y_{\frac {1}{2}}\left (\sqrt {2} x\right )\right ) \]