28.2.15 problem 15

Internal problem ID [4458]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 15
Date solved : Monday, January 27, 2025 at 09:18:21 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.309 (sec). Leaf size: 48

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