6.19.6 problem section 9.3, problem 6

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

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }-2 y&={\mathrm e}^{x} \left (15 x^{2}+34 x +14\right ) \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 30
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)-2*y(x) = exp(x)*(15*x^2+34*x+14); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (x^{3}+x^{2}+c_1 \right )+{\mathrm e}^{-x} \left (c_2 \cos \left (x \right )+c_3 \sin \left (x \right )\right ) \]
Mathematica. Time used: 0.073 (sec). Leaf size: 49
ode=D[y[x],{x,3}]+D[y[x],{x,2}]-2*y[x]==Exp[x]*(14+34*x+15*x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{5} e^{-x} \left (e^{2 x} \left (5 x^3+5 x^2-2+5 c_3\right )+5 c_2 \cos (x)+5 c_1 \sin (x)\right ) \end{align*}
Sympy. Time used: 0.107 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-15*x**2 - 34*x - 14)*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 )} = \left (C_{1} \sin {\left (x \right )} + C_{2} \cos {\left (x \right )}\right ) e^{- x} + \left (C_{3} + x^{3} + x^{2}\right ) e^{x} \]