6.19.32 problem section 9.3, problem 32

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

\begin{align*} y^{\prime \prime \prime }-2 y^{\prime \prime }+y^{\prime }-2 y&=-{\mathrm e}^{x} \left (\left (4 x^{2}+5 x +9\right ) \cos \left (2 x \right )-\left (-3 x^{2}-5 x +6\right ) \sin \left (2 x \right )\right ) \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 48
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = -exp(x)*((4*x^2+5*x+9)*cos(2*x)-(-3*x^2-5*x+6)*sin(2*x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{x} \left (x^{2}+\frac {3}{5} x -\frac {27}{25}\right ) \sin \left (2 x \right )}{2}+\frac {{\mathrm e}^{x} \left (55 x +61\right ) \cos \left (2 x \right )}{50}+c_1 \cos \left (x \right )+c_2 \sin \left (x \right )+c_3 \,{\mathrm e}^{2 x} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 65
ode=1*D[y[x],{x,3}]-2*D[y[x],{x,2}]+1*D[y[x],x]-2*y[x]==Exp[2*x]*((9+5*x+4*x^2)*Cos[2*x]-(6-5*x-3*x^2)*Sin[2*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {e^{2 x} \left (\left (6760 x^2-17680 x-29907\right ) \sin (2 x)+2 \left (5915 x^2+7345 x+3928\right ) \cos (2 x)\right )}{43940}+c_3 e^{2 x}+c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy. Time used: 0.661 (sec). Leaf size: 168
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((3*x**2 + 5*x - 6)*sin(2*x) + (4*x**2 + 5*x + 9)*cos(2*x))*exp(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_{1} e^{2 x} + C_{2} \sin {\left (x \right )} + C_{3} \cos {\left (x \right )} + \frac {x^{2} e^{x} \sin {\left (2 x \right )}}{2} - \frac {2 x e^{x} \sin {\left (2 x \right )}}{5} + \frac {3 \sqrt {2} x e^{x} \sin {\left (2 x + \frac {\pi }{4} \right )}}{10} + \frac {6 x e^{x} \cos {\left (2 x \right )}}{5} - \frac {2 \sqrt {2} x e^{x} \cos {\left (2 x + \frac {\pi }{4} \right )}}{5} - \frac {19 e^{x} \sin {\left (2 x \right )}}{50} + \frac {9 \sqrt {2} e^{x} \sin {\left (2 x + \frac {\pi }{4} \right )}}{25} + \frac {17 e^{x} \cos {\left (2 x \right )}}{50} + \frac {13 \sqrt {2} e^{x} \cos {\left (2 x + \frac {\pi }{4} \right )}}{25} \]