18.2.17 problem Problem 15.35

Internal problem ID [3500]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 15, Higher order ordinary differential equations. 15.4 Exercises, page 523
Problem number : Problem 15.35
Date solved : Monday, January 27, 2025 at 07:39:49 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 x y^{\prime }+\left (4 x^{2}+6\right ) y&={\mathrm e}^{-x^{2}} \sin \left (2 x \right ) \end{align*}

Solution by Maple

Time used: 0.017 (sec). Leaf size: 30

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

Solution by Mathematica

Time used: 0.127 (sec). Leaf size: 52

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