Suppose \(I=\int x e^{x} d x\)
On using integration by parts
$$
I=x \int e^{x} d x-\int \frac{d}{d x} x \int e^{x} d x
$$
We know that, \(\int e^{x} d x=e^{x}\) and \(\frac{d}{d x} x=1\)
$$
\begin{aligned}
&=x e^{x}-\int e^{x} d x \\
&=x e^{x}-e^{x}+c
\end{aligned}
$$