64.11.18 problem 18

Internal problem ID [13389]
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 : Wednesday, March 05, 2025 at 09:51:43 PM
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.004 (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: 37.479 (sec). Leaf size: 108
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]
 
\[ y(x)\to \int _1^x\int _1^{K[4]}e^{K[3]} \left (c_1+e^{K[3]} c_2+\int _1^{K[3]}e^{-2 K[1]} \left (6 e^{K[1]} K[1]-6 e^{3 K[1]}-3\right )dK[1]+e^{K[3]} \int _1^{K[3]}\left (-6 e^{-2 K[2]} K[2]+3 e^{-3 K[2]}+6\right )dK[2]\right )dK[3]dK[4]+c_4 x+c_3 \]
Sympy. Time used: 0.177 (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} \]