Skip to content

Indefinite integrals II ​

Integration of rational functions ​

General steps ​

1. Decomposition by division with remainder (if necessary).

Given a rational function of with polynomials P and Q:

P(x)Q(x)=T(x)+R(x)Q(x)

where T(x) is a polynomial and deg⁡R<deg⁡Q (degree of polynomial P is less than that of Q).

2. Factor the denominator.

Factor the denominator Q(x) into a product of linear and irreducible quadratic factors.

3. Decompose into a sum of elementary fractions.

For each factor Qi(x) of Q(x), write the corresponding term as a sum of elementary fractions:

R(x)Q(x)=A1Q1(x)+A2Q2(x)+…+AnQn(x)

4. Integrate each elementary fraction separately and sum the results.

Integration by parts ​

Theorem ​

Let I⊆R be an open interval, f,g:I→R, f,g∈D, f′,g′∈C.

Then

∫f(x)⋅g′(x)dx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx

Basic types of integrals for which it may be worthwhile to integrate by parts:

1. Integrals of the form

∫P(x)⋅T(ax+b)dx(x,a,b∈R,a≠0)

where P is a polynomial and T∈{sin,cos,exp}.

In this case whe choose f(x)=P(x) and g′(x)=T(ax+b).

2. Integrals of the form

∫P(x)⋅Gn(ax+b)dx(ax+b∈DG, a,b∈R,a≠0,n∈N+)

where P is a polynomial and G∈{ln,arcsin,arctan}.

In this case whe choose f(x)=Gn(ax+b) and g′(x)=P(x).

Substitution rule ​

Let I,J⊆R be open intervals.

Assume that f:I→R, g:J→I, Rg=I, g∈D(J), g′>0 on J (or g′<0 on J), and that the function (f∘g)⋅g′ has an antiderivative.

Then the function f also has an antiderivative and

∫f(x)dx=x=g(t)∫f(g(t))⋅g′(t)dt|t=g−1(x)(x∈I)

We typically apply substitution rule in the following way:

Suppose we want to compute an indefinite integral ∫f(x)dx.

Using a suitable function g, that satisfies the conditions of the substitution rule, we introduce the new variable t=g−1(x) in place of the old variable x by setting x=g(t).

Then we compute the integral ∫f(g(t))⋅g′(t)dt with respect to the new variable t.

Finally, we replace the variable t with the expression g−1(x) to obtain the result.

Trigonometric substitution ​

Advisable to watch this video or similar, for a better understanding of trigonometric substitution.

  1. Integrals of the form
∫R(x,a2−x2)dx

where R is a rational function and a>0.

In this case we choose x=asin⁡t.

  1. Integrals of the form
∫R(x,x2+a2)dx

where R is a rational function and a>0.

In this case we choose x=atan⁡t.

  1. Integrals of the form
∫R(x,x2−a2)dx

where R is a rational function and a>0.

In this case we choose x=asec⁡t.

Example 1 (integration by parts) ​

Evaluate the following indefinite integral:

∫xe2xdx

Solution ​

Let f(x)=x⟹f′(x)=1.

Let g′(x)=e2x⟹g(x)=12e2x.

Then

∫xe2xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==x⋅12e2x−∫1⋅12e2xdx==12xe2x−12∫e2xdx==12xe2x−14e2x+C

Example 2 (integration by parts) ​

Evaluate the following indefinite integral:

∫x2e−xdx

Solution ​

Let f(x)=x2⟹f′(x)=2x.

Let g′(x)=e−x⟹g(x)=−e−x.

Then

∫x2e−xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==x2⋅(−e−x)−∫2x⋅(−e−x)dx==−x2e−x+2∫xe−xdx

Now we can use integration by parts again to evaluate the remaining integral.

Let f(x)=x⟹f′(x)=1.

Let g′(x)=e−x⟹g(x)=−e−x.

Then

∫xe−xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==x⋅(−e−x)−∫1⋅(−e−x)dx==−xe−x+∫e−xdx==−xe−x−e−x+C

Therefore

∫x2e−xdx=−x2e−x+2(−xe−x−e−x)+C==−x2e−x−2xe−x−2e−x+C==−e−x(x2+2x+2)+C

Example 3 (integration by parts) ​

Evaluate the following indefinite integral:

∫x2sin⁡(5x+1)dx

Solution ​

Let f(x)=x2⟹f′(x)=2x.

Let g′(x)=sin⁡(5x+1)⟹g(x)=−15cos⁡(5x+1).

Then

∫x2sin⁡(5x+1)dx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==x2⋅(−15cos⁡(5x+1))−∫2x⋅(−15cos⁡(5x+1))dx==−15x2cos⁡(5x+1)+25∫xcos⁡(5x+1)dx

Now we can use integration by parts again to evaluate the remaining integral.

Let f(x)=x⟹f′(x)=1.

Let g′(x)=cos⁡(5x+1)⟹g(x)=15sin⁡(5x+1).

Then

∫xcos⁡(5x+1)dx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==x⋅15sin⁡(5x+1)−∫1⋅15sin⁡(5x+1)dx==15xsin⁡(5x+1)−15∫sin⁡(5x+1)dx==15xsin⁡(5x+1)+125cos⁡(5x+1)+C

Therefore

∫x2sin⁡(5x+1)dx==−15x2cos⁡(5x+1)+25(15xsin⁡(5x+1)+125cos⁡(5x+1))+C==−15x2cos⁡(5x+1)+225xsin⁡(5x+1)+2125cos⁡(5x+1)+C

Example 4 (integration by parts) ​

Evaluate the following indefinite integral:

∫ln⁡xdx

Solution ​

Let f(x)=ln⁡x⟹f′(x)=1x.

Let g′(x)=1⟹g(x)=x.

Then

∫ln⁡xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==ln⁡x⋅x−∫1x⋅xdx==xln⁡x−∫1dx==xln⁡x−x+C==x(ln⁡x−1)+C

Example 5 (integration by parts) ​

Evaluate the following indefinite integral:

∫(x3+2x+2)ln⁡xdx

Solution ​

Let f(x)=ln⁡x⟹f′(x)=1x.

Let g′(x)=x3+2x+2⟹g(x)=14x4+x2+2x.

Then

∫(x3+2x+2)ln⁡xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==ln⁡x⋅(14x4+x2+2x)−∫1x⋅(14x4+x2+2x)dx==14x4ln⁡x+x2ln⁡x+2xln⁡x−∫14x3+x+2dx==14x4ln⁡x+x2ln⁡x+2xln⁡x−116x4−12x2−2x+C

Example 6 (integration by parts) ​

Evaluate the following indefinite integral:

∫arctan⁡3xdx

Solution ​

Let f(x)=arctan⁡3x⟹f′(x)=31+(3x)2=31+9x2.

Let g′(x)=1⟹g(x)=x.

Then

∫arctan⁡3xdx=f(x)⋅g(x)−∫f′(x)⋅g(x)dx==arctan⁡3x⋅x−∫3x1+9x2dx

Now we can use substitution rule to evaluate the remaining integral.

(1+9x2)′=18x∫3x1+9x2dx=16∫18x1+9x2dx==16ln⁡|1+9x2|+C=16ln⁡(1+9x2)+C

Therefore

∫arctan⁡3xdx=xarctan⁡3x−16ln⁡(1+9x2)+C

Example 7 (integration of rational functions) ​

Evaluate the following indefinite integral:

∫x3+x2−x+3x2−1dx

Solution ​

  1. Decomposition by division with remainder.
x3+x2−x+3x2−1=x+1+4x2−1
  1. Factor the denominator.
x2−1=(x−1)(x+1)
  1. Decompose into a sum of elementary fractions.
4x2−1=Ax−1+Bx+1==A(x+1)+B(x−1)(x−1)(x+1)x=1⟹4=2A⟹A=2x=−1⟹4=−2B⟹B=−24x2−1=2x−1−2x+1
  1. Integrate each elementary fraction separately and sum the results.
∫x3+x2−x+3x2−1dx=∫x+1+2x−1−2x+1dx==12x2+x+2ln⁡|x−1|−2ln⁡|x+1|+C

Example 8 (integration of rational functions) ​

Evaluate the following indefinite integral:

∫1x2−6x+8dx

Solution ​

  1. Decomposition by division with remainder.

Not needed

  1. Factor the denominator.
x2−6x+8=(x−2)(x−4)
  1. Decompose into a sum of elementary fractions.
1x2−6x+8=Ax−2+Bx−4==A(x−4)+B(x−2)(x−2)(x−4)x=2⟹1=−2A⟹A=−12x=4⟹1=2B⟹B=121x2−6x+8=−121x−2+121x−4
  1. Integrate each elementary fraction separately and sum the results.
∫1x2−6x+8dx=−12∫1x−2dx+12∫1x−4dx==−12ln⁡|x−2|+12ln⁡|x−4|+C

Example 9 (integration of rational functions) ​

Evaluate the following indefinite integral:

∫4x2+13x−9x3+2x2−3xdx

Solution ​

  1. Decomposition by division with remainder.

Not needed

  1. Factor the denominator.
x3+2x2−3x=x(x2+2x−3)=x(x+3)(x−1)
  1. Decompose into a sum of elementary fractions.
4x2+13x−9x3+2x2−3x=Ax+Bx+3+Cx−1==A(x+3)(x−1)+Bx(x−1)+Cx(x+3)x(x+3)(x−1)x=0⟹−9=−3A⟹A=3x=−3⟹4⋅9−13⋅3−9=B⋅(−3)⋅(−4)−12=B⋅12⟹B=−1x=1⟹4+13−9=C⋅1⋅48=4C⟹C=24x2+13x−9x3+2x2−3x=3x−1x+3+2x−1
  1. Integrate each elementary fraction separately and sum the results.
∫4x2+13x−9x3+2x2−3xdx=∫3x−1x+3+2x−1dx==3ln⁡|x|−ln⁡|x+3|+2ln⁡|x−1|+C

Example 10 (integration of rational functions) ​

Evaluate the following indefinite integral:

∫1x3+2x2+xdx

Solution ​

  1. Decomposition by division with remainder.

Not needed

  1. Factor the denominator.
x3+2x2+x=x(x2+2x+1)=x(x+1)2
  1. Decompose into a sum of elementary fractions.
1x3+2x2+x=Ax+Bx+1+C(x+1)2==A(x+1)2+Bx(x+1)+Cxx(x+1)2x=0⟹1=A⋅1⋅1⟹A=1x=−1⟹1=C⋅(−1)⟹C=−1x=1⟹1=4A+2B+C=4+2B−1⟹B=−11x3+2x2+x=1x−1x+1−1(x+1)2
  1. Integrate each elementary fraction separately and sum the results.
∫1x3+2x2+xdx=∫1x−1x+1−1(x+1)2dx==ln⁡|x|−ln⁡|x+1|+1x+1+C

Example 11 (substitution rule) ​

Evaluate the following indefinite integral:

∫e3xex+2dx

Solution ​

Let t=ex⟹x=ln⁡t=:g(t).

Since x∈R, we have Rg=R, and consequently Dg=(0,∞).

The function g is differentiable and g′(t)=1t>0.

Which implies that g is strictly increasing, therefore g is invertible.

g−1(x)=ex=t(x∈R)

Then

∫e3xex+2dx=∫t3t+2⋅1tdt==∫t2t+2dt

Now we can use polynomial division to simplify the integrand.

t2t+2=t−2+4t+2

Integrate

∫t2t+2dt=∫t−2+4t+2dt==12t2−2t+4ln⁡|t+2|+C==12t2−2t+4ln⁡(t+2)+C

Substitute t=ex back

t22−2t+4ln⁡(t+2)+C|t=ex=e2x2−2ex+4ln⁡(ex+2)+C(x∈R)

Example 12 (substitution rule) ​

Evaluate the following indefinite integral:

∫ex−1dx(x>0)

Solution ​

Let t=ex−1⟹t2=ex−1⟹ex=t2+1⟹x=ln⁡(t2+1)=:g(t).

Since Rg=(0,∞), the function g is differentiable and

g′(t)=2tt2+1>0(t>0)

So g is strictly increasing, therefore g is invertible.

g−1(x)=ex−1=t(x>0)

Then

∫ex−1dx=∫t⋅2tt2+1dt==2∫t2t2+1dt==2∫1−1t2+1dt==2(t−arctan⁡t)+C

Substitute t=ex−1 back

2(t−arctan⁡t)+C|t=ex−1=2(ex−1−arctan⁡ex−1)+C(x>0)

Example 13 (substitution rule) ​

Evaluate the following indefinite integral:

∫x3x−1dx(x>13)

Solution ​

Let t=3x−1⟹t2=3x−1⟹x=t2+13=:g(t).

Since x>13, we have Rg=(0,∞), and consequently Dg=(13,∞).

The function g is differentiable and g′(t)=2t3>0.

Which implies that g is strictly increasing, therefore g is invertible.

g−1(x)=3x−1=t(x>13)

Then

∫x3x−1dx=∫t2+13⋅t⋅2t3dt==29∫t4+t2dt==29(t55+t33)+C

Substitute t=3x−1 back

29(t55+t33)+C|t=3x−1==29((3x−1)55+(3x−1)33)+C(x>13)

Example 14 (substitution rule) ​

Evaluate the following indefinite integral:

∫1x2x+1x3dx(x>0)

Solution ​

Let t=x+1x3⟹t3=x+1x⟹x=1t3−1.

If x>0, then t>1, therefore the substitution function g is given by

g(t)=1t3−1=x(t>1)

Since g is differentiable and

g′(t)=3t2(t3−1)2>0(t>1)

g is strictly decreasing, therefore g is invertible.

g−1(x)=x+1x3=t(x>0)

Then

∫1x2x+1x3dx=∫1(1t3−1)2⋅t⋅3t2(t3−1)2dt==3∫t3(t3−1)2(t3−1)2dt==3∫t3dt==34t4+C

Substitute t=x+1x3 back

34t4+C|t=x+1x3=34(x+1x3)4+C(x>0)