6.19.29 problem section 9.3, problem 29

Internal problem ID [2176]
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 29
Date solved : Tuesday, September 30, 2025 at 05:24:36 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 (16+10 x \right ) \cos \left (x \right )+\left (30-10 x \right ) \sin \left (x \right )\right ) \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 40
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)*((16+10*x)*cos(x)+(30-10*x)*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\left (x +1\right ) \cos \left (x \right )-\sin \left (x \right ) \left (x -2\right )\right ) {\mathrm e}^{-x}+c_3 \,{\mathrm e}^{2 x}+c_1 \,{\mathrm e}^{x}+c_2 \,{\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.009 (sec). Leaf size: 49
ode=0*D[y[x],{x,4}]+1*D[y[x],{x,3}]-1*D[y[x],{x,2}]-4*D[y[x],x]+4*y[x]==Exp[-x]*((16+10*x)*Cos[x]+(30-10*x)*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \left (-e^x (x-2) \sin (x)+e^x (x+1) \cos (x)+c_2 e^{3 x}+c_3 e^{4 x}+c_1\right ) \end{align*}
Sympy. Time used: 0.592 (sec). Leaf size: 78
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((10*x - 30)*sin(x) - (10*x + 16)*cos(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_{1} e^{- 2 x} + C_{2} e^{x} + C_{3} e^{2 x} + \left (\sqrt {2} x \cos {\left (x + \frac {\pi }{4} \right )} + 3 \sin {\left (x \right )} - \frac {4 \sqrt {2} \sin {\left (x + \frac {\pi }{4} \right )}}{5} + \frac {8 \cos {\left (x \right )}}{5} + \frac {\sqrt {2} \cos {\left (x + \frac {\pi }{4} \right )}}{5}\right ) e^{- x} \]