58.2.31 problem 31

Internal problem ID [9154]
Book : Second order enumerated odes
Section : section 2
Problem number : 31
Date solved : Monday, January 27, 2025 at 05:50:05 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*}

Solution by Maple

Time used: 0.009 (sec). Leaf size: 137

dsolve(diff(y(x),x$2)-2*b*x*diff(y(x),x)+b^2*x^2*y(x)=x,y(x), singsol=all)
 
\[ y = \frac {4 \,{\mathrm e}^{\frac {x \left (b x -2 \sqrt {-b}\right )}{2}} c_{1} b^{{3}/{2}}+4 \,{\mathrm e}^{\frac {x \left (b x +2 \sqrt {-b}\right )}{2}} c_{2} b^{{3}/{2}}-\sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, \left (b x +\sqrt {-b}\right )}{2 \sqrt {b}}\right ) \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{2}+\frac {b \,x^{2}}{2}+x \sqrt {-b}}+\sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {2}\, \left (-b x +\sqrt {-b}\right )}{2 \sqrt {b}}\right ) {\mathrm e}^{-\frac {1}{2}+\frac {b \,x^{2}}{2}-x \sqrt {-b}} \sqrt {2}}{4 b^{{3}/{2}}} \]

Solution by Mathematica

Time used: 0.461 (sec). Leaf size: 162

DSolve[D[y[x],{x,2}]-2*b*x*D[y[x],x]+b^2*x^2*y[x]==x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {e^{\frac {b x^2}{2}-i \sqrt {b} x} \left (2 \sqrt {b} \int _1^x\frac {i e^{i \sqrt {b} K[1]-\frac {1}{2} b K[1]^2} K[1]}{2 \sqrt {b}}dK[1]-i e^{2 i \sqrt {b} x} \int _1^xe^{-\frac {1}{2} b K[2]^2-i \sqrt {b} K[2]} K[2]dK[2]-i c_2 e^{2 i \sqrt {b} x}+2 \sqrt {b} c_1\right )}{2 \sqrt {b}} \]