83.17.1 problem 1

Internal problem ID [19197]
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. Misc. Examples on chapter III at page 50
Problem number : 1
Date solved : Tuesday, January 28, 2025 at 01:13:04 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 26

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

Solution by Mathematica

Time used: 0.020 (sec). Leaf size: 32

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