10.13 problem 3(b)

Internal problem ID [6314]

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).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+9 y=2 \sin \left (3 x \right )+4 \sin \left (x \right )-26 \,{\mathrm e}^{-2 x}+27 x^{3}} \]

Solution by Maple

Time used: 0.0 (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 \left (x \right ) = \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: 2.215 (sec). Leaf size: 55

DSolve[y''[x]+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) \]