6.19.34 problem section 9.3, problem 34

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

\begin{align*} y^{\prime \prime \prime }-y^{\prime \prime }+2 y&={\mathrm e}^{x} \left (\left (20+4 x \right ) \cos \left (x \right )-\left (12+12 x \right ) \sin \left (x \right )\right ) \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 37
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)+2*y(x) = exp(x)*((20+4*x)*cos(x)-(12+12*x)*sin(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{-x}+\left (\left (x^{2}+x +c_2 +\frac {22}{5}\right ) \cos \left (x \right )+\sin \left (x \right ) \left (x^{2}+c_3 +3 x +\frac {1}{5}\right )\right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.166 (sec). Leaf size: 60
ode=1*D[y[x],{x,3}]-1*D[y[x],{x,2}]+0*D[y[x],x]+2*y[x]==Exp[x]*((20+4*x)*Cos[x]-(12+12*x)*Sin[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{10} e^x \left (10 x^2+10 x+23+10 c_2\right ) \cos (x)+\frac {1}{10} e^x \left (10 x^2+30 x-21+10 c_1\right ) \sin (x)+c_3 e^{-x} \end{align*}
Sympy. Time used: 0.173 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(((-4*x - 20)*cos(x) + (12*x + 12)*sin(x))*exp(x) + 2*y(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_{3} e^{- x} + \left (\left (C_{1} + x^{2} + x\right ) \cos {\left (x \right )} + \left (C_{2} + x^{2} + 3 x\right ) \sin {\left (x \right )}\right ) e^{x} \]