12.19.54 problem section 9.3, problem 54

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

\begin{align*} y^{\prime \prime \prime \prime }-5 y^{\prime \prime }+4 y&=-12 \,{\mathrm e}^{x}+6 \,{\mathrm e}^{-x}+10 \cos \left (x \right ) \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 45
ode:=diff(diff(diff(diff(y(x),x),x),x),x)-5*diff(diff(y(x),x),x)+4*y(x) = -12*exp(x)+6*exp(-x)+10*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-2 x} \left (\frac {\left (6 x +3 c_1 +1\right ) {\mathrm e}^{3 x}}{3}+{\mathrm e}^{2 x} \cos \left (x \right )+c_4 \,{\mathrm e}^{4 x}+\left (x +c_3 -\frac {1}{6}\right ) {\mathrm e}^{x}+c_2 \right ) \]
Mathematica. Time used: 0.149 (sec). Leaf size: 58
ode=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]==-12*Exp[x]+6*Exp[-x]+10*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cos (x)+c_1 e^{-2 x}+\frac {1}{6} e^{-x} (6 x-1+6 c_2)+\frac {1}{3} e^x (6 x+1+3 c_3)+c_4 e^{2 x} \]
Sympy. Time used: 0.185 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) + 12*exp(x) - 10*cos(x) - 5*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 4)) - 6*exp(-x),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} + x\right ) e^{- x} + \left (C_{2} + 2 x\right ) e^{x} + \cos {\left (x \right )} \]