33.1.3 problem Problem 11.3

Internal problem ID [7795]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. page 95
Problem number : Problem 11.3
Date solved : Tuesday, September 30, 2025 at 05:05:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y^{\prime }-2 y&=\sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-2*y(x) = sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{2 x} c_1 +\frac {\cos \left (2 x \right )}{20}-\frac {3 \sin \left (2 x \right )}{20} \]
Mathematica. Time used: 0.067 (sec). Leaf size: 70
ode=D[y[x],{x,2}]-D[y[x],x]-2*y[x]==Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \left (\int _1^x-\frac {1}{3} e^{K[1]} \sin (2 K[1])dK[1]+e^{3 x} \int _1^x\frac {1}{3} e^{-2 K[2]} \sin (2 K[2])dK[2]+c_2 e^{3 x}+c_1\right ) \end{align*}
Sympy. Time used: 0.123 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) - sin(2*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 {3 \sin {\left (2 x \right )}}{20} + \frac {\cos {\left (2 x \right )}}{20} \]