82.33.20 problem Ex. 20

Internal problem ID [18913]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. Examples on chapter VI, page 80
Problem number : Ex. 20
Date solved : Tuesday, January 28, 2025 at 12:35:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.198 (sec). Leaf size: 39

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