Integral by Parts: Indefinite Integral

How to solve the indefinite integral of a product by using the integral by parts: formula, 4 examples, and their solutions.

Formula

Formula

The integral of a product, uv', can be solved
by using this formula.
∫ uv' dx = uv - ∫ u'v dx

This formula can be derived from
the derivative of a product formula:
[uv]' = u'v + uv'.

u'v + uv' = [uv]'
uv' = [uv]' - u'v

Integrate both sides.
Then ∫ uv' dx = uv - ∫ u'v dx.

How to Choose u and v'

For a product of two functions in an integral,
one is u, and the other is v'.

To choose u and v' properly,
remember this order of uv':

[u]
logarithmic
polynomial
trigonometric,
exponential
[v'].

Set u = (upper function) and v' = (lower function).

u is the function
whose integral is complex.

v' is the function
whose integral is simple.

Example 1

Example

Solution

xex is the product of x and ex.

So solve this
by using integral by parts.

The order of uv' is

[u]
logarithmic
polynomial (x)
trigonometric
exponential (ex)
[v'].

So set
u = x and v' = ex.

Write u = x.

Differentiate both sides.

Then u' = 1.

Derivative of a Polynomial

Write v' = ex
next to u' = 1.

Integrate both sides.

Then v = ex.
(You don't have to write +C in this case.)

Integral of ex

Write this above v' = ex.

u = x, v = ex
u' = 1

Then the given integral is equal to,
uv, x⋅ex
minus
integral, u'v, 1⋅ex dx.

x⋅ex = xex
1⋅ex = ex

-∫ ex dx = -ex + C

So xex - ex + C is the answer.

Example 2

Example

Solution

x cos x is the product of x and cos x.

So solve this
by using integral by parts.

The order of uv' is

[u]
logarithmic
polynomial (x)
trigonometric (cos x)
exponential
[v'].

So set
u = x and v' = cos x.

Write u = x.

Differentiate both sides.

Then u' = 1.

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

Integrate both sides.

Then v = sin x.

Integral of cos x

Write this above v' = cos x.

u = x, v = sin x
u' = 1

Then the given integral is equal to,
uv, x⋅(sin x)
minus
integral, u'v, 1⋅(sin x) dx.

x⋅(sin x) = x sin x
1⋅(sin x) = sin x

-∫ sin x dx = -(-cos x + C)

Integral of sin x

-(-cos x + C) = +cos x + C

-(+C)= -C is still a constant.
So the constant term is still +C.

So x sin x + cos x + C is the answer.

Example 3

Example

Solution

x2 sin x is the product of x2 and sin x.

So solve this
by using integral by parts.

The order of uv' is

[u]
logarithmic
polynomial (x2)
trigonometric (sin x)
exponential
[v'].

So set u = x2 and v' = sin x.

Write u = x2.

Differentiate both sides.

Then u' = 2x.

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

Integrate both sides.

Then v = -cos x.

Write this above v' = sin x.

u = x2, v = -cos x
u' = 2x

Then the given integral is equal to,
uv, x2⋅(-cos x)
minus
integral, u'v, (2x)⋅(-cos x) dx.

x2⋅(-cos x) = -x2 cos x

-∫ (2x)⋅(-cos x) dx = +2 ∫ x cos x dx

x cos x is the product of x and cos x.

So solve ∫ x cos x dx
by using integral by parts again.

The order of uv' is

[u]
logarithmic
polynomial (x)
trigonometric (cos x)
exponential
[v'].

So set
u = x and v' = cos x.

Write u = x.

Differentiate both sides.

Then u' = 1.

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

Integrate both sides.

Then v = sin x.

Write this above v' = cos x.

u = x, v = sin x
u' = 1

Then ∫ x cos x dx becomes
uv, x⋅sin x
minus
integral, u'v, 1⋅(sin x) dx.

x⋅(sin x) = x sin x
1⋅(sin x) = sin x

+2[x sin x - ∫ sin x dx] = +2x sin x - 2∫ sin x dx

∫ sin x dx = -cos x + C

-2(-cos x + C) = +2 cos x + C

-2⋅C = -2C is still a constant.
So just write +C.

-x2 cos x + 2 cos x = (-x2 + 2) cos x

So
2x sin x + (-x2 + 2) cos x + C
is the answer.

Example 4

Example

Solution

ex sin x is the product of ex and sin x.

So solve this
by using integral by parts.

The order or uv' is

[u]
logarithmic
polynomial
trigonometric (sin x)
exponential (ex)
[v'].

So set
u = sin x and v' = ex.

Write u = sin x.

Differentiate both sides.

Then u' = cos x.

Derivative of sin x

Write v' = ex
next to u' = cos x.

Integrate both sides.

Then v = ex.

Write this above v' = ex.

u = sin x, v = ex
u' = cos x

Then the given integral is equal to,
uv, (sin x)⋅ex
minus
integral, u'v, (cos x)⋅ex dx.

(cos x)⋅ex is the product of cos x and ex.

So solve ∫ (cos x)⋅ex dx
by using integral by parts again.

The order of uv' is

[u]
logarithmic
polynomial
trigonometric (cos x)
exponential (ex)
[v'].

So set
u = cos x and v' = ex.

Write u = cos x.

Differentiate both sides.

Then u' = -sin x.

Derivative of cos x

Write v' = ex
next to u' = -sin x.

Integrate both sides.

Then v = ex.

Write this above v' = ex.

(sin x)⋅ex = ex sin x

u = cos x, v = ex
u' = -sin x

Then ∫ (cos x)⋅ex dx is equal to,
uv, (cos x)⋅ex
minus
integral, u'v, (-sin x)⋅ex dx.

(cos x)⋅ex = ex cos x
-∫(-sin x)⋅ex dx = +∫ ex sin x dx

-[ex cos x + ∫ ex sin x dx] = -ex cos x - ∫ ex sin x dx

(given) = ex sin x - ex cos x - ∫ ex sin x dx

∫ ex sin x dx = (given)

So (given) = ex sin x - ex cos x - (given).

(given) = ex sin x - ex cos x - (given)

Move -(given) to the left side.
Then 2(given) = ex sin x - ex cos x.

(given) is an indefinite integral.
So write +C.

ex sin x - ex cos x = ex(sin x - cos x)

Common Monomial Factor

Divide both sides by 2.

Then (given) = [ex/2](sin x - cos x) + C.

+C/2 is still a constant.
So the constant term is still +C.

So
[ex/2](sin x - cos x) + C
is the answer.