11.11 problem 16

Internal problem ID [229]

Book: Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section: Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number: 16.
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 x^{2} {\mathrm e}^{3 x}-5=0} \end {gather*}

Solution by Maple

Time used: 0.009 (sec). Leaf size: 29

dsolve(diff(y(x),x$2)+9*y(x)=2*x^2*exp(3*x)+5,y(x), singsol=all)
 

\[ y \relax (x ) = \sin \left (3 x \right ) c_{2}+\cos \left (3 x \right ) c_{1}+\frac {5}{9}+\frac {\left (x -\frac {1}{3}\right )^{2} {\mathrm e}^{3 x}}{9} \]

Solution by Mathematica

Time used: 0.122 (sec). Leaf size: 40

DSolve[y''[x]+9*y[x]==2*x^2*Exp[3*x]+5,y[x],x,IncludeSingularSolutions -> True]
 

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