89.19.20 problem 20

Internal problem ID [24748]
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 : 20
Date solved : Thursday, October 02, 2025 at 10:47:39 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-9 y&=-72 x \,{\mathrm e}^{-3 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)-9*y(x) = -72*x*exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 \,{\mathrm e}^{6 x}+6 x^{2}+c_2 +2 x \right ) {\mathrm e}^{-3 x} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 37
ode=D[y[x],{x,2}]-9*y[x]== -72*x*Exp[-3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{-3 x} \left (18 x^2+6 x+3 c_1 e^{6 x}+1+3 c_2\right ) \end{align*}
Sympy. Time used: 0.079 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(72*x*exp(-3*x) - 9*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{3 x} + \left (C_{1} + 6 x^{2} + 2 x\right ) e^{- 3 x} \]