Integrating by Parts

Find \(\int x e^x~dx\).

Solution Choose \(u\) and \(dv\) so that \[ \int u dv = \int x e^x~dx \]

Suppose we choose \[ u = x\qquad \text{and} \quad dv = e^x~dx \]

Then \[ du = dx\qquad \text{and} \qquad v = \int dv = \int e^x~dx=e^x \]

Notice that we did not add a constant. Only a particular antiderivative of \(dv\) is required at this stage; we will add the constant of integration at the end. Using the integration by parts formula, we have \[ \int \underset{\color{#0066A7}{\hbox{\(u\)}}}{\underbrace{x}} \underset{\color{#0066A7}{dv}}{\underbrace{e^{x} dx}} = \underset{\color{#0066A7}{uv}}{\underbrace{x e^{x}}}-\int \underset{\color{#0066A7}{v}}{\underbrace{e^{x}}}\underset{\color{#0066A7}{\hbox{\(du\)}}} {\underbrace{\hbox{\(dx\)}}}=x e^{x}-e^{x}+C=e^{x}(x-1)+C \]