11.6 problem 1(f)

Internal problem ID [5249]

Book: An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section: Chapter 2. Linear equations with constant coefficients. Page 93
Problem number: 1(f).
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.009 (sec). Leaf size: 37

dsolve(diff(y(x),x$2)+y(x)=x*exp(x)*cos(2*x),y(x), singsol=all)
 

\[ y \relax (x ) = c_{2} \sin \relax (x )+\cos \relax (x ) c_{1}+\frac {\left (-5 x +11\right ) {\mathrm e}^{x} \cos \left (2 x \right )}{50}+\frac {\left (x -\frac {1}{5}\right ) {\mathrm e}^{x} \sin \left (2 x \right )}{5} \]

Solution by Mathematica

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

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

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