6.19.2 problem section 9.3, problem 2

Internal problem ID [2149]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 9 Introduction to Linear Higher Order Equations. Section 9.3. Undetermined Coefficients for Higher Order Equations. Page 495
Problem number : section 9.3, problem 2
Date solved : Tuesday, September 30, 2025 at 05:24:24 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-2 y^{\prime \prime }-5 y^{\prime }+6 y&={\mathrm e}^{-3 x} \left (6 x^{2}-23 x +32\right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 37
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)-5*diff(y(x),x)+6*y(x) = exp(-3*x)*(6*x^2-23*x+32); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (4 c_3 \,{\mathrm e}^{6 x}+4 c_1 \,{\mathrm e}^{4 x}+4 c_2 \,{\mathrm e}^{x}-x^{2}+x -3\right ) {\mathrm e}^{-3 x}}{4} \]
Mathematica. Time used: 0.006 (sec). Leaf size: 45
ode=D[y[x],{x,3}]-2*D[y[x],{x,2}]-5*D[y[x],x]+6*y[x]==Exp[-3*x]*(32-23*x+6*x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{4} e^{-3 x} \left (x^2-x+3\right )+c_1 e^{-2 x}+c_2 e^x+c_3 e^{3 x} \end{align*}
Sympy. Time used: 0.270 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-6*x**2 + 23*x - 32)*exp(-3*x) + 6*y(x) - 5*Derivative(y(x), x) - 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{x} + C_{3} e^{3 x} + \frac {\left (- x^{2} + x - 3\right ) e^{- 3 x}}{4} \]