Solutions to some additional M2P1 exercises
Exercise. Let f be the function defined as follows:
x,
f (x) =
1 + x,
x < 0,
x 0.
Prove in two different ways that f is not continuous at 0.
Solution.
Method 1. To get a contradiction, let us suppose that f is continuous at 0. Then for every > 0 there is
a > 0 such that | x| < |f (x) f (0)| < . Let us take = 12 . Then there exists a > 0 such that
| x| < |f (x) 1| < 12 . However, for any > 0, setting x = 2 , we find that 0 < 2 = | x| < but
|f (x) 1| = 1 + 2 12 . Contradiction. Hence f is discontinuous at 0.
Method 2. We can also use the theorem linking continuity with sequences. Let (xn ) and (yn ) be sequences such that xn = n1 and yn = n1 , n N. Then f (xn ) = 1 + n1 1 whereas f (yn ) = n1 0.
Hence f is not continuous at 0 by Theorem 6.5 (M1P1).
Exercise. Define f : R2 R such that f (x) = x1 x2 for all x = (x1 , x2 ) R2 . Prove (directly from the
definition of continuity) that this function is continuous at all a = (a1 , a2 ) R2 .
Solution. Let a R2 . Fix > 0. Observe that inequalities |x1 a1 | |x a| and |x2 a2 | |x a|
are obviously valid. Then we observe
|f (x) f (a)| = |x1 x2 a1 a2 | = |x1 x2 a1 x2 + a1 x2 a1 a2 | |x2 ||x1 a1 | + |a1 ||x2 a2 |
(|x2 | + |a1 |)|x a| (|x2 a2 | + |a2 | + |a1 |)|x a| | x a|2 + (| a1 | + | a2 |)| x a|.
Now we can use two methods to choose , dependent on the taste.
Method 1. Let = min{1, /(1 + |a1 | + |a2 |)}. Let |x a| < . Then |x2 | |x2 a2 | + |a2 |
|xa|+|a2 | < 1+|a2 |, so by the above estimates we can conclude |f (x)f (a)| (|x2 |+|a1 |)|xa| <
(1 + |a2 | + |a1 |) .
2 12
a2 |
| a1 |+| a2 |
Method 2. We can use | xa|2 +(| a1 |+| a2 |)| xa| < | xa|+ | a1 |+|
<
+
,
2
2
2 12
2 12
| a1 |+| a2 |
| a1 |+| a2 |
| a1 |+| a2 |
which is equivalent to | xa| < +
. So, if we take = +
2
2
2
| a1 |+| a2 |
,
2
then > 0 and | f (x) f (a)| | x a|2 + (| a1 | + | a2 |)| x a| < by the estimates above.
Hence f is continuous at a R2 .
Exercise. Define f : R2 \{0} R by f (x) =
Justify your answer.
x1
|x|
for all x R2 \{0}. Does f have a limit as x 0?
Solution. This function f has no limit as x 0. Indeed, let us take sequences (zn ) and (yn ) defined by
zn = ( n1 , 0) and yn = (0, n1 ). Both sequences converge to (0, 0) but zn 6= (0, 0), yn 6= (0, 0) for all n.
Now, for all n 1, f (zn ) = 1 1, whereas f (yn ) = 0 0. Thus by the Theorem 6.5 (M1P1) and
Theorem 1.3 we conclude that there is no l R2 such that f (x) l as x 0.
Exercise. Suppose that f is a function such that f 0 (x) = 0 for all x R. Prove that f must be a constant
function.
Solution. Since f is differentiable everywhere, it is also continuous everywhere by Theorem 3.1. Let
a < b be two points in R. Then f is continuous on [a, b] and differentiable on (a, b). By the Mean Value
(a)
Theorem 4.3, there exists a c (a, b) such that f 0 (c) = f (b)f
. But by assumption we must have
ba
f 0 (c) = 0. This implies f (a) = f (b). Since the choice of a and b was arbitrary, it follows that f is
constant.
Theorem. Suppose that f is continuous on a closed interval [a, b]. Then f is bounded (both above and
below) on [a, b].
Proof. Assume that f is not bounded above on [a, b]. Then for all real numbers M there exists x [a, b]
such that f (x) > M . In particular, for every n N there exists some xn [a, b] such that f (xn ) > n.
Since a xn b, sequence (xn ) is bounded and by the Bolzano-Weierstrass Theorem has a convergent
subsequence, say (um ), converging to some u. By the basic property of closed intervals it follows that
u [a, b]. Since um u and f is continuous on [a, b], hence also at u, it follows that f (um ) f (u)
as m . Since (um ) is a subsequence of (xn ), we have um = xn for some index n m. It follows
that f (um ) = f (xn ) > n m. Hence f (um ) > m for all m N. This contradicts f (um ) f (u) as
m . Indeed, if we take any m N such that m f (u) + 1 we see that f (um ) > m f (u) + 1,
so that (f (um )) can not converge to f (u) as m . Repeating the proof for f we find that f is
bounded above, so f is also bounded below. This completes the proof.
Exercise. State true or false with reasoning:
(i) If f is bounded on [a, b] then f is continuous on [a, b].
(ii) If f is continuous on (a, b) then f is bounded on (a, b).
Solution. (i) False. Consider f defined by
f (x) =
1, x 1,
0, x < 1.
Then f is bounded on [0, 2] (e.g. by 2) but it is not continuous on the interval [0, 2] since it is discontinuous
at 1.
(ii) False. Consider f such that f (x) = x1 on the interval (0, 1). Then f is continuous at all a (0, 1) by
Theorem 1.3. However, f is not bounded on (0, 1). Indeed, let A > 0. Let = A1 > 0. Then 0 < x <
implies x < = A1 , so f (x) = x1 > A. Hence f is not bounded above (and hence not bounded) on the
interval (0, 1), even though it is continuous on (0, 1).
Exercise. Let g(x) m as x a and f (y) l as y m. Show that this does not imply f (g(x)) l
as x a.
Solution. Let g(x) = 0 for all x. Let a = 0. Then g(x) m = 0 as x a = 0. Define
1, y 6= 0,
f (y) =
0, y = 0
Then f (y) l = 1 as y m = 0 but f (g(x)) = f (0) = 0 0 6= 1 as x a = 0.