83.17.6 problem 6

Internal problem ID [19202]
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 : 6
Date solved : Tuesday, January 28, 2025 at 01:13:13 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 1.083 (sec). Leaf size: 55

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