7.17 problem Problem 46

Internal problem ID [2761]

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.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+2 y^{\prime }-3 y=\sin \left (x \right )^{2}} \]

Solution by Maple

Time used: 0.015 (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.098 (sec). Leaf size: 39

DSolve[y''[x]+2*y'[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} \]