83.16.3 problem 3

Internal problem ID [19192]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (H) at page 47
Problem number : 3
Date solved : Tuesday, January 28, 2025 at 01:12:14 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.005 (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.108 (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 ) \]