85.61.3 problem 3

Internal problem ID [22857]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 208
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:15:50 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&={\mathrm e}^{x}-{\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)+3*diff(y(x),x)+2*y(x) = exp(x)-exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{x}}{6}-{\mathrm e}^{-2 x} c_1 +{\mathrm e}^{-x} \left (-x +c_2 \right ) \]
Mathematica. Time used: 0.384 (sec). Leaf size: 44
ode=D[y[x],{x,2}]+3*D[y[x],{x,2}]+2*y[x]==Exp[x]-Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{6} \left (-e^{-x}+e^x+6 c_1 \cos \left (\frac {x}{\sqrt {2}}\right )+6 c_2 \sin \left (\frac {x}{\sqrt {2}}\right )\right ) \end{align*}
Sympy. Time used: 0.174 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) - exp(x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- 2 x} + \left (C_{1} - x\right ) e^{- x} + \frac {e^{x}}{6} \]