67.15.50 problem 22.11 (i)

Internal problem ID [16768]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 22. Method of undetermined coefficients. Additional exercises page 412
Problem number : 22.11 (i)
Date solved : Thursday, October 02, 2025 at 01:38:40 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=x^{2} {\mathrm e}^{3 x} \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 50
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = x^2*exp(3*x)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{2 x} \left ({\mathrm e}^{x} \left (x^{2}+\frac {16}{5} x -\frac {109}{50}\right ) \cos \left (2 x \right )+2 \left (x^{2}-\frac {13}{10} x -\frac {22}{25}\right ) {\mathrm e}^{x} \sin \left (2 x \right )-10 \,{\mathrm e}^{x} c_2 -10 c_1 \right )}{10} \]
Mathematica. Time used: 0.022 (sec). Leaf size: 63
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==x^2*Exp[3*x]*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{500} e^{3 x} \left (2 \left (50 x^2-65 x-44\right ) \sin (2 x)+\left (50 x^2+160 x-109\right ) \cos (2 x)\right )+c_1 e^{2 x}+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.362 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(3*x)*sin(2*x) + 6*y(x) - 5*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \left (C_{2} - \frac {x^{2} \sin {\left (2 x \right )}}{5} - \frac {x^{2} \cos {\left (2 x \right )}}{10} + \frac {13 x \sin {\left (2 x \right )}}{50} - \frac {8 x \cos {\left (2 x \right )}}{25} + \frac {22 \sin {\left (2 x \right )}}{125} + \frac {109 \cos {\left (2 x \right )}}{500}\right ) e^{x}\right ) e^{2 x} \]