6.19.5 problem section 9.3, problem 5

Internal problem ID [2152]
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 5
Date solved : Tuesday, September 30, 2025 at 05:24:26 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

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