87.17.29 problem 30

Internal problem ID [23621]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 127
Problem number : 30
Date solved : Thursday, October 02, 2025 at 09:43:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-7 y^{\prime }-8 y&={\mathrm e}^{x} \left (x^{2}+2\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)-7*diff(y(x),x)-8*y(x) = exp(x)*(x^2+2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{8 x} c_1 -\frac {\left (\frac {235}{98}+x^{2}-\frac {5}{7} x \right ) {\mathrm e}^{x}}{14} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-7*D[y[x],{x,1}]-8*y[x]==Exp[x]*(x^2+2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {e^x \left (98 x^2-70 x+235\right )}{1372}+c_1 e^{-x}+c_2 e^{8 x} \end{align*}
Sympy. Time used: 0.169 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x**2 + 2)*exp(x) - 8*y(x) - 7*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + C_{2} e^{8 x} + \frac {\left (- 98 x^{2} + 70 x - 235\right ) e^{x}}{1372} \]