8.11.11 problem 16

Internal problem ID [879]
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
Date solved : Wednesday, February 05, 2025 at 04:36:35 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+9 y&=2 x^{2} {\mathrm e}^{3 x}+5 \end{align*}

Solution by Maple

Time used: 0.003 (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 = \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.179 (sec). Leaf size: 50

DSolve[D[y[x],{x,2}]+9*y[x]==2*x^2*Exp[3*x]+5,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{81} \left (9 e^{3 x} x^2-6 e^{3 x} x+e^{3 x}+81 c_1 \cos (3 x)+81 c_2 \sin (3 x)+45\right ) \]