50.10.13 problem 3(b)

Internal problem ID [7982]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 2. Second-Order Linear Equations. Section 2.2. THE METHOD OF UNDETERMINED COEFFICIENTS. Page 67
Problem number : 3(b)
Date solved : Monday, January 27, 2025 at 03:35:18 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 1.685 (sec). Leaf size: 55

DSolve[D[y[x],{x,2}]+9*y[x]==2*Sin[3*x]+4*Sin[x]-26*Exp[-2*x]+27*x^3,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to 3 x^3-2 x-2 e^{-2 x}+\frac {\sin (x)}{2}+\frac {1}{18} \sin (3 x)+\left (-\frac {x}{3}+c_1\right ) \cos (3 x)+c_2 \sin (3 x) \]