77.37.5 problem 5

Internal problem ID [20734]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (B) at page 128
Problem number : 5
Date solved : Thursday, October 02, 2025 at 06:22:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 b x y^{\prime }+b^{2} x^{2} y&=x \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 123
ode:=diff(diff(y(x),x),x)-2*b*x*diff(y(x),x)+b^2*x^2*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\frac {\sqrt {2}\, \sqrt {\pi }\, \left (\operatorname {erf}\left (\frac {\sqrt {2}\, \left (b x +\sqrt {-b}\right )}{2 \sqrt {b}}\right ) {\mathrm e}^{2 x \sqrt {-b}}-\operatorname {erf}\left (\frac {\sqrt {2}\, \left (-b x +\sqrt {-b}\right )}{2 \sqrt {b}}\right )\right ) {\mathrm e}^{-\frac {1}{2}+\frac {b \,x^{2}}{2}-x \sqrt {-b}}}{4}+b^{{3}/{2}} \left ({\mathrm e}^{\frac {x \left (b x -2 \sqrt {-b}\right )}{2}} c_1 +{\mathrm e}^{\frac {x \left (b x +2 \sqrt {-b}\right )}{2}} c_2 \right )}{b^{{3}/{2}}} \]
Mathematica. Time used: 0.273 (sec). Leaf size: 139
ode=D[y[x],{x,2}]-2*b*x*D[y[x],x]+b^2*x^2*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{\frac {b x^2}{2}-i \sqrt {b} x} \left (4 b^{3/2} c_1-\sqrt {\frac {2 \pi }{e}} e^{2 i \sqrt {b} x} \text {erf}\left (\frac {\sqrt {b} x+i}{\sqrt {2}}\right )+i \sqrt {\frac {2 \pi }{e}} \text {erfi}\left (\frac {1+i \sqrt {b} x}{\sqrt {2}}\right )-2 i b c_2 e^{2 i \sqrt {b} x}\right )}{4 b^{3/2}} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
b = symbols("b") 
y = Function("y") 
ode = Eq(b**2*x**2*y(x) - 2*b*x*Derivative(y(x), x) - x + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (b**2*x**2*y(x) - x + Derivative(y(x), (x, 2)))/(2*b*x) cannot be solved by the factorable group method