83.41.11 problem 2 (x)

Internal problem ID [19491]
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 at end of chapter VIII. Page 141
Problem number : 2 (x)
Date solved : Tuesday, January 28, 2025 at 01:46:29 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 x y^{\prime }+\left (x^{2}+5\right ) y&=x \,{\mathrm e}^{-\frac {x^{2}}{2}} \end{align*}

Solution by Maple

Time used: 0.013 (sec). Leaf size: 28

dsolve(diff(y(x),x$2)+2*x*diff(y(x),x)+(x^2+5)*y(x)=x*exp(-1/2*x^2),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {{\mathrm e}^{-\frac {x^{2}}{2}} \left (4 c_{2} \cos \left (2 x \right )+4 c_{1} \sin \left (2 x \right )+x \right )}{4} \]

Solution by Mathematica

Time used: 0.101 (sec). Leaf size: 48

DSolve[D[y[x],{x,2}]+2*x*D[y[x],x]+(x^2+5)*y[x]==x*Exp[-1/2*x^2],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{4} e^{-\frac {1}{2} x (x+4 i)} \left (e^{2 i x} x-i c_2 e^{4 i x}+4 c_1\right ) \]