15.11.15 problem 15

Internal problem ID [3125]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 19, page 86
Problem number : 15
Date solved : Monday, January 27, 2025 at 07:21:14 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }+y&={\mathrm e}^{x} \sin \left (3 x \right ) \end{align*}

Solution by Maple

Time used: 0.210 (sec). Leaf size: 46

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

Solution by Mathematica

Time used: 1.921 (sec). Leaf size: 70

DSolve[D[y[x],{x,2}]+D[y[x],x]+y[x]==Exp[x]*Sin[3*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {2}{39} e^x \sin (3 x)-\frac {1}{13} e^x \cos (3 x)+c_2 e^{-x/2} \cos \left (\frac {\sqrt {3} x}{2}\right )+c_1 e^{-x/2} \sin \left (\frac {\sqrt {3} x}{2}\right ) \]