40.11.10 problem 36

Internal problem ID [6744]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 36
Date solved : Monday, January 27, 2025 at 02:27:06 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 47

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

Solution by Mathematica

Time used: 2.674 (sec). Leaf size: 69

DSolve[D[y[x],{x,2}]+2*y[x]==x^3+x^2+Exp[-2*x]+Cos[3*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{42} \left (21 x^3+21 x^2-63 x+7 e^{-2 x}+9 \sin (x) \sin (2 x)-6 \cos ^3(x)+42 c_1 \cos \left (\sqrt {2} x\right )+42 c_2 \sin \left (\sqrt {2} x\right )-21\right ) \]