61.27.26 problem 36

Internal problem ID [12457]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.2-2
Problem number : 36
Date solved : Monday, March 31, 2025 at 05:35:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 45
ode:=diff(diff(y(x),x),x)+(2*x^2+a)*diff(y(x),x)+(x^4+a*x^2+b+2*x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 \,{\mathrm e}^{x \sqrt {a^{2}-4 b}}+c_2 \right ) {\mathrm e}^{-\frac {x \left (2 x^{2}+3 \sqrt {a^{2}-4 b}+3 a \right )}{6}} \]
Mathematica. Time used: 0.149 (sec). Leaf size: 79
ode=D[y[x],{x,2}]+(2*x^2+a)*D[y[x],x]+(x^4+a*x^2+2*x+b)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^{-\frac {1}{6} x \left (3 \sqrt {a^2-4 b}+3 a+2 x^2\right )} \left (c_2 e^{x \sqrt {a^2-4 b}}+c_1 \sqrt {a^2-4 b}\right )}{\sqrt {a^2-4 b}} \]
Sympy. Time used: 0.944 (sec). Leaf size: 3
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq((a + 2*x**2)*Derivative(y(x), x) + (a*x**2 + b + x**4 + 2*x)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = O\left (1\right ) \]