87.17.31 problem 32

Internal problem ID [23623]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 127
Problem number : 32
Date solved : Thursday, October 02, 2025 at 09:43:34 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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