78.13.10 problem 1 (j)

Internal problem ID [18332]
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 18. The Method of Undetermined Coefficients. Problems at page 132
Problem number : 1 (j)
Date solved : Tuesday, January 28, 2025 at 11:46:54 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

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

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