Find ∫xex dx.
Solution Choose u and dv so that ∫udv=∫xex dx
Suppose we choose u=xanddv=ex dx
Then du=dxandv=∫dv=∫ex dx=ex
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 ∫x⏟uexdx⏟dv=xex⏟uv−∫ex⏟vdx⏟du=xex−ex+C=ex(x−1)+C