7.17 problem Problem 46

Internal problem ID [2252]

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]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+2 y^{\prime }-3 y-\left (\sin ^{2}\relax (x )\right )=0} \end {gather*}

Solution by Maple

Time used: 0.008 (sec). Leaf size: 28

dsolve(diff(y(x),x$2)+2*diff(y(x),x)-3*y(x)=sin(x)^2,y(x), singsol=all)
 

\[ y \relax (x ) = c_{2} {\mathrm e}^{-3 x}+c_{1} {\mathrm e}^{x}-\frac {1}{6}-\frac {2 \sin \left (2 x \right )}{65}+\frac {7 \cos \left (2 x \right )}{130} \]

Solution by Mathematica

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

DSolve[y''[x]+2*y'[x]-3*y[x]==Sin[x]^2,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} 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} \\ \end{align*}