58.11.18 problem 18

Internal problem ID [14749]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 18
Date solved : Thursday, October 02, 2025 at 09:50:45 AM
CAS classification : [[_high_order, _missing_y]]

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