6.19.3 problem section 9.3, problem 3

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

\begin{align*} 4 y^{\prime \prime \prime }+8 y^{\prime \prime }-y^{\prime }-2 y&=-{\mathrm e}^{x} \left (6 x^{2}+45 x +4\right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 35
ode:=4*diff(diff(diff(y(x),x),x),x)+8*diff(diff(y(x),x),x)-diff(y(x),x)-2*y(x) = -exp(x)*(6*x^2+45*x+4); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,{\mathrm e}^{-\frac {x}{2}}+c_3 \,{\mathrm e}^{\frac {x}{2}}+c_1 \,{\mathrm e}^{-2 x}-\frac {2 \,{\mathrm e}^{x} \left (x^{2}+\frac {3}{2} x -\frac {149}{18}\right )}{3} \]
Mathematica. Time used: 0.005 (sec). Leaf size: 52
ode=4*D[y[x],{x,3}]+8*D[y[x],{x,2}]-D[y[x],x]-2*y[x]==-Exp[x]*(4+45*x+6*x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (-\frac {2 x^2}{3}-x+\frac {149}{27}\right )+c_1 e^{-x/2}+c_2 e^{x/2}+c_3 e^{-2 x} \end{align*}
Sympy. Time used: 0.193 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((6*x**2 + 45*x + 4)*exp(x) - 2*y(x) - Derivative(y(x), x) + 8*Derivative(y(x), (x, 2)) + 4*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^{- \frac {x}{2}} + C_{3} e^{\frac {x}{2}} + \left (- \frac {2 x^{2}}{3} - x + \frac {149}{27}\right ) e^{x} \]