2.15 problem 15

Internal problem ID [2747]

Book: Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section: Chapter 4. Linear Differential Equations. Page 183
Problem number: 15.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 40

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 ) = {\mathrm e}^{x} \sin \left (x \right ) c_{2} +{\mathrm e}^{x} \cos \left (x \right ) c_{1} +\frac {\left (-25 \,{\mathrm e}^{x} x +20 x +28\right ) \cos \left (x \right )}{50}+\frac {\sin \left (x \right ) \left (5 x +2\right )}{25} \]

Solution by Mathematica

Time used: 0.153 (sec). Leaf size: 45

DSolve[y''[x]-2*y'[x]+2*y[x]==(x+Exp[x])*Sin[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {1}{50} \left (\left (20 x-25 e^x (x-2 c_2)+28\right ) \cos (x)+2 \left (5 x+25 c_1 e^x+2\right ) \sin (x)\right ) \\ \end{align*}