Integration

Chapter 4
Integration
4.1
The basics
There are two ways to interpret integration. . .
1. Integration is the reverse of di↵erentiation! If we have, say,
dA(x)
= f (x),
dx
then we can write
A(x) =
Z
f (x)dx + C.
[Indefinite integral!]
We say that A is the integral (antiderivative) of f (x).
2. Integration gives the area under a curve To achieve this, you sum the contribution of lots of infinitesimally small pieces.
To demonstrate, consider the area bounded by the x-axis, the lines x = a, x = b and
the curve y = f (x), as shown in the following diagram:
It is often taken for granted that the two interpretations are the same. In fact, this
is not obvious, so mathematicians have a big theorem about it. . .
35
CHAPTER 4. INTEGRATION
36
Theorem: Fundamental Theorem of Calculus
The shaded area above is
Z b
f (x)dx.
a
Proof: Let A(x) = area from say, the origin O to the point x under the curve. Then
the area of the shaded rectangle is
A(x + h)
A ⇡ f (x)h.
[Note: The intuition behind the above approximation is that it becomes more
accurate as h ! 0!]
)
f (x) ⇡
A(x + h)
h
A(x)
!
dA(x)
dx
as h ! 0.
Therefore the area from x = a to x = b is
Z b
A(b) A(a) =
f (x)dx. [A number; a definite integral!]
a
⇤
When tackling an integral, an engineer can count on these standard results. . .
R
f (x)
xn (n 6=
1
x
eax
cos (ax)
sin (ax)
1
x2 +1
1)
f (x)dx
1
n+1
n+1 x
+C
ln |x| + C
1 ax
+C
ae
1
a sin (ax) + C
1
a
cos (ax) + C
tan
1x
+C
Table 4.1: Table of Basic Integrals
CHAPTER 4. INTEGRATION
4.2
37
Integration by substitution
Sometimes an integral is easier to solve if you change the variable you are integrating with
respect to, i.e. make a substitution.
Z x2
Formally, if I =
f (x) dx,
x1
try introducing u = g(x),
du
= g 0 (x)
dx
)
dx
1
= 0
,
du
g (x)
or
so we end up with something that looks like multiplying and dividing by du:
Z x2
Z u2
dx
I=
f (x) dx =
f (u) du,
du
x1
u1
where u1 = g(x1 ), u2 = g(x2 ). So you must change the upper and lower limits for your
definite integral.
The best time to use this is when you have a function “wrapped” in another function you
would like to unravel.
Example 4.1. Calculate the integral
Z
(3x
7)
5
dx.
We want to remove the “function of a function”, so let
u = 3x
7
)
du = 3dx
)
1
dx = du,
3
then
Z
(3x
7)
5
dx =
=
=
=
Z
1
u 5 du
3
✓
◆
1
1 4
u
+C
3
4
1
u 4+C
12
1
(3x 7) 4 + C.
12
Don’t forget to rewrite your final answer in terms of x!
Example 4.2. Calculate the integral
Here, the ’horrible’ bit is
p
Z
p
sin x
p dx.
x
x, so let
u=
p
x
)
1
du = p dx,
2 x
CHAPTER 4. INTEGRATION
38
i.e.
p
dx = 2 xdu = 2udu
Z
p
Z
sin x
sin u
p dx =
.2⇢
u du
u
x
Z ⇢
= 2 sin udu
=
=
Example 4.3.
I =
Z
p
2 cos u + C
p
2 cos x + C.
x 1+
p
x
1
4
dx.
p
1
If we let u = x we still end up with a term that looks like u2 (1 + u) 4 which is still difficult
to deal with.
How about. . . u = 1 +
p
x?
1
du = p dx
2 x
Subsequently,
Z
p
p
x 1+ x
4.2.1
1
4
dx =
)
Z
p
dx = 2 xdu = 2(u
p
1) = 2 xdu.
1
(u 1)u 4 2(u 1)du
Z
1
= 2 (u 1)2 u 4 du
Z
1
= 2 u 4 u2 2u + 1 du
✓
◆
4 13
4 9 4 5
4
4
4
=2
u
2 u + u
+C
13
9
5
p 13 16
p 9 8
p 5
8
= (1 + x) 4
(1 + x) 4 + (1 + x) 4 + C.
13
9
5
A question of logs
Let us consider the derivative of the logarithm of some general function f (x):
d
1
d
(ln(f (x))) =
·
(f (x))
dx
f (x) dx
f 0 (x)
=
f (x)
This implies that:
Z
f 0 (x)
dx = ln(f (x)) + c
f (x)
Example 4.4. Consider the the following integral:
Z
2x + 5
I =
dx
x2 + 5x + 3
CHAPTER 4. INTEGRATION
39
Now, if we choose f (x) = x2 + 5x + 3, then f 0 (x) = 2x + 5. So, if we di↵erentiate ln(f (x)),
in this case we have
⇤
d ⇥
2x + 5
ln(x2 + 5x + 3) = 2
,
dx
x + 5x + 3
by the chain rule. Thus we know the integral must be
I = ln(x2 + 5x + 3) + C.
4.2.2
Trigonometric and hyperbolic substitutions
If you see
p
a2 x2
p
a2 + x2
p
x2 a2
1
2
a + x2
Try substituting
x = a sin ✓
x = a sinh ✓
x = a cosh ✓
x = a tan ✓
Example 4.5 (To show why).
I =
Z
p
a2
1
dx.
+ x2
If we let x = a sinh ✓, then
dx = a cosh ✓d✓,
thus
Z
a cosh ✓
p
d✓
2
a + a2 sinh2 ✓
Z
a cosh ✓
p
=
d✓
a 1 + sinh2 ✓
Z
cosh ✓
=
d✓
cosh ✓
Z
= 1d✓
⇣x⌘
= ✓ + C = sinh 1
.
a
I =
Example 4.6 (Harder!).
Z
1
1
dx
14 12x 2x2
3
Z 1
1
1
p
=p
dx,
2 3
7 6x x2
I =
p
Not obvious what the next step is.
Complete the square in the denominator!
7
6x
x2 = 7
(x + 3)2 + 9 = 16
(x + 3)2 .
CHAPTER 4. INTEGRATION
Hence
40
1
I =p
2
Z
1
p
16
3
which looks like
p
1
a2
u2
1
(x + 3)2
dx,
,
so we will choose a substitution like a sin ✓.
Let u = x + 3, then du = dx, and as a result:
Z 2
1
1
p
I =p
du.
2 0
16 u2
Now put
)
u = 4 sin ✓
1
I =p
2
=
=
=
=
4.2.3
Z
Z
⇡
6
0
⇡
du = 4 cos ✓d✓.
4 cos ✓
p
d✓
16 16 sin2 ✓
⇠
⇠⇠
4 cos
✓
⇠
⇠d✓
⇠
⇠
4 cos ✓
⇠
6
1
p
2 0
Z ⇡
6
1
p
1d✓
2 0
⇡
p
6 2
p
⇡ 2
.
12
One more trick
If you see an integral like
Z
sin4 x cos xdx,
Z
sin4 x cos3 xdx,
try u = sin x, because you get du = cos xdx, making the cos term disappear.
However, if you are facing
keep your eyes open for less obvious clues!
Z
= sin4 x cos2 x cos xdx
Z
= sin4 x(1 sin2 x) cos xdx
Z
Z
4
= sin x cos xdx
sin6 x cos xdx,
then we can summon u = sin x.
CHAPTER 4. INTEGRATION
41
Remark 4.1. This even works for, say,
Z
Z
cos5 xdx = (1
sin2 x)2 cos xdx
And finally. . . be bold! Try!
4.3
Integration by parts
This is a good strategy when you are integrating a product of two terms, one of which
either di↵erentiates or integrates into something simpler.
Recall the product rule:
d
du
dv
(uv) = v
+u
dx
dx
dx
Now integrate both sides w.r.t. x:
Z
Z
du
dv
uv = v dx + u dx
dx
dx
Z
Z
dv
du
)
u dx = uv
v dx
,
dx
dx
| {z }
Another integral!
dv
The idea is that u becomes “better” as you di↵erentiate or
becomes “better” as you
dx
integrate.
Example 4.7. Find
Z
Since x di↵erentiates away nicely,
choose
then
Z
dv
= ex ,
dx
Z
v = ex dx = ex .
u = x,
du
= 1,
dx
Apply the by parts formula:
xex dx.
Z
xex dx = xex
= xex
1 · ex dx
ex + C.
= ex (x
1) + C.
(4.1)
(Note that the arbitrary constant has been included right at the very last step)
Question: What happens if you try the other way round?
If
u = ex ,
dv
= x,
dx
CHAPTER 4. INTEGRATION
42
du
x2
= ex , v =
,
dx
2
which already does not look promising. If we go ahead and use the by-parts rule, then. . .
Z
Z
x2 x 1
x
xe dx =
e
x2 ex dx,
2
2
then
which is true, but does not help!
So what have we learned from this example? Well, it does matter which term you choose
dv
for u or
, as it can make or break your hopes of solving an integral. So choose wisely!
dx
Example 4.8. Find
I =
Let
Z
e2x sin xdx.
dv
= e2x ,
dx
du
1
= cos x, v = e2x
dx
2
u = sin x,
then
and the by-parts formula gives:
Z
1
e2x cos xdx
2
1
J,
2
1
I = e2x sin x
2
1
= e2x sin x
2
where
J =
Z
e2x cos xdx,
yet another integral. But don’t panic! This one can be handled by parts too; simply let
dv
= e2x ,
dx
u = cos x,
then
du
=
dx
sin x,
1
v = e2x ,
2
which gives
1
J = e2x cos x +
2
1
= e2x cos x +
2
)
)
1
I = e2x sin x
2
5
1
I = e2x sin x
4
2
So, finally, we have:
Z
1
e2x sin xdx
2
1
I.
2
1 2x
e cos x + I
4
1 2x
e cos x,
4
1
2e2x sin x e2x cos x + C,
5
not forgetting the constant of integration at the very end!
)
I =
CHAPTER 4. INTEGRATION
Example 4.9. Compute
Z
43
ln x dx.
Z
(Classic A-Level question!)
Z
1 · ln xdx
Z
1
= x ln x
x dx
⇢
x
⇢
= x(ln x 1) + C.
ln x dx =
Example 4.10. Find
I =
I =
Z
Z
1
x dx.
1
xdx
Z
x
1
p
= x sin x
dx
1 x2
p
= x sin 1 x
1 x2 .
4.4
1. sin
sin
Using partial fractions
Sometimes we want to compute, say,
Z
x2
x+1
dx,
3x + 2
which we can’t integrate directly. Here we must express the integrand as a sum of partial
fractions.
4.4.1
Recap: Partial fractions
You can express the function
P (x)
with partial fractions if Q(x) factorises.
Q(x)
For every factor of Q(x)
(ax + b)
(ax + b)2
(ax + b)3
(ax2 + bx + c)
You get this partial fraction form:
A
(ax + b)
A
B
+
(ax + b) (ax + b)2
A
B
C
+
+
2
(ax + b) (ax + b)
(ax + b)3
Ax + B
ax2 + bx + c
Then plug in some di↵erent values of x to find A, B, . . . (or use any other method you
prefer!)
For the next three examples P (x) will be linear and Q(x) will be quadratic polynomials.