26.8.8 problem Exercise 21.10, page 231

Internal problem ID [7092]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 4. Higher order linear differential equations. Lesson 21. Undetermined Coefficients
Problem number : Exercise 21.10, page 231
Date solved : Tuesday, September 30, 2025 at 04:21:20 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 y^{\prime }-8 y&=9 x \,{\mathrm e}^{x}+10 \,{\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)-8*y(x) = 9*x*exp(x)+10*exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_2 \,{\mathrm e}^{6 x}-{\mathrm e}^{3 x} x -2 \,{\mathrm e}^{x}+c_1 \right ) {\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.161 (sec). Leaf size: 84
ode=D[y[x],{x,2}]-2*D[y[x],x]-8*y[x]==9*x*Exp[x]+10*Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \left (\int _1^x-\frac {1}{6} e^{K[1]} \left (9 e^{2 K[1]} K[1]+10\right )dK[1]+e^{6 x} \int _1^x\frac {1}{6} e^{-5 K[2]} \left (9 e^{2 K[2]} K[2]+10\right )dK[2]+c_2 e^{6 x}+c_1\right ) \end{align*}
Sympy. Time used: 0.141 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-9*x*exp(x) - 8*y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 10*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{4 x} - x e^{x} - 2 e^{- x} \]