8.11.12 problem 21

Internal problem ID [880]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number : 21
Date solved : Wednesday, February 05, 2025 at 04:36:39 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.003 (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 {\left (\left (x -2 c_1 \right ) \cos \left (x \right )+\left (-2 c_2 -1\right ) \sin \left (x \right )\right ) {\mathrm e}^{x}}{2} \]

Solution by Mathematica

Time used: 0.031 (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)) \]