Recall the following integration by parts formula for the indefinite integral

Integrate by parts by setting

and

.
Then

, and

. Substituting these values in the formula gives,

For the second integral we can do the following substitution:

Finally, we have

(Note that the expression
is always positive, so it would also be correct to remove the absolute value and simply write
instead of
.)