23.2.20 problem 6(i)

Internal problem ID [4137]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 3. Linear differential equations of second order. Exercises at page 31
Problem number : 6(i)
Date solved : Monday, January 27, 2025 at 08:38:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&=4 x \,{\mathrm e}^{x} \end{align*}

Solution by Maple

Time used: 0.007 (sec). Leaf size: 22

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

Solution by Mathematica

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

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