82.31.3 problem Ex. 3

Internal problem ID [18891]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. problems at page 79
Problem number : Ex. 3
Date solved : Tuesday, January 28, 2025 at 12:33:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y&=x^{2} {\mathrm e}^{3 x}+{\mathrm e}^{x} \cos \left (2 x \right ) \end{align*}

Solution by Maple

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

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

Solution by Mathematica

Time used: 2.115 (sec). Leaf size: 81

DSolve[D[y[x],{x,2}]+2*y[x]==x^2*Exp[3*x]+Exp[x]*Cos[2*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{11} e^{3 x} x^2-\frac {12}{121} e^{3 x} x+\frac {50 e^{3 x}}{1331}+\frac {4}{17} e^x \sin (2 x)-\frac {1}{17} e^x \cos (2 x)+c_1 \cos \left (\sqrt {2} x\right )+c_2 \sin \left (\sqrt {2} x\right ) \]