First, rewrite the given equation as a first-order linear differential equation:
$$\frac{dy}{dx} - Y = xe^x$$
Now, we will find an integrating factor, which is given by:
$$\mu(x) = e^{\int -1 dx} = e^{-x}$$
Multiply the differential equation by the integrating
Show more…