62.27.4 problem Ex 4

Internal problem ID [12942]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter VII, Linear differential equations with constant coefficients. Article 50. Method of undetermined coefficients. Page 107
Problem number : Ex 4
Date solved : Tuesday, January 28, 2025 at 04:44:42 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 25

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

Solution by Mathematica

Time used: 0.288 (sec). Leaf size: 71

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