6.19.40 problem section 9.3, problem 40

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

\begin{align*} y^{\prime \prime \prime \prime }+6 y^{\prime \prime \prime }+13 y^{\prime \prime }+12 y^{\prime }+4 y&={\mathrm e}^{-x} \left (\left (4-x \right ) \cos \left (x \right )-\left (5+x \right ) \sin \left (x \right )\right ) \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 43
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+6*diff(diff(diff(y(x),x),x),x)+13*diff(diff(y(x),x),x)+12*diff(y(x),x)+4*y(x) = exp(-x)*((4-x)*cos(x)-(5+x)*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\left (-x -1\right ) \cos \left (x \right )+\left (x -2\right ) \sin \left (x \right )+2 c_4 x +2 c_2 \right ) {\mathrm e}^{-x}}{2}+{\mathrm e}^{-2 x} \left (c_3 x +c_1 \right ) \]
Mathematica. Time used: 0.01 (sec). Leaf size: 56
ode=1*D[y[x],{x,4}]+6*D[y[x],{x,3}]+13*D[y[x],{x,2}]+12*D[y[x],x]+4*y[x]==Exp[-1*x]*((4-x)*Cos[x]-(5+x)*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{-2 x} \left (e^x (x-2) \sin (x)-e^x (x+1) \cos (x)+2 \left (c_2 x+c_3 e^x+c_4 e^x x+c_1\right )\right ) \end{align*}
Sympy. Time used: 0.726 (sec). Leaf size: 75
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((x - 4)*cos(x) + (x + 5)*sin(x))*exp(-x) + 4*y(x) + 12*Derivative(y(x), x) + 13*Derivative(y(x), (x, 2)) + 6*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{4} e^{- x} + x \left (C_{2} + C_{3} e^{- x} - \frac {\sqrt {2} \cos {\left (x + \frac {\pi }{4} \right )}}{2}\right ) - 2 \sin {\left (x \right )} + \frac {3 \sqrt {2} \sin {\left (x + \frac {\pi }{4} \right )}}{2} - \frac {5 \cos {\left (x \right )}}{2} + \frac {\sqrt {2} \cos {\left (x + \frac {\pi }{4} \right )}}{2}\right ) e^{- x} \]