78.9.6 problem 4 (c)

Internal problem ID [18254]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 14. Introduction. Problems at page 112
Problem number : 4 (c)
Date solved : Tuesday, January 28, 2025 at 11:44:25 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 26

dsolve(diff(y(x),x$2)-2*y(x)=sin(x),y(x), singsol=all)
 
\[ y = {\mathrm e}^{\sqrt {2}\, x} c_{2} +{\mathrm e}^{-\sqrt {2}\, x} c_{1} -\frac {\sin \left (x \right )}{3} \]

Solution by Mathematica

Time used: 0.100 (sec). Leaf size: 37

DSolve[D[y[x],{x,2}] -2* y[x]==Sin[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {\sin (x)}{3}+c_1 e^{\sqrt {2} x}+c_2 e^{-\sqrt {2} x} \]