Integrals, areas, Riemann sums
Math 10A
October 5, 2017
Math 10A Integrals, areas, Riemann sums
We had the ninth Math 10A breakfast yesterday morning:
There are still lots of slots available Breakfast #10, next Monday
(October 9) at 9AM.
Math 10A Integrals, areas, Riemann sums
Signed area
Find the area enclosed between the cubic y = x
3
x
2
2x
and the x-axis from x = 1 to x = 2.
Pro-tip: the answer is not
Z
2
1
(x
3
x
2
2x) dx!
Math 10A Integrals, areas, Riemann sums
The integral
Z
2
1
(x
3
x
2
2x) dx adds the “positive” area
between 1 and 0 to the “negative” area between 0 and 2,
thereby getting the incorrect answer 9/4.
The correct answer may be written as
Z
2
1
|x
3
x
2
2x| dx, but
that’s not especially helpful because we can’t integrate absolute
values very well.
The best move is to divide the region of integration into the two
segments [1, 0] and [0, 2].
Math 10A Integrals, areas, Riemann sums
The positive area then becomes
Z
0
1
(x
3
x
2
2x) dx
Z
2
0
(x
3
x
2
2x) dx
= 2F (0) F(1) F (2),
where F is an antiderivative of x
3
x
2
2x, say
F (x) = x
4
/4 x
3
/3 x
2
. With this choice,
F (0) = 0, F (1) = 5/12, F (2) = 8/3.
The total area is
2F (0) F(1) F (2) = 5/12 + 8/3 = 37/12.
Math 10A Integrals, areas, Riemann sums
How is area actually defined?
Area is a limit of Riemann sums.
To define
Z
b
a
f (x) dx: Choose an integer n 1 and divide up
[a, b] into n equal pieces
[a, a +
b a
n
], [a +
b a
n
, a + 2 ·
b a
n
], . . . [a + (n 1) ·
b a
n
, b].
Each interval has length x = (b a)/n. The last endpoint b
is a + n ·
b a
n
.
Math 10A Integrals, areas, Riemann sums
There are n intervals. Choose x
1
in the first interval, x
2
in the
second interval, etc. The Riemann sum attached to these
choices is
b a
n
(f (x
1
) + f (x
2
) + · · · + f (x
n
)) .
It’s the sum of the areas of n rectangles, each having base
b a
n
. The heights of the rectangles are f (x
1
), f (x
2
),. . . , f (x
n
).
The Riemann sum is an approximation to the true area. As
n and the rectangles get thinner, the approximation gets
better and better.
Math 10A Integrals, areas, Riemann sums
The integral
Z
b
a
f (x) dx is the limit of the Riemann sums as
n .
The choices of the points x
i
in the intervals is irrelevant. It is
most common to take the x
i
to be the left- or the right-endpoints
of the intervals. One could take them to be in the middle of the
intervals.
Math 10A Integrals, areas, Riemann sums
A simple example
To see
Z
1
0
x dx as a limit of Riemann sums, divide the interval
[0, 1] into n equal pieces and let the x
i
be the right endpoints of
the resulting small intervals:
x
1
=
1
n
, x
2
=
2
n
, . . . , x
n
=
n
n
.
The Riemann sum is
1
n
1
n
+
2
n
+
3
n
+ · · · +
n
n
=
1
n
2
(1 + 2 + 3 + · · · + n)
=
1
n
2
n(n + 1)
2
1
2
.
Math 10A Integrals, areas, Riemann sums
We used that the arithmetic progression 1 + 2 + · · · + n has
sum
n(n + 1)
2
, a fact that can be explained easily on the
document camera.
This is a completely silly way to find the area of a right triangle
with base and height both equal to 1.
Math 10A Integrals, areas, Riemann sums
We used that the arithmetic progression 1 + 2 + · · · + n has
sum
n(n + 1)
2
, a fact that can be explained easily on the
document camera.
This is a completely silly way to find the area of a right triangle
with base and height both equal to 1.
Math 10A Integrals, areas, Riemann sums
To find
Z
1
0
x
2
dx, we’d need to know the formula
1
2
+ 2
2
+ 3
2
+ · · · + n
2
=
n(n + 1)(2n + 1)
6
.
There are similar formulas for the sum of the k th powers of the
first n integers, though knowing the full formulas is not
necessary for computing the limits of the Riemann sums.
The Fundamental Theorem of Calculus just tells us that
Z
1
0
x
k
dx =
1
k + 1
for k 1, so we don’t need explicit formulas
to compute integrals.
Math 10A Integrals, areas, Riemann sums
To find
Z
1
0
x
2
dx, we’d need to know the formula
1
2
+ 2
2
+ 3
2
+ · · · + n
2
=
n(n + 1)(2n + 1)
6
.
There are similar formulas for the sum of the k th powers of the
first n integers, though knowing the full formulas is not
necessary for computing the limits of the Riemann sums.
The Fundamental Theorem of Calculus just tells us that
Z
1
0
x
k
dx =
1
k + 1
for k 1, so we don’t need explicit formulas
to compute integrals.
Math 10A Integrals, areas, Riemann sums
A 2016 midterm problem
Express
Z
1
1
cos x dx as a limit of Riemann sums.
This problem came from the textbook: it’s #12 of §5.3 with the
absolute value signs removed (to make the problem easier).
There is no single correct answer because the user (you) gets
to choose the points x
i
.
Divide the interval [1, 1] into n equal segments and use left
endpoints for the x
i
. The intervals have length
2
n
, so the
Riemann sum with n pieces is
2
n
n1
X
i=0
cos
1 +
2i
n
.
The integral is the limit of this sum as n approaches .
Math 10A Integrals, areas, Riemann sums
A 2016 midterm problem
Express
Z
1
1
cos x dx as a limit of Riemann sums.
This problem came from the textbook: it’s #12 of §5.3 with the
absolute value signs removed (to make the problem easier).
There is no single correct answer because the user (you) gets
to choose the points x
i
.
Divide the interval [1, 1] into n equal segments and use left
endpoints for the x
i
. The intervals have length
2
n
, so the
Riemann sum with n pieces is
2
n
n1
X
i=0
cos
1 +
2i
n
.
The integral is the limit of this sum as n approaches .
Math 10A Integrals, areas, Riemann sums
A 2016 midterm problem
Express
Z
1
1
cos x dx as a limit of Riemann sums.
This problem came from the textbook: it’s #12 of §5.3 with the
absolute value signs removed (to make the problem easier).
There is no single correct answer because the user (you) gets
to choose the points x
i
.
Divide the interval [1, 1] into n equal segments and use left
endpoints for the x
i
. The intervals have length
2
n
, so the
Riemann sum with n pieces is
2
n
n1
X
i=0
cos
1 +
2i
n
.
The integral is the limit of this sum as n approaches .
Math 10A Integrals, areas, Riemann sums
A 2016 midterm problem
Express lim
n→∞
n
X
i=1
1
2i
n
2
n
in the form
Z
1
0
f (x) dx.
This is problem 4 of §5.3 of the textbook.
We can write the expression before taking the limit as
2
n
n
X
i=1
1
2i
n
.
This looks like a Riemann sum for an interval of integration of
length 2. Because you’re asked to shoehorn the problem into
an integral
Z
1
0
· · · dx, the problem is challenging.
Math 10A Integrals, areas, Riemann sums
A 2016 midterm problem
Express lim
n→∞
n
X
i=1
1
2i
n
2
n
in the form
Z
1
0
f (x) dx.
This is problem 4 of §5.3 of the textbook.
We can write the expression before taking the limit as
2
n
n
X
i=1
1
2i
n
.
This looks like a Riemann sum for an interval of integration of
length 2. Because you’re asked to shoehorn the problem into
an integral
Z
1
0
· · · dx, the problem is challenging.
Math 10A Integrals, areas, Riemann sums
It helps to write the sum as
1
n
n
X
i=1
2
1
2i
n
,
to make the x term into the expected
1
n
.
To have
1
n
n
X
i=1
2
1
2i
n
=
1
n
n
X
i=1
f (
i
n
),
we take f (x) = 2(1 2x) = 2 4x.
Math 10A Integrals, areas, Riemann sums
Yet more challenging
Evaluate the limit lim
n→∞
n
X
i=1
1
2i
n
2
n
.
Once we write the limit as
Z
1
0
(2 4x) dx, we can evaluate the
integral and be finished. The integral is
(2x 2x
2
)
i
1
0
= 0.
This is plausible because the terms
1
2i
n
are positive for i
small and negative for i near n. The first term in the
parentheses is 1
2
n
> 0 (for n > 2) and the last term is 1.
Apparently there’s cancellation!
Math 10A Integrals, areas, Riemann sums
Substitution
The chain rule states:
d
dx
(F (u)) = F
0
(u)
du
dx
.
Thus, in the world of antiderivatives:
Z
F
0
(u)
du
dx
dx = F (u) + C.
It is natural to cancel the two factors dx and write this as
Z
F
0
(u) du = F (u) + C.
Further, if F
0
is given as a function f and F is introduced as an
antiderivative of f , then we have the formula
Z
f (u) du = F (u) + C,
where F is an antiderivative of f .
Math 10A Integrals, areas, Riemann sums
This makes sense after we do examples: Evaluate
Z
cos(x
2
)2x dx.
It’s up to us to introduce u, so we set
u = x
2
,
du
dx
= 2x, du = 2x dx.
In terms of u, the integral to be evaluated is
Z
cos u du = sin(u) + C = sin(x
2
) + C.
In other words, we computed sin(x
2
) as an antiderivative of
2x cos(x
2
).
Conclusion: if you need to evaluate an indefinite integral and
can’t see the antiderivative immediately, try to make the
integrate simpler by a judicious substituion u = · · · (some
function of x).
Math 10A Integrals, areas, Riemann sums
This makes sense after we do examples: Evaluate
Z
cos(x
2
)2x dx.
It’s up to us to introduce u, so we set
u = x
2
,
du
dx
= 2x, du = 2x dx.
In terms of u, the integral to be evaluated is
Z
cos u du = sin(u) + C = sin(x
2
) + C.
In other words, we computed sin(x
2
) as an antiderivative of
2x cos(x
2
).
Conclusion: if you need to evaluate an indefinite integral and
can’t see the antiderivative immediately, try to make the
integrate simpler by a judicious substituion u = · · · (some
function of x).
Math 10A Integrals, areas, Riemann sums
This makes sense after we do examples: Evaluate
Z
cos(x
2
)2x dx.
It’s up to us to introduce u, so we set
u = x
2
,
du
dx
= 2x, du = 2x dx.
In terms of u, the integral to be evaluated is
Z
cos u du = sin(u) + C = sin(x
2
) + C.
In other words, we computed sin(x
2
) as an antiderivative of
2x cos(x
2
).
Conclusion: if you need to evaluate an indefinite integral and
can’t see the antiderivative immediately, try to make the
integrate simpler by a judicious substituion u = · · · (some
function of x).
Math 10A Integrals, areas, Riemann sums
It would be more common to encounter the indefinite integral
Z
cos(x
2
)x dx;
the factor “2” has disappeared. Again, we set u = x
2
and write
du = 2x dx, x dx =
1
2
du. In terms of u, the integral becomes
Z
cos u
1
2
du =
sin(u)
2
+ C =
sin(x
2
)
2
+ C.
Math 10A Integrals, areas, Riemann sums