# Integration by Parts (Part 1)

How to solve integral problems by using the integration by parts (indefinite integral): formula, proof, examples, and their solutions.

## Formula

∫ *u**v*' *dx* = *u**v* - ∫ *u*'*v* *dx*

This formula is derived

from the below differential formula:

[*u**v*]' = *u*'*v* + *u**v*'.

You'll see the proof of the integration formula below.

## Proof

Start from [*u**v*]' = *u*'*v* + *u**v*'.

Product rule in differentiation

Switch both sides.

And move *u*'*v* to the right side.

Integral both sides.

Then ∫ *u**v*' *dx* = *u**v* - ∫ *u*'*v* *dx*.

## How to Choose *u* and *v*'

Here's the general priority

when choosing *u* and *v*'.

See the types of two terms.

The type that fits into the upper function is *u*,

and the type that fits into the the lower function is *v*'.

ln *x*, log_{a} *x*: logarithmic functions*x*, *x*^{2}, ... : polynomials

sin *x*, cos *x*, ... : trigonometric functions*e*^{x}, *a*^{x}: exponential functions

The upper functions' derivatives, *u*', are simple,

compare to their integrals.

And the lower functions' integrals, *v*, are still simple.

After solving some examples below,

you'll know how to use this priority.

## Example 1

*x*, *e*^{x}

Set *u* = *x* and *v*' = *e*^{x}.

Write *u* = *x*.

Write *u*' = 1.

Write *v*' = *e*^{x} next to *u*' = 1.

And write *v* = *e*^{x} next to *u* = *x*.

By writing like this,

you can avoid making mistakes.

Indefinite integration of *e*^{x}

The integral of, *u**v*', *x**e*^{x} *dx*

is equal to,*u**v*, *x*⋅*e*^{x}

minus the integral of, *u*'*v*, 1⋅*e*^{x} *dx*.

## Example 2

*x*, cos *x*

Set *u* = *x* and *v*' = cos *x*.

Write *u* = *x*.

Write *u*' = 1.

Write *v*' = cos *x* next to *u*' = 1.

And write *v* = sin *x* next to *u* = *x*.

Indefinite integration of cos *x*

The integral of, *u**v*', *x* cos *x* *dx*

is equal to,*u**v*, *x* sin *x*

minus the integral of, *u*'*v*, 1⋅sin *x* *dx*.

Indefinite integration of sin *x*

## Example 3

*x*^{2}, sin *x*

Set *u* = *x*^{2} and *v*' = sin *x*.

Write *u* = *x*^{2}.

Write *u*' = 2*x*.

Write *v*' = sin *x* next to *u*' = 2*x*.

And write *v* = -cos *x* next to *u* = *x*^{2}.

Indefinite integration of sin *x*

The integral of, *u**v*', *x*^{2} sin *x* *dx*

is equal to,*u**v*, *x*^{2}⋅(-cos *x*)

minus the integral of, *u*'*v*, 2*x*⋅(-cos *x*) *dx*.

Use the integration by parts again on ∫ *x* cos *x* *dx*.

Set *u* = *x* and *v*' = cos *x*.

Write *u* = *x*.

Write *u*' = 1.

Write *v*' = cos *x* next to *u*' = 1.

And write *v* = sin *x* next to *u* = *x*.

Indefinite integration of cos *x*

The integral of, *u**v*', *x* cos *x* *dx*

is equal to,*u**v*, *x* sin *x*

minus the integral of, *u*'*v*, 1⋅sin *x* *dx*.

Indefinite integration of sin *x*

Don't forget to write +*C*.

## Example 4

*e*^{x}, sin *x*

Set *u* = sin *x* and *v*' = *e*^{x}.

Write *u* = sin *x*.

Write *u*' = cos *x*.

Derivative of sin *x*

Write *v*' = *e*^{x} next to *u*' = cos *x*.

And write *v* = *e*^{x} next to *u* = sin *x*.

Indefinite integration of *e*^{x}

The integral of, *u**v*', (sin *x*)(*e*^{x}) *dx*

is equal to,*u**v*, (sin *x*)(*e*^{x})

minus the integral of, *u*'*v*, (cos *x*)(*e*^{x}) *dx*.

Use the integration by parts again on ∫ (cos *x*)(*e*^{x}) *dx*.

Set *u* = cos *x* and *v*' = *e*^{x}.

Write *u* = cos *x*.

Write *u*' = -sin *x*.

Derivative of cos *x*

Write *v*' = *e*^{x} next to *u*' = -sin *x*.

And write *v* = *e*^{x} next to *u* = cos *x*.

The integral of, *u**v*', (cos *x*)(*e*^{x}) *dx*

is equal to,*u**v*, (cos *x*)(*e*^{x})

minus the integral of, *u*'*v*, (-sin *x*)(*e*^{x}) *dx*.

(given) = *e*^{x} sin *x* - *e*^{x} cos *x* - ∫ (sin *x*)(*e*^{x}) *dx*

∫ (sin *x*)(*e*^{x}) *dx* is the (given).

Then, instead of using the integration by parts again,

write the equation like this:

(given) = *e*^{x} sin *x* - *e*^{x} cos *x* - (given)

Move the right side's (given) to the left side.

And don't forget to write +*C* on the right side.

Divide both sides by 2.

Then (given) = (*e*^{x}/2)(sin *x* - cos *x*) + *C*.