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]]

Solve \begin {gather*} \boxed {y^{\prime \prime }-2 y^{\prime }+2 y-\left (x +{\mathrm e}^{x}\right ) \sin \relax (x )=0} \end {gather*}

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

Solution by Mathematica

Time used: 0.154 (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*}