20.7.17 problem Problem 46

Internal problem ID [3732]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 46
Date solved : Monday, January 27, 2025 at 07:56:49 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 36

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

Solution by Mathematica

Time used: 0.089 (sec). Leaf size: 39

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