67.15.48 problem 22.11 (g)

Internal problem ID [16766]
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 (g)
Date solved : Thursday, October 02, 2025 at 01:38:38 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=x^{2} {\mathrm e}^{3 x} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 32
ode:=diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = x^2*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{2 x} \left (3 c_2 +\left (x^{3}-3 x^{2}+3 c_1 +6 x \right ) {\mathrm e}^{x}\right )}{3} \]
Mathematica. Time used: 0.028 (sec). Leaf size: 40
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==x^2*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{2 x} \left (e^x \left (x^3-3 x^2+6 x-6+3 c_2\right )+3 c_1\right ) \end{align*}
Sympy. Time used: 0.189 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(3*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^{3}}{3} - x^{2} + 2 x\right ) e^{x}\right ) e^{2 x} \]