81.14.22 problem 18-35

Internal problem ID [21707]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 18. Algebra of differential operators. Page 435
Problem number : 18-35
Date solved : Thursday, October 02, 2025 at 08:00:11 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-12 y&=x^{2} {\mathrm e}^{x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-12*y(x) = x^2*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-4 x} c_1 +{\mathrm e}^{3 x} c_2 -\frac {\left (x^{2}+\frac {3}{5} x +\frac {19}{50}\right ) {\mathrm e}^{x}}{10} \]
Mathematica. Time used: 0.012 (sec). Leaf size: 39
ode=D[y[x],{x,2}]+D[y[x],x]-12*y[x]==x^2*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{500} e^x \left (50 x^2+30 x+19\right )+c_1 e^{-4 x}+c_2 e^{3 x} \end{align*}
Sympy. Time used: 0.117 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(x) - 12*y(x) + 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^{- 4 x} + C_{2} e^{3 x} - \frac {x^{2} e^{x}}{10} - \frac {3 x e^{x}}{50} - \frac {19 e^{x}}{500} \]