82.32.2 problem Ex. 3

Internal problem ID [18893]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VI. Linear equations with constant coefficients. problems at page 80
Problem number : Ex. 3
Date solved : Tuesday, January 28, 2025 at 12:33:48 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.004 (sec). Leaf size: 30

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

Solution by Mathematica

Time used: 0.019 (sec). Leaf size: 35

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