McGill University Department of Mathematics and Statistics
MATH 243 Analysis 2, Winter 2023
Assignment 4: Solutions
1. (a) Let f and g be Riemann integrable on [a,b] such that f(x) ≤ g(x) for all x ∈ [a,b]. Prove b b
that f ≤ g. aa
(b) Let f be Riemann integrable on [a,b] and let M ∈ R be a constant such that |f(x)| ≤ M b
forallx∈[a,b]. Provethat f≤M(b−a). a
(a) 1. Solution: Using assignment 3, question 4
Let h := g − f . Then h is Riemann integrable and non-negative. It follows from assignment
bb bb bb
3, question 4, that h = (g − f) = g − f ≥ 0 which implies that f ≤ g.
2. Solution: Directly using the definition of Riemann integrability
Let P be an arbitrary partition of [a, b]. Then we have that f ≤ g on all partition intervals [xi−1,xi]. Let 1 ≤ i ≤ n. Then
∀x ∈ [xi−1,xi] : f(x) ≤ g(x) ≤ Ni := sup{g(x) : x ∈ [xi−1,xi]}
Consequently, Ni is an upper bound for {f(x) : x ∈ [xi−1,xi]}. Since Mi := sup{f(x) : x ∈
[xi−1, xi]} is the least upper bound of this set, it now follows that Mi ≤ Ni i.e. we have that ∀1≤i≤n:Mi :=sup{f(x):x∈[xi−1,xi]}≤Ni :=sup{g(x):x∈[xi−1,xi]}
Consequently, it follows that ∀1 ≤ i ≤ n: Mi(xi − xi−1) ≤ Ni(xi − xi−1), and thus that
U(f,P)=Mi(xi −xi−1)≤Ni(xi −xi−1)=U(g,P)
We thus conclude that U(f,p) ≤ U(g,P) for all partitions P of [a,b]. This implies immedi-
ately that
U(f) = inf {U(f,P) : P ∈ P[a,b]} ≤ U(f,P) ≤ U(g,P)
i.e. for all partitions P of [a,b] we have that U(f) ≤ U(g,P). But this just means that U(f)
is a lower bound for {U(g,P) : P ∈ P[a,b]}. And since U(g) = inf {U(g,P) : P ∈ P[a,b]} is
the greatest lower bound of this set, we’ve established that U(f) ≤ U(g). b
Finlly, since f and g are Riemann integrable on [a,b], we know that
g. We’ve thus proven that f ≤ g. aaa
f = U(f) ≤ U(g) =
Github
(b) Since |f| < M on [a, b] we have that −M ≤ f ≤ M, where −M and M are constant functions on [a, b]. It thus follows from part (a) that
(−M)≤ f ≤ M ⇒−M(b−a)≤ f ≤M(b−a)
aaaa b
and thus f ≤ M(b − a). a
2. Let f : [a, b] → R be Riemann integrable and let k ∈ R. Prove that kf is Riemann integrable b b
and that (kf) = k f. aa
Hint: You may use, without proof, the following facts, established in Analysis 1:
Let S be a non-empty and bounded subset of R and let k ∈ R. Denote by kS the set kS :=
{ks : s ∈ S}. Then kS is bounded, and we have the following: Ifk>0,thensup(kS)=ksupSandinf(kS)=kinfS.
sup(−S) = −inf S and inf (−S) = −sup S, where −S is used as a shortcut notation for (−1)S .
Let P = {x0 = a,…,xn = b} be an arbitrary partition of [a,b]. We will distinguish several cases:
1. Case: k=0 bbbb
(kf) = 0 = 0 = 0 · f = k f aaaa
2. Case: k>0
n L(kf,P)=inf{kf(x):x∈[xi−1,xi]}(xi −xi−1)
=kinf{f(x):x∈[xi−1,xi]}(xi −xi−1) i=1
=kinf{f(x):x∈[xi−1,xi]}(xi −xi−1)
Consequently, we have that
L(kf) = sup{L(kf,P) : P ∈ P[a,b]} = sup{kL(f,P) : P ∈ P[a,b]}
= ksup{L(f,P) : P ∈ P[a,b]} = kL(f)
In the exact same fashion it follows that U(kf) = kU(f). Finally, since f is Riemann integrable
we know that L(f) = U(f). Thus U(kf) = kU(f) = kL(f) = L(kf) which proves that kf is b b
Riemann integrable with (kf) = U(kf) = kU(f) = k f. aa
3. Case: k = −1
n L(−f,P)=inf{−f(x):x∈[xi−1,xi]}(xi −xi−1)
=−sup{f(x):x∈[xi−1,xi]}(xi −xi−1) i=1
=−sup{f(x):x∈[xi−1,xi]}(xi −xi−1)
Consequently, we have that
L(−f) = sup{L(−f,P) : P ∈ P[a,b]} = sup{−U(f,P) : P ∈ P[a,b]}
= −inf {U(f,P) : P ∈ P[a,b]} = −U(f)
In the exact same fashion it follows that U(−f) = −L(f). Finally, since f is Riemann integrable
we know that L(f) = U(f). Thus U(−f) = −L(f) = −U(f) = L(−f) which proves that −f is b b
Riemann integrable with 4. Case: k<0
(−f) = U(−f) = −L(f) = − f. aa
b 3. Case b 2. Case (−|k|f) = − (|k|f) = −|k|
This proves the result in all cases.
3. Use induction to prove that if f1,...,fn are Riemann integrable on [a,b] and k1,...,kn ∈ R, then the linear combination f := k1f1 + . . . knfn is Riemann integrable on [a, b] and
f = k1 f1 + · · · + kn fn
We will use induction by n.
Base Case n = 1: If f1 is Riemann integrable on [a,b], k1 ∈ R and f := k1f1 then, by the
linearity of the integral, f = k1f1 = k1 f1. q.e.d.
Inductive Step n → n + 1: Assume that if f1, . . . , fn are Riemann integrable on [a, b] and k1, . . . , kn ∈ bbb
R,thenf :=k1f1+...knfn isRiemannintegrableon[a,b]and f =k1 f1+···+kn fn. aaa
Now let f1,...,fn+1 be Riemann integrable on [a,b] and k1,...,kn+1 ∈ R. Let f := k1f1 + . . . knfn + kn+1fn+1
Then g is Riemann integrable on [a, b] by the induction hypothesis and h is Riemann integrable on [a, b] by the base case. Thus, by the linearity of the integral, f is Riemann integrable on [a, b]
f = (g + h) = g + h
Again applying the the induction hypothesis and the base case, we get
bbbb bb
f = g+ h= k1 f1 +···+kn fn +kn+1 fn+1 aaaaaa
bbb =k1 f1 +···+kn fn +kn+1 fn+1 aaa
This concludes the inductive step and completes the proof.
Programming Help
4. Let c1,…,cn ∈ [a,b] with c1 < c2 < ··· < cn.
(a) Let f : [a,b] → R be a function such that f(x) = 0 for all x ∈ [a,b] \ {c1,...,cn}. Prove
(b) Let f : [a,b] → R and g : [a,b] → R be functions such that f(x) = g(x) for all x ∈
that f is Riemann integrable on [a, b] and that Hint: Use question 3 and the previous assignment.
[a, b]\{c1, . . . , cn}. Prove that if f is Riemann integrable on [a, b] then g is Riemann integrable b b
on [a,b] and f = g. aa
(a) Foralli∈N,1≤i≤ndefineki :=f(ci)and
fi :[a,b]→R, fi(x):= 0 ifx̸=ci
Then f = k1f1 + ··· + knfn. By a problem on assignment 3, we know that f1,...,fn are Riemann integrable on [a, b] with integral 0. Furthermore, it follows from problem 3 that f is Riemann integrable on [a, b] and that
f =k1 f1 +···+kn fn =0+···+0=0
This is what we had to show.
(b) Let h := g−f. Then h(x) = 0 for all x ∈ [a,b]\{c1,...,cn}. By part (a), h is Riemann
integrable on [a, b] and
Now assume that f is Riemann integrable. Then g = f + h; since both f and h are Riemann
integrable on [a,b], g is Riemann integrable on [a,b] and g = f + h = f. aaaa
0 ifa≤x
7. Findfunctionsf,g:[0,1]→RsuchthatU(f+g)L(f)+L(g). Hint: We’ve seen in class that if f and g are Riemann integrable, then
U(f + g) = L(f + g) =
111 (f + g) = f +
000 111
(f + g) = f + 000
g = U(f) + U(g) and g = L(f) + L(g)
f and g thus cannot both be Riemann integrable. Solution:
Let f be the Dirichlet function i.e. let f(x) :=
1 ifx∈Q 0 ifx̸∈Q
, and let g := 1 − f. Then
Now let P = {x0 = 0,…,xn = 1} be an arbitrary partition of [0,1]. Since both Q and R \ Q are dense in R, every partition interval [xi−1,xi] contains at least one rational and at least one irrational number. Consequently, we have for all 1 ≤ i ≤ n that
sup{f(x) : x ∈ [xi−1,xi]} = 1, inf {f(x) : x ∈ [xi−1,xi]} = 0 sup{g(x) : x ∈ [xi−1,xi]} = 1, inf {g(x) : x ∈ [xi−1,xi]} = 0 sup{(f+g)(x):x∈[xi−1,xi]}=1, inf{(f+g)(x):x∈[xi−1,xi]}=1
0 ifx∈Q 1 ifx̸∈Q
. Wealsohavethatf+g≡1.
Consequently,
U(f,P)=sup{f(x):x∈[xi−1,xi]}(xi −xi−1)=1·(xi −xi−1)=xn −x0 =1−0=1
i=1 i=1 nn
L(f,P)=inf{f(x):x∈[xi−1,xi]}(xi −xi−1)=0·(xi −xi−1)=0 i=1 i=1
nn U(g,P)=sup{g(x):x∈[xi−1,xi]}(xi −xi−1)=1·(xi −xi−1)=1
i=1 i=1 nn
L(g,P)=inf{g(x):x∈[xi−1,xi]}(xi −xi−1)=0·(xi −xi−1)=0 i=1 i=1
U(f + g,P) = sup{(f + g)(x) : x ∈ [xi−1,xi]}(xi − xi−1) = 1 · (xi − xi−1) = 1
i=1 i=1 nn
L(f + g, P ) = inf {(f + g)(x) : x ∈ [xi−1, xi]}(xi − xi−1) = 1 · (xi − xi−1) = 1
L(f) = sup{L(f,P) : P ∈ P[0,1]}
L(g) = sup{L(g,P) : P ∈ P[0,1]} L(f+g)=sup{L(f+g,P):P ∈P[0,1]}=1
U(f) = inf {U(f,P) : P ∈ P[0,1]} = 1, U(g) = inf {U(g,P) : P ∈ P[0,1]} = 1, U(f+g)=inf{U(f+g,P):P ∈P[0,1]}=1,
We thus finally get that U(f + g) = 1 < 2 = U(f) + U(g) and L(f + g) = 1 > 0 = L(f) + L(g).