0 if x = 0
McGill University Department of Mathematics and Statistics
MATH 243 Analysis 2, Winter 2023
Assignment 6: Solutions
f(x) := Prove that f is Riemann integrable on [0, 1].
Then α is constant on [0,4ε] except (potentially) at the right endpoint; thus α is Riemann integrable on this interval. Furthermore, α is continuous on [ 4ε , 1] (as a composition of two continuous functions) and is thus Riemann integrable on this interval as well. Since α is Riemann integrable on both [0, 4ε ] and [ 4ε , 1], it follows from additivity that α is Riemann integrable on [0, 1]. The same argument shows that ω is Riemann integrable on [0, 1].
Furthermore, it follows immediately from −1 ≤ sin(1/x) ≤ 1 that α ≤ f ≤ ω on [0, 1]. Finally, by additivity
1 ε/4 1 ε/41ε
(ω − α) = (ω − α) + (ω − α) = 2 + 0 = 2 < ε
0 0 ε/4 0 ε/4
It now follows from the squeeze theorem that f is Riemann integrable on [0, 1].
Hint: Use additivity and the squeeze theorem. Note that you are not expected to compute You may assume, without proof, that the sine function is continuous.
Let ε > 0 be arbitrary. Define functions α, ω : [0, 1] → R as follows:
−1 for 0 ≤ x < 4ε 1 for 0 ≤ x < 4ε
α(x):= sin(1/x) for 4ε ≤x≤1 ω(x):= sin(1/x) for 4ε ≤x≤1
Programming Help
2. LetF :[−1,1]→R,
Prove that F is differentiable but that F ′ is not Riemann integrable on [−1, 1].
x2 cos(1/x2) if x ̸= 0
0 if x = 0 ′1
Hint: Consider F (xk) where xk := 2kπ + π/2 for all k ∈ N. Solution:
If x ̸= 0 then
F ′(x) = 2x cos(1/x2) − x2 sin(1/x2) · (−2) · 1 = 2x cos(1/x2) + 2 sin(1/x2)
To prove differentiability of F at 0 we need to use the limit definition of the derivative.
F′(0)= lim F(x)−F(0) = lim x2cos(1/x2) = limxcos(1/x2) x→0 x−0 x→0 x x→0
Now −|x| ≤ x cos(1/x2) ≤ |x|, where lim ±|x| = 0. It follows from the squeeze theorem that x→0
F ′(0) = lim x cos(1/x2) = 0. Summarizing the above we get x→0
2x cos(1/x2) + 2 sin(1/x2) F′(x) = x
if x ̸= 0 if x = 0
F isunboundedon[−1,1]. Letxk := 2kπ+π/2. Thenxk ∈[0,1]⊂[−1,1]forallk∈Nand
′ π2ππ√√√ F(xk)=2xkcos(2kπ+2)+x sin(2kπ+2)=2 2kπ+2≥2 2kπ≥2 4k=4 k
which implies that lim(F′(xk)) = ∞. Especially, F′ is unbounded and thus not Riemann integrable on [−1, 1].
It remains to show that F ′ is not Riemann integrable on [−1, 1]. We will do this by showing that
CS Help, Email: tutorcs@163.com
3. (a) Suppose that f is continuous on [a,b], that f(x) ≥ 0 for all x ∈ [a,b] and that Prove that f(x) = 0 for all x ∈ [a,b].
f = 0. (b) Show by providing a concrete counterexample that the continuity condition in part (a)
cannot be dropped.
(a) 1. Solution:
Let x ∈ [a, b] be arbitrary. Then, by additivity,
bxb 0=f=f+f
x b f = ax
Now let F be an antiderivative of f (which exists, since f is continuous on [a, b]). Then it
follows from FTC, part 1, that F(x) − F(a) = f = 0 and thus that F(x) = F(a) for all
x ∈ [a, b]. This means especially that F is constant on [a, b]. Hence F = f ≡ 0 on [a, b].
2. Solution:
We prove this by contradiction. Assume that f is not constantly 0 on [a, b]. Then f is not
constantly 0 on ]a, b[ either, since otherwise (by the continuity of f ) f (a) = lim f (x) = 0 x→a+
and f(b) = lim f(x) = 0. Thus there exists a c ∈]a,b[ with f(c) > 0. It was shown last x→b−
semester that this implies that there exists an ε > 0 such that [c − ε, c + ε] ⊆ ]a, b[ and f (x) ≥ 12 f (c) for all x ∈ [c − ε, c + ε]. Now define the step function g : [a, b] → R as follows:
0 if x ∈ [a, c − ε[ g(x):=12f(c) ifx∈[c−ε,c+ε]
0 if x ∈]c − ε, b]
By construction, f(x) ≥ g(x) for all x ∈ [a,b]. Since f and g are Riemann integrable, this
implies that f ≥ g = 2f(c)[(c + ε) − (c − ε)] = f(c)ε > 0 which is a contradiction.
Thus f is constantly 0 on [a, b] which is what we had to prove. (b) Consider the function f : [−1, 1] → R defined by
which has a (removable) discontinuity at 0. It follows that f is Riemann integrable on [−1, 1] 1
This implies that
and that equal to 0.
f = 0. Obviously, we have f(x) ≥ 0 for all x ∈ [−1,1] but f is not constantly
4. Let f : [0,1] → R be continuous and let f = f for all x ∈ [0,1]. Prove that f is constantly
equal to 0 on [0, 1].
1. Solution: Using the Fundamental Theorem of Calculus (FTC) Part 1:
Let F be any antiderivative of f on [a, b] (which exists since f is continuous on [0, 1]). Then it follows from the FTC Part 1 that
F(x)−F(0)= f = f =F(1)−F(x)
for all x ∈ [0,1]. Thus F(x) = 12[F(0) + F(1)] for all x ∈ [0,1] i.e. F is constant on [0,1].
Consequently, f = F ′ ≡ 0 on [0, 1] which is what we had to prove.
2. Solution: Using the Fundamental Theorem of Calculus (FTC) Part 2:
LetF(x):= f andletG(x):= f. ItfollowsfromtheFTCPart2thatF′ =G′ =f on
[0, 1]. We thus have
F (x) + G(x) = f + f = f − f = f − f ≡ 0 on [0, 1]
xxx1xx 010×00
Hence (F + G)′ = F ′ + G′ = 2f ≡ 0 on [0, 1] which implies that f ≡ 0 on [0, 1].
Computer Science Tutoring
5. Let f : [0, 1] → R, where
(a) WefirstexplicitlycomputeF: sincef ≥0on[0,1]wehavethat 1
Furthermore, we know from a previous assignment that
which implies that
1 ifx∈{n1:n∈N} 0 otherwise
Note that f is Riemann integrable on [0,1] by a previous assignment. Let F : [0,1] → R,
(a) Prove that F is differentiable on [0, 1].
(b) Find a c ∈ [0,1] such that f is discontinuous at c and F′(c) = f(c).
(c) Find a d ∈ [0,1] such that f is discontinuous at d and F′(d) ̸= f(d).
Remark: This shows that if the indefinite integral F of a Riemann integrable function f is
differentiable at a point c where f is discontinuous, then F′(c) may or may not equal f(c). Solution:
1x1 0=f=f+f
00x
(b) Let c := 0. We need to show that f is discontinuous at c: lim(1/n) = 0 = c but lim(f(1/n)) = lim(1) = 1 ̸= 0 = f(c). Thus f is indeed discontinuous at c = 0. Furthermore, F′(c) = 0 = f(c) which is what we had to show.
(c)Letd:=n1 foranyn∈N(e.g. d=1). Weneedtoshowthatfisdiscontinuousatd: Let S := {n1 : n ∈ N} and let xn be a sequence in [0,1]\S with lim(xn) = d (pick e.g. a
sequence of irrational numbers converging to d which is possible due to the density of R \ Q in R). Then lim(f(xn)) = lim(0) = 0 ̸= f(d) = 1. Thus f is indeed discontinuous at d. Furthermore, F′(d) = 0 ̸= f(d) = 1 which is what we had to show.
f = 0 for all x ∈ [0,1] i.e. that F ≡ 0 on [0,1]. From this it trivially
follows that F is differentiable on [0, 1] with F ≡ 0.
f ≥0forall[c,d]⊆[a,b]. f = 0. By additivity,