89.16.10 problem 10

Internal problem ID [24660]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Exercises at page 140
Problem number : 10
Date solved : Thursday, October 02, 2025 at 10:46:48 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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