67.15.44 problem 22.11 (c)

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

\begin{align*} 6 y-5 y^{\prime }+y^{\prime \prime }&=x^{2} {\mathrm e}^{-7 x}+2 \,{\mathrm e}^{-7 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(-7*x)+2*exp(-7*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{2}+90 \,{\mathrm e}^{9 x} c_1 +90 \,{\mathrm e}^{10 x} c_2 +\frac {19 x}{45}+\frac {8371}{4050}\right ) {\mathrm e}^{-7 x}}{90} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 41
ode=D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==x^2*Exp[-7*x]+2*Exp[-7*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{-7 x} \left (4050 x^2+1710 x+8371\right )}{364500}+c_1 e^{2 x}+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.206 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(-7*x) + 6*y(x) - 5*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 2*exp(-7*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{2 x} + C_{2} e^{3 x} + \frac {x^{2} e^{- 7 x}}{90} + \frac {19 x e^{- 7 x}}{4050} + \frac {8371 e^{- 7 x}}{364500} \]