33.5.7 problem Problem 24.29

Internal problem ID [7836]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 24. Solutions of linear DE by Laplace transforms. Supplementary Problems. page 248
Problem number : Problem 24.29
Date solved : Tuesday, September 30, 2025 at 05:06:09 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }-3 y&=\sin \left (2 x \right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y^{\prime }\left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.095 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)-3*y(x) = sin(2*x); 
ic:=[y(0) = 0, D(y)(0) = 0]; 
dsolve([ode,op(ic)],y(x),method='laplace');
 
\[ y = -\frac {4 \cos \left (2 x \right )}{65}-\frac {7 \sin \left (2 x \right )}{65}-\frac {{\mathrm e}^{-3 x}}{26}+\frac {{\mathrm e}^{x}}{10} \]
Mathematica. Time used: 0.073 (sec). Leaf size: 107
ode=D[y[x],{x,2}]-2*D[y[x],x]-3*y[x]==Sin[2*x]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \left (\int _1^x-\frac {1}{4} e^{K[1]} \sin (2 K[1])dK[1]+e^{4 x} \left (\int _1^x\frac {1}{4} e^{-3 K[2]} \sin (2 K[2])dK[2]-\int _1^0\frac {1}{4} e^{-3 K[2]} \sin (2 K[2])dK[2]\right )-\int _1^0-\frac {1}{4} e^{K[1]} \sin (2 K[1])dK[1]\right ) \end{align*}
Sympy. Time used: 0.150 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*y(x) - sin(2*x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{x}}{10} - \frac {7 \sin {\left (2 x \right )}}{65} - \frac {4 \cos {\left (2 x \right )}}{65} - \frac {e^{- 3 x}}{26} \]