The general solution of the differential equation \(\displaystyle\frac{dy}{dx} = xe^{x}\) is (C is an arbitrary constant)
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \(y = (x - 1)e^{x} + C\)
The right side is a function of x alone, so y is found by integrating it:
\( \displaystyle y = \int xe^{x}\,dx \)
Integrating by parts, with x as the first function:
\( \displaystyle y = xe^{x} - \int 1 \cdot e^{x}\,dx \)
\(y = xe^{x} - e^{x} + C\)
\(y = (x - 1)e^{x} + C\)
Check: \(\frac{d}{dx}\left[(x - 1)e^{x}\right] = e^{x} + (x - 1)e^{x} = xe^{x}\).