6.19.30 problem section 9.3, problem 30

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

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