55.28.4 problem 14

Internal problem ID [13787]
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 : 14
Date solved : Thursday, October 02, 2025 at 08:06:43 AM
CAS classification : [[_2nd_order, _with_linear_symmetries], [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

\begin{align*} y^{\prime \prime }+a y^{\prime }+b \left (-b \,x^{2}+a x +1\right ) y&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)+a*diff(y(x),x)+b*(-b*x^2+a*x+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {b \,x^{2}}{2}} \left (\operatorname {erf}\left (\frac {-2 b x +a}{2 \sqrt {-b}}\right ) c_1 +c_2 \right ) \]
Mathematica. Time used: 0.11 (sec). Leaf size: 67
ode=D[y[x],{x,2}]+a*D[y[x],x]+b*(-b*x^2+a*x+1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{-\frac {b x^2}{2}} \left (\frac {\sqrt {\pi } c_2 e^{-\frac {a^2}{4 b}} \text {erfi}\left (\frac {2 b x-a}{2 \sqrt {b}}\right )}{\sqrt {b}}+2 c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*Derivative(y(x), x) + b*(a*x - b*x**2 + 1)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False