59.1.258 problem 261

Internal problem ID [9430]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 261
Date solved : Sunday, March 30, 2025 at 02:34:47 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 31
ode:=x^2*diff(diff(y(x),x),x)+(2*x^2+x)*diff(y(x),x)-4*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_2 \,{\mathrm e}^{-2 x} \left (2 x +3\right )+2 \left (x^{2}-2 x +\frac {3}{2}\right ) c_1}{x^{2}} \]
Mathematica. Time used: 0.721 (sec). Leaf size: 71
ode=x^2*D[y[x],{x,2}]+(x+2*x^2)*D[y[x],x]-4*y[x]==2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^{-2 x} \left (c_2 (2 x+3) \int _1^x\frac {4 e^{2 K[1]} K[1]^3}{(2 K[1]+3)^2}dK[1]-e^{2 x} x^2+c_1 (2 x+3)\right )}{2 x^2} \]
Sympy. Time used: 0.917 (sec). Leaf size: 374
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + (2*x**2 + x)*Derivative(y(x), x) - 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \text {Solution too large to show} \]