10.13 problem 3(b)

Internal problem ID [5561]

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]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+9 y-2 \sin \left (3 x \right )-4 \sin \relax (x )+26 \,{\mathrm e}^{-2 x}-27 x^{3}=0} \end {gather*}

Solution by Maple

Time used: 0.013 (sec). Leaf size: 48

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 \relax (x ) = \sin \left (3 x \right ) c_{2}+\cos \left (3 x \right ) c_{1}-2 x +\frac {\sin \left (3 x \right )}{2}+3 x^{3}-2 \,{\mathrm e}^{-2 x}+\frac {\sin \relax (x )}{2}-\frac {\cos \left (3 x \right ) x}{3} \]

Solution by Mathematica

Time used: 0.772 (sec). Leaf size: 51

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]
 

\begin{align*} y(x)\to 3 x^3-2 x-2 e^{-2 x}+\frac {\sin (x)}{2}+\left (-\frac {x}{3}+c_1\right ) \cos (3 x)+\left (\frac {1}{18}+c_2\right ) \sin (3 x) \\ \end{align*}