approximate integration)
Week 8: March 10 - March 14
Questions marked (*) are included in the tutorial presentations
1. (*) True or False? If the statement is true then give a short proof or reference to a
theorem in the book. If the statement is false then give a counterexample.
(a) Let f : [a, b] [c, d] be integrable on [a, b] and let g : [c, d] R be continuous.
Then g f R[a, b].
True. This is the Composition Theorem from Lecture 12.
(b) Let f : [a, b] [c, d] be integrable on [a, b] and let g : [c, d] R be integrable.
Then g f R[a, b].
False. For example, dene f, g : [0, 1] R by
f(x) =
_
1
q
x Qand x =
p
q
with gcd(p, q) = 1
0 x R \ Q
(i.e. f is Thomaes function) and
g(x) =
_
0 x = 0
1 x (0, 1]
Then f and g are both integrable, however g f is
g f(x) =
_
1 x Q
0 x R \ Q
which is not integrable. (Dirichlet function)
(c) If f R[a, b] then the trapezoidal approximation always converges to the integral
as n , i.e. lim
n
T
n
(f) =
_
b
a
f dx.
True. We know that the trapezoidal approximation satises
T
n
(f) =
1
2
(L
n
(f) + R
n
(f))
and that lim
n
L
n
(f) =
_
b
a
f dx and lim
n
R
n
(f) =
_
b
a
f dx. Therefore
lim
n
T
n
(f) =
1
2
__
b
a
f dx +
_
b
a
f dx
_
=
_
b
a
f dx.
1
(d) If f R[a, b] then the trapezoidal approximation always gives a better approxi-
mation than both of the left-hand and right-hand approximations, i.e. for every
n N we have
T
n
(f)
_
b
a
f dx
L
n
(f)
_
b
a
f dx
and
T
n
(f)
_
b
a
f dx
R
n
(f)
_
b
a
f dx
False. We can consider any example where the left-hand approximation is equal
to the integral but the right-hand approximation is not (or vice versa). Consider
for example the step function f : [0, 1] R given by
f(x) =
_
0 x
_
0,
1
2
_
1 x
_
1
2
, 1
Then L
2
(f) =
1
2
0+
1
2
1 =
1
2
=
_
1
0
f dx, however R
2
(f) =
1
2
1+
1
2
1 = 1. Therefore
T
2
(f) =
1
2
(L
2
(f) + R
2
(f)) =
3
4
. In this case the left-hand approximation gives an
exact approximation to the integral, however the trapezoidal approximation does
not.
(e) If f R[a, b] then the trapezoidal approximation always gives a better approx-
imation than one of the left-hand and right-hand approximations, i.e. for every
n N we have
either
T
n
(f)
_
b
a
f dx
L
n
(f)
_
b
a
f dx
or
T
n
(f)
_
b
a
f dx
R
n
(f)
_
b
a
f dx
x + y
2
z
|x z| or
x + y
2
z
|y z|.
If x = y then the statement is obvious. If x < y then we can divide into two cases:
If z
x+y
2
< y then the second inequality is true.
If z
x+y
2
> x then the rst inequality is true.
The proof is similar if x > y.
The answer to the question then follows by setting x = L
n
(f), y = R
n
(f) and
noting that T
n
(f) =
1
2
(L
n
(f) + R
n
(f)) =
x+y
2
. Then let z =
_
b
a
f dx and apply
the above result.
2
(f) If f R[a, b] then the left-hand and right-hand approximations always converge
to the integral as n , i.e.
lim
n
L
n
(f) =
_
b
a
f dx and lim
n
R
n
(f) =
_
b
a
f dx
True. The left-hand and right-hand approximations are simply Riemann sums
with a special choice of tag points. Since f is Riemann integrable then the left-
hand and right-hand approximations converge to the integral as n , since
the size of the partition approaches zero.
2. (*) Let f and g be integrable functions on [a, b], and for x [a, b], dene F(x) =
_
x
a
f(t) dt and G(x) =
_
x
a
g(t) dt with F(a) = G(a) = 0. Suppose that F = G on [a, b]
and that F and G are both dierentiable. Does this imply that f = g on [a, b]? If
not, give a simple counterexample. What extra condition can guarantee that f = g on
[a, b]?
Solution. The original statement is not true, since, for example, we could let f = 0
and let
g(x) =
_
1 x = a
0 x (a, b]
Then F = G = 0, but f = g.
If we also assume that f g is continuous then F = G implies that f = g. To see this,
note that
0 = (F G)(x) =
_
x
a
(f(t) g(t)) dt
and, since f g is continuous, then (F G)
_
b
a
f dx T
n
(f)
b a
2n
(f(a) f(b)) .
When b = 1 and a = 0 then f(b) =
1
2
and f(a) = 0 and so we have
_
1
0
f dx T
n
(f)
1
4n
.
Therefore the error in the approximation to for n = 5 is less than or equal to
4
4n
=
1
5
.
(c) A calculation shows that
f
(x) =
2x
(1 + x
2
)
2
, f
(x) =
2
(1 + x
2
)
2
+
8x
2
(1 + x
2
)
3
To nd the maximum and minimum of f
(x) =
8x
(1 + x
2
)
3
+
16x
(1 + x
2
)
3
+
(3) 2x 8x
2
(1 + x
2
)
4
=
24x(1 x
2
)
(1 + x
2
)
4
.
This is non-negative on the interval [0, 1], and so f
(0) = 2 and f
(1) =
8
2
3
= 1.
Therefore |f
(c)
6
for some c [a, b]. In our case, this becomes
T
n
(f)
_
b
a
f dx
1
6n
2
and so the error in the approximation for is bounded by
4
6n
2
.
(d) Recall that the monotone error in our approximation for is bounded by
1
n
and
the C
2
error estimate is bounded by
4
6n
2
. Therefore, if we take n 10
4
, then the
monotone estimate guarantees that our error will be less than 10
4
. If we take
n
_
4
6
10
4
then the C
2
estimate guarantees that our error will be less than
10
4
.
We see in this case that it is worth doing the extra work to compute the C
2
error
estimate, since we can take a smaller value of n to get the same bound on the
error.
(e) We can compute the power series for arctan x (which is equal to the Taylor series
on the interval of convergence). On the interval (1, 1) we can use term-by-term
integration
arctan x =
_
x
0
1
1 + t
2
dt =
_
x
0
_
n=0
(1)
n
t
2n
_
dt
=
n=0
(1)
n
_
x
0
t
2n
dt
=
n=0
(1)
n
x
2n+1
2n + 1
The radius of convergence of this series is R = 1, and so the term-by-term inte-
gration is valid for all x (1, 1).
The series converges at x = 1 by the alternating series test. We can prove (well
do this later in the semester) that the power series is then continuous at x = 1
and so
4
= arctan 1 = lim
x1
n=0
(1)
n
x
2n+1
2n + 1
(power series for arctan on (1, 1))
=
n=0
(1)
n
1
2n + 1
(continuity of power series at x = 1)
7
The above process is necessary to make this series representation of
4
rigorous.
Once we have the series for
4
then we can use the error estimate from the alter-
nating series test to compute a bound for the error.
Recall that if a
n
is a decreasing sequence that converges to zero, then we have the
estimate
n=1
(1)
n
a
n
n=1
(1)
n
a
n
n=N+1
(1)
n
a
n
a
N+1
.
Therefore the error in the approximation using n terms
4
N1
n=0
(1)
n
1
2n + 1
is less than or equal to
4
2N+1
.
In summary, we have three dierent bounds on the error for our dierent methods
in approximating
4
.
Trapezoidal monotone error estimate.
_
1
0
f dx T
n
(f)
1
4n
Trapezoidal C
2
error estimate.
_
1
0
f dx T
n
(f)
1
6n
2
Taylor series error estimate.
arctan 1
n1
k=0
(1)
k
1
2k + 1
1
2n + 1
.
For large values of n, we see that the Trapezoidal C
2
approximation gives the best
bound on the error.
8