33.3.4 problem Problem 12.4

Internal problem ID [7817]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 12. VARIATION OF PARAMETERS. page 104
Problem number : Problem 12.4
Date solved : Tuesday, September 30, 2025 at 05:05:54 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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