89.19.12 problem 12

Internal problem ID [24740]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 10. Nonhomogeneous Equations: Operational methods. Exercises at page 151
Problem number : 12
Date solved : Thursday, October 02, 2025 at 10:47:34 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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