82.33.24 problem Ex. 24

Internal problem ID [18917]
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. 24
Date solved : Tuesday, January 28, 2025 at 12:36:23 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.272 (sec). Leaf size: 53

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