64.11.42 problem 42

Internal problem ID [13492]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 42
Date solved : Tuesday, January 28, 2025 at 05:45:49 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.006 (sec). Leaf size: 43

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

Solution by Mathematica

Time used: 0.637 (sec). Leaf size: 114

DSolve[D[y[x],{x,2}]+9*y[x]==Exp[3*x]+Exp[-3*x]+Exp[3*x]*Sin[3*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \cos (3 x) \int _1^x-\frac {1}{3} e^{-3 K[1]} \sin (3 K[1]) \left (e^{6 K[1]} \sin (3 K[1])+e^{6 K[1]}+1\right )dK[1]+\sin (3 x) \int _1^x\frac {1}{3} e^{-3 K[2]} \cos (3 K[2]) \left (e^{6 K[2]} \sin (3 K[2])+e^{6 K[2]}+1\right )dK[2]+c_1 \cos (3 x)+c_2 \sin (3 x) \]