2.15 problem 15

Internal problem ID [3256]

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 )} \]

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.333 (sec). Leaf size: 48

DSolve[y''[x]-2*y'[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 ) \]