6.19.8 problem section 9.3, problem 8

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

\begin{align*} y^{\prime \prime \prime }-y^{\prime \prime }-y^{\prime }+y&=-{\mathrm e}^{x} \left (7+6 x \right ) \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 31
ode:=diff(diff(diff(y(x),x),x),x)-diff(diff(y(x),x),x)-diff(y(x),x)+y(x) = -exp(x)*(7+6*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 \,{\mathrm e}^{-x}-\frac {{\mathrm e}^{x} \left (x^{3}-2 c_3 x +2 x^{2}-2 c_1 \right )}{2} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 41
ode=D[y[x],{x,3}]-D[y[x],{x,2}]-D[y[x],x]+y[x]==-Exp[x]*(7+6*x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (-\frac {x^3}{2}-x^2+x+c_3 x-\frac {1}{2}+c_2\right )+c_1 e^{-x} \end{align*}
Sympy. Time used: 0.177 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((6*x + 7)*exp(x) + y(x) - 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_{3} e^{- x} + \left (C_{1} + x \left (C_{2} - \frac {x^{2}}{2} - x\right )\right ) e^{x} \]