83.44.15 problem Ex 15 page 49

Internal problem ID [19543]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter III. Ordinary linear differential equations with constant coefficients
Problem number : Ex 15 page 49
Date solved : Tuesday, January 28, 2025 at 01:50:16 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

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

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