6.19.66 problem section 9.3, problem 66

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

\begin{align*} y^{\prime \prime \prime }+2 y^{\prime \prime }-y^{\prime }-2 y&={\mathrm e}^{-2 x} \left (\left (23-2 x \right ) \cos \left (x \right )+\left (8-9 x \right ) \sin \left (x \right )\right ) \end{align*}
Maple. Time used: 0.008 (sec). Leaf size: 40
ode:=diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x)-diff(y(x),x)-2*y(x) = exp(-2*x)*((23-2*x)*cos(x)+(8-9*x)*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (2 c_1 \,{\mathrm e}^{3 x}+\left (x +2\right ) \cos \left (x \right )+\left (-4 x +3\right ) \sin \left (x \right )+2 c_3 \,{\mathrm e}^{x}+2 c_2 \right ) {\mathrm e}^{-2 x}}{2} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 48
ode=D[y[x],{x,3}]+2*D[y[x],{x,2}]-D[y[x],x]-2*y[x]==Exp[-2*x]*((23-2*x)*Cos[x]+(8-9*x)*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} e^{-2 x} \left ((3-4 x) \sin (x)+(x+2) \cos (x)+2 \left (c_2 e^x+c_3 e^{3 x}+c_1\right )\right ) \end{align*}
Sympy. Time used: 0.442 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-(23 - 2*x)*cos(x) + (9*x - 8)*sin(x))*exp(-2*x) - 2*y(x) - Derivative(y(x), x) + 2*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^{- x} + C_{3} e^{x} + \left (C_{1} - 2 x \sin {\left (x \right )} + \frac {x \cos {\left (x \right )}}{2} + \frac {3 \sin {\left (x \right )}}{2} + \cos {\left (x \right )}\right ) e^{- 2 x} \]