12.19.37 problem section 9.3, problem 37

Internal problem ID [2184]
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 37
Date solved : Tuesday, March 04, 2025 at 01:51:18 PM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime \prime }+2 y^{\prime \prime \prime }-2 y^{\prime \prime }-8 y^{\prime }-8 y&={\mathrm e}^{x} \left (8 \cos \left (x \right )+16 \sin \left (x \right )\right ) \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 47
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)-8*diff(y(x),x)-8*y(x) = exp(x)*(8*cos(x)+16*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-2 x} \left (\left (\cos \left (x \right )+7 \sin \left (x \right )\right ) {\mathrm e}^{3 x}-10 c_3 \cos \left (x \right ) {\mathrm e}^{x}-10 c_4 \sin \left (x \right ) {\mathrm e}^{x}-10 c_2 \,{\mathrm e}^{4 x}-10 c_1 \right )}{10} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 56
ode=1*D[y[x],{x,4}]+2*D[y[x],{x,3}]-2*D[y[x],{x,2}]-8*D[y[x],x]-8*y[x]==Exp[x]*(8*Cos[x]+16*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_3 e^{-2 x}+c_4 e^{2 x}-\frac {1}{10} e^x (7 \sin (x)+\cos (x))+c_2 e^{-x} \cos (x)+c_1 e^{-x} \sin (x) \]
Sympy. Time used: 0.482 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-16*sin(x) - 8*cos(x))*exp(x) - 8*y(x) - 8*Derivative(y(x), x) - 2*Derivative(y(x), (x, 2)) + 2*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{- 2 x} + C_{4} e^{2 x} + \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- x} + \frac {\left (- 7 \sin {\left (x \right )} - \cos {\left (x \right )}\right ) e^{x}}{10} \]