# Integration by parts

## Summary and examples

Finding a primitive function is almost impossible. In general, finding the primitive is mostly very difficult or even impossible.
In the topic Integration of standard functions we looked at the following procedure: first look in the table of standard functions. If this fails, try to adjust the integrand and check whether the table can now be used. If this is not the case we try substitution as a possible method.
However, there are more options and one is integration by parts. This method is related to the product rule in differentiation.

Suppose we want to differentiate the product of two functions. We apply the product rule:

$[f(x)g(x)]'=f'(x)g(x)+f(x)g'(x)$

We can write this expression as:

$\displaystyle\frac{d}{dx}(f(x)g(x))=\displaystyle\frac{df(x)}{dx}g(x)+f(x)\displaystyle\frac{dg(x)}{dx}$

When we multiply the left- and right-hand side with $dx$ (mathematically not completely correct), we get:

$d(f(x)g(x))=g(x)df(x)+f(x)dg(x)$

or:

$f(x)dg(x)=d(f(x)g(x))-g(x)df(x)$

We integrate left- and right-hand side:

$\displaystyle\int{f(x)dg(x)}=\displaystyle\int{d(f(x)g(x))}-\displaystyle\int{g(x)df(x)}$

and get the following expression:

$\displaystyle\int{f(x)dg(x)}=f(x)g(x)-\displaystyle\int{g(x)df(x)}$

To apply integration by parts it is necessary to recognize the relation above. That is certainly difficult, but with some practice, not really a problem.

##### Example 1

We begin with the following integral:

$\displaystyle\int{xe^x}dx$

We do not recognize the rule above, but we can do something about it.

We can write the derivative of $e^x$ as $\displaystyle\frac{de^x}{dx}$ which is equal to:

$\displaystyle\frac{de^x}{dx}=e^x$

After cross-multiplication we get:

$de^x=e^xdx$

Now we can write the integral as:

$\displaystyle\int{xe^x}dx=\displaystyle\int{xde^x}$

According to the rule of integration by parts we can write this as (if we recognize the following relations $f(x)=x$ and $g(x)=e^x$):

$\displaystyle\int{xe^x}dx=\displaystyle\int{xde^x}=xe^x-\displaystyle\int{e^x}dx=xe^x-e^x=(x-1)e^x$

Verify the result.

##### Example 2

The following integral can be solved applying the rule of integration by parts:

$\displaystyle\int{\ln(x)}dx$

At first sight it seems that we do not have a product of two functions, but we can write:

$\displaystyle\int{\ln(x)\cdot1}dx=\displaystyle\int{\ln(x)}d(x)=$

$=x\ln(x)-\displaystyle\int{xd\ln(x)}=$

$=x\ln(x)-\displaystyle\int{x\displaystyle\frac{1}{x}}dx=$

$=x\ln(x)-x$

Again we can verify the result by differentiation.

0