61.27.17 problem 27

Internal problem ID [12448]
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 : 27
Date solved : Monday, March 31, 2025 at 05:34:46 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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