6.19.22 problem section 9.3, problem 22

Internal problem ID [2169]
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 22
Date solved : Tuesday, September 30, 2025 at 05:24:33 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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