15.15.12 problem 13

Internal problem ID [3216]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 24, page 109
Problem number : 13
Date solved : Monday, January 27, 2025 at 07:26:18 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.005 (sec). Leaf size: 28

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

Solution by Mathematica

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

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