64.11.43 problem 43

Internal problem ID [13493]
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 : 43
Date solved : Tuesday, January 28, 2025 at 05:45:55 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+5 y&={\mathrm e}^{-2 x} \left (\cos \left (x \right )+1\right ) \end{align*}

Solution by Maple

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

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

Solution by Mathematica

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

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