-
Notifications
You must be signed in to change notification settings - Fork 26
/
ch-contfunc.tex
3275 lines (2900 loc) · 111 KB
/
ch-contfunc.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\chapter{Continuous Functions} \label{lim:chapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Limits of functions}
\label{sec:limoffunc}
%mbxINTROSUBSECTION
\sectionnotes{2--3 lectures}
Before we define continuity of functions, we visit a somewhat
more general notion of a limit than that of a sequence.
Given a function $f \colon S \to
\R$, we want to see how $f(x)$ behaves as $x$ tends to a certain point.
\subsection{Cluster points}
First,
we return to a concept we have seen previously in an exercise.
When moving within the set $S$, we can only approach points
that have elements of $S$ arbitrarily near.
\begin{defn}
Let $S \subset \R$ be a set. A number $x \in \R$ is called
a \emph{\myindex{cluster point}} of $S$
if for every $\epsilon > 0$, the set $(x-\epsilon,x+\epsilon) \cap S
\setminus \{ x \}$ is not empty.
\end{defn}
That is, $x$ is a cluster point of $S$ if there are points of $S$
arbitrarily close to $x$. Another way to phrase the definition is to say
that $x$ is a cluster point of $S$ if for every $\epsilon > 0$, there
exists a $y \in S$ such that $y \not= x$ and $\abs{x - y} < \epsilon$.
Note that a cluster point of $S$ need not lie in $S$.
Let us see some examples.
\begin{enumerate}[(i)]
\item The set
$\{ \nicefrac{1}{n} : n \in \N \}$ has a unique cluster point zero.
\item The cluster points of the open interval $(0,1)$ are
all points in the closed interval $[0,1]$.
\item
The set of cluster points of $\Q$ is the whole real line $\R$.
\item
The set of cluster points of $[0,1) \cup \{ 2 \}$ is the interval $[0,1]$.
\item The set $\N$ has no cluster points in $\R$.
\end{enumerate}
\begin{prop}
Let $S \subset \R$. Then $x \in \R$ is a cluster point of $S$
if and only if
there exists a convergent sequence of numbers $\{ x_n \}_{n=1}^\infty$ such that
$x_n \not= x$ and $x_n \in S$ for all $n$, and $\lim\limits_{n\to\infty} x_n = x$.
\end{prop}
\begin{proof}
First suppose $x$ is a cluster point of $S$.
For every $n \in \N$, pick $x_n$ to be an arbitrary point of
$(x-\nicefrac{1}{n},x+\nicefrac{1}{n}) \cap S \setminus \{x\}$, which
is nonempty because $x$ is a cluster point of $S$.
Then
$x_n$ is within $\nicefrac{1}{n}$ of $x$, that is,
\begin{equation*}
\abs{x-x_n} < \nicefrac{1}{n} .
\avoidbreak
\end{equation*}
As $\{ \nicefrac{1}{n} \}_{n=1}^\infty$ converges to zero,
$\{ x_n \}_{n=1}^\infty$ converges to $x$.
On the other hand, if we start with a sequence of numbers
$\{ x_n \}_{n=1}^\infty$ in $S$
converging to $x$ such that $x_n \not= x$ for all $n$, then for every
$\epsilon > 0$ there is an $M$ such that, in particular, $\abs{x_M - x} <
\epsilon$. That is, $x_M \in (x-\epsilon,x+\epsilon) \cap S \setminus \{x\}$.
\end{proof}
\subsection{Limits of functions}
If a function $f$ is defined on a set $S$ and $c$ is a cluster point of $S$,
then we define the limit of $f(x)$ as $x$ approaches $c$.
It is irrelevant for the definition whether $f$ is defined at $c$ or not.
Even if the function is defined at $c$, the limit of the
function as $x$ goes to $c$ can very well be different
from $f(c)$.
\begin{defn}
\index{limit!of a function}%
Let $f \colon S \to \R$ be a function and $c$ a cluster point of
$S \subset \R$.
Suppose there exists an $L \in \R$ and for every $\epsilon > 0$,
there exists a $\delta > 0$ such that whenever $x \in S \setminus \{ c \}$
and $\abs{x - c} < \delta$, we have
\begin{equation*}
\abs{f(x) - L} < \epsilon .
\end{equation*}
We then say $f(x)$ \emph{converges}\index{converges!function} to $L$ as $x$ goes
to $c$, and we write
\glsadd{not:limitasarrows}%
\begin{equation*}
f(x) \to L \quad\text{as}\quad x \to c .
\end{equation*}
We say $L$ is a \emph{limit} of $f(x)$ as $x$
goes to $c$, and if $L$ is unique (it is), we write
\glsadd{not:limfunc}%
\begin{equation*}
\lim_{x \to c} f(x) \coloneqq L .
\end{equation*}
If no such $L$ exists, then we say that the limit does not exist or
that $f$ \emph{\myindex{diverges}} at $c$.
\end{defn}
Again the notation and language we are using above assumes the limit $L$, if
it exists, is unique, which needs to be proved. Note that the fact that $c$
is a cluster point is important to prove uniqueness.
\begin{prop}
Let $c$ be a cluster point of $S \subset \R$ and let $f \colon S \to \R$
be a function such that $f(x)$ converges as $x$ goes to $c$. Then
the limit of $f(x)$ as $x$ goes to $c$ is unique.
\end{prop}
\begin{proof}
Let $L_1$ and $L_2$ be two numbers that both satisfy the definition.
Take an $\epsilon > 0$ and find a $\delta_1 > 0$ such that
$\abs{f(x)-L_1} < \nicefrac{\epsilon}{2}$
for all $x \in S \setminus \{c\}$ with $\abs{x-c} < \delta_1$.
Also find $\delta_2 > 0$ such that
$\abs{f(x)-L_2} < \nicefrac{\epsilon}{2}$
for all $x \in S \setminus \{c\}$ with $\abs{x-c} < \delta_2$.
Put $\delta \coloneqq \min \{ \delta_1, \delta_2 \}$. Suppose $x \in S$,
$\abs{x-c} < \delta$, and $x \not= c$. As $\delta > 0$ and $c$ is a cluster
point, such an $x$ exists. Then
\begin{equation*}
\abs{L_1 - L_2} =
\abs{L_1 - f(x) + f(x) - L_2} \leq
\abs{L_1 - f(x)} + \abs{f(x) - L_2} < \frac{\epsilon}{2} + \frac{\epsilon}{2}
= \epsilon.
\end{equation*}
As $\abs{L_1-L_2} < \epsilon$ for arbitrary $\epsilon > 0$, then
$L_1 = L_2$.
\end{proof}
\begin{example}
Consider $f \colon \R \to \R$ defined by $f(x) \coloneqq x^2$. Then
for any $c \in \R$,
\begin{equation*}
\lim_{x\to c} f(x) = \lim_{x\to c} x^2 = c^2 .
\end{equation*}
Proof: Let $c \in \R$ be fixed, and suppose $\epsilon > 0$ is given. Write
\begin{equation*}
\delta \coloneqq \min \left\{ 1 , \, \frac{\epsilon}{2\abs{c}+1} \right\} .
\end{equation*}
Take $x \not= c$ such that $\abs{x-c} < \delta$. In particular,
$\abs{x-c} < 1$. By reverse triangle inequality,
\begin{equation*}
\abs{x}-\abs{c} \leq \abs{x-c} < 1 .
\end{equation*}
Adding $2\abs{c}$ to both sides, we obtain
$\abs{x} + \abs{c} < 2\abs{c} + 1$. Estimate
\begin{equation*}
\begin{split}
\abs{f(x) - c^2} &= \abs{x^2-c^2} \\
&= \abs{(x+c)(x-c)} \\
&= \abs{x+c}\abs{x-c} \\
&\leq (\abs{x}+\abs{c})\abs{x-c} \\
&< (2\abs{c}+1)\abs{x-c} \\
&< (2\abs{c}+1)\frac{\epsilon}{2\abs{c}+1} = \epsilon .
\end{split}
\end{equation*}
\end{example}
\begin{example}
Define $f \colon [0,1) \to \R$ by
\begin{equation*}
f(x) \coloneqq
\begin{cases}
x & \text{if } x > 0 , \\
1 & \text{if } x = 0 .
\end{cases}
\end{equation*}
Then
$\lim\limits_{x\to 0} f(x) = 0$,
even though $f(0) = 1$. See \figureref{fig:limvaldiff}.
\begin{myfigureht}
\includegraphics{figures/limvaldiff}
\caption{Function with a different limit and value at $0$.\label{fig:limvaldiff}}
\end{myfigureht}
Proof: Let $\epsilon > 0$ be given. Let $\delta \coloneqq \epsilon$.
For $x \in [0,1)$, $x \not= 0$, and $\abs{x-0} < \delta$, we get
\begin{equation*}
\abs{f(x) - 0} = \abs{x} < \delta = \epsilon .
\end{equation*}
\end{example}
\subsection{Sequential limits} \label{subseq:sequentiallimits}
Let us connect the limit as defined above with limits of sequences.
\begin{lemma}\label{seqflimit:lemma}
Let $S \subset \R$, let $c$ be a cluster point of $S$, let $f \colon S \to
\R$ be a function, and let $L \in \R$.
Then
$f(x) \to L$ as $x \to c$ if and only if for every sequence
$\{ x_n \}_{n=1}^\infty$
such that $x_n \in S \setminus \{c\}$ for all $n$,
and such that $\lim_{n\to\infty} x_n = c$,
we have that the sequence $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges to $L$.
\end{lemma}
\begin{proof}
Suppose
$f(x) \to L$ as $x \to c$, and $\{ x_n \}_{n=1}^\infty$ is a sequence
such that
$x_n \in S \setminus \{c\}$ and
$\lim_{n\to\infty} x_n = c$.
We wish to show that $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges to $L$.
Let $\epsilon > 0$ be given. Find a $\delta > 0$ such that
if $x \in S \setminus \{c\}$ and $\abs{x-c} < \delta$, then
$\abs{f(x) - L} < \epsilon$. As
$\{ x_n \}_{n=1}^\infty$ converges to $c$, find an $M$ such that for $n \geq M$,
we have that $\abs{x_n - c} < \delta$. Therefore, for $n \geq M$,
\begin{equation*}
\abs{f(x_n) - L} < \epsilon .
\end{equation*}
Thus $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges to $L$.
For the other direction, we use proof by contrapositive. Suppose
it is not true that $f(x) \to L$ as $x \to c$. The negation of the
definition is that there exists an $\epsilon > 0$ such that for every
$\delta > 0$ there exists an $x \in S \setminus \{c\}$, where
$\abs{x-c} < \delta$
and $\abs{f(x)-L} \geq \epsilon$.
Let us use $\nicefrac{1}{n}$ for $\delta$ in the statement above to
construct a sequence $\{ x_n \}_{n=1}^\infty$. We have
that there exists an $\epsilon > 0$ such that for every $n$,
there exists a point $x_n \in S \setminus \{c\}$, where
$\abs{x_n-c} < \nicefrac{1}{n}$
and $\abs{f(x_n)-L} \geq \epsilon$.
The sequence $\{ x_n \}_{n=1}^\infty$ just constructed converges to $c$, but
the sequence $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ does not converge to $L$.
And we are done.
\end{proof}
It is possible to strengthen the reverse direction of
the lemma by simply stating that
\myquote{$\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges,} without requiring a specific limit.
See \exerciseref{exercise:seqflimitalt}.
\begin{example}
$\displaystyle \lim_{x \to 0} \sin( \nicefrac{1}{x} )$
does not exist, but
$\displaystyle \lim_{x \to 0} x\sin( \nicefrac{1}{x} ) = 0$.
See \figureref{figsin1x}.
\begin{myfigureht}
%left guy also used in 10.4
\subimport*{figures/}{sin1x_xsin1x.pdf_t}
\caption{Graphs of $\sin(\nicefrac{1}{x})$ and $x \sin(\nicefrac{1}{x})$.
Note that the computer cannot properly graph $\sin(\nicefrac{1}{x})$
near zero as it oscillates too fast.\label{figsin1x}}
\end{myfigureht}
Proof:
We start with $\sin(\nicefrac{1}{x})$. Define a sequence
by
$x_n \coloneqq \frac{1}{\pi n + \nicefrac{\pi}{2}}$. It is not hard to see
that $\lim_{n\to\infty} x_n = 0$. Furthermore,
\begin{equation*}
\sin ( \nicefrac{1}{x_n} )
=
\sin (\pi n + \nicefrac{\pi}{2})
= {(-1)}^n .
\end{equation*}
Therefore, $\bigl\{ \sin ( \nicefrac{1}{x_n} ) \bigr\}_{n=1}^\infty$ does not converge.
By
\lemmaref{seqflimit:lemma},
$\displaystyle \lim_{x \to 0} \sin( \nicefrac{1}{x} )$ does not exist.
Now consider $x\sin(\nicefrac{1}{x})$. Let $\{ x_n \}_{n=1}^\infty$ be a sequence
such that $x_n \not= 0$ for all $n$, and such that $\lim_{n\to\infty} x_n = 0$.
Notice that $\abs{\sin(t)} \leq 1$ for all $t \in \R$. Therefore,
\begin{equation*}
\abs{x_n\sin(\nicefrac{1}{x_n})-0}
=
\abs{x_n}\abs{\sin(\nicefrac{1}{x_n})}
\leq
\abs{x_n} .
\end{equation*}
As $x_n$ goes to 0, then $\abs{x_n}$ goes to zero, and hence
$\bigl\{ x_n\sin(\nicefrac{1}{x_n}) \bigr\}_{n=1}^\infty$ converges to zero. By
\lemmaref{seqflimit:lemma},
$\displaystyle \lim_{x \to 0} x\sin( \nicefrac{1}{x} ) = 0$.
\end{example}
Keep in mind the phrase \myquote{for every sequence} in the lemma.
For example, take $\sin(\nicefrac{1}{x})$ and the sequence given by
$x_n \coloneqq \nicefrac{1}{\pi n}$.
Then $\bigl\{ \sin (\nicefrac{1}{x_n}) \bigr\}_{n=1}^\infty$
is the constant zero sequence, and
therefore converges to zero, but the limit of
$\sin(\nicefrac{1}{x})$ as $x \to 0$ does not exist.
Using \lemmaref{seqflimit:lemma},
we can start applying everything we know about
sequential limits to limits of functions. Let us give a few important
examples.
\begin{cor}
Let $S \subset \R$ and let $c$ be a cluster point of $S$.
Suppose $f \colon S \to
\R$ and $g \colon S \to \R$ are functions
such that
the limits of $f(x)$ and $g(x)$ as $x$ goes to $c$ both exist,
and
\begin{equation*}
f(x) \leq g(x) \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Then
\begin{equation*}
\lim_{x\to c} f(x) \leq \lim_{x\to c} g(x) .
\end{equation*}
\end{cor}
\begin{proof}
Take $\{ x_n \}_{n=1}^\infty$ be a sequence of numbers in $S \setminus \{ c \}$
that converges to $c$. Let
\begin{equation*}
L_1 \coloneqq \lim_{x\to c} f(x), \qquad \text{and} \qquad L_2 \coloneqq \lim_{x\to c} g(x) .
\end{equation*}
\lemmaref{seqflimit:lemma} says that $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges to
$L_1$ and $\bigl\{ g(x_n) \bigr\}_{n=1}^\infty$ converges to $L_2$. We also
have $f(x_n) \leq g(x_n)$ for all $n$.
We obtain $L_1 \leq L_2$ using
\lemmaref{limandineq:lemma}.
\end{proof}
By applying constant functions, we get the following corollary. The
proof is left as an exercise.
\begin{cor} \label{fconstineq:cor}
Let $S \subset \R$ and let $c$ be a cluster point of $S$. Suppose $f \colon S \to
\R$ is a function such that the limit of $f(x)$ as $x$ goes to $c$
exists.
Suppose there are two real numbers $a$ and $b$ such that
\begin{equation*}
a \leq f(x) \leq b \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Then
\begin{equation*}
a \leq \lim_{x\to c} f(x) \leq b .
\end{equation*}
\end{cor}
Using \lemmaref{seqflimit:lemma} in the same way as above, we also get
the following corollaries, whose proofs are again left as exercises.
\begin{cor} \label{fsqueeze:cor}
Let $S \subset \R$ and let $c$ be a cluster point of $S$.
Suppose $f \colon S \to \R$,
$g \colon S \to \R$, and $h \colon S \to \R$ are functions such that
\begin{equation*}
f(x) \leq g(x) \leq h(x) \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Suppose the limits of $f(x)$ and $h(x)$ as $x$ goes to $c$ both exist, and
\begin{equation*}
\lim_{x\to c} f(x) = \lim_{x\to c} h(x) .
\end{equation*}
Then the limit of $g(x)$ as $x$ goes to $c$ exists and
\begin{equation*}
\lim_{x\to c} g(x) =
\lim_{x\to c} f(x) = \lim_{x\to c} h(x) .
\end{equation*}
\end{cor}
\begin{cor} \label{falg:cor}
Let $S \subset \R$ and let $c$ be a cluster point of $S$.
Suppose $f \colon S \to \R$ and
$g \colon S \to \R$ are functions
such that
the limits of $f(x)$ and $g(x)$ as $x$ goes to $c$ both exist.
Then
\begin{enumerate}[(i)]
\item
$\displaystyle
\lim_{x\to c} \bigl(f(x)+g(x)\bigr) = \left(\lim_{x\to c} f(x)\right) +
\left(\lim_{x\to c} g(x)\right) .
$
\item
$\displaystyle
\lim_{x\to c} \bigl(f(x)-g(x)\bigr) = \left(\lim_{x\to c} f(x)\right) -
\left(\lim_{x\to c} g(x)\right) .
$
\item
$\displaystyle
\lim_{x\to c} \bigl(f(x)g(x)\bigr) = \left(\lim_{x\to c} f(x)\right)
\left(\lim_{x\to c} g(x)\right) .
$
\item \label{falg:cor:iv} If
$\displaystyle \lim_{x\to c} g(x) \not= 0$
and $g(x) \not= 0$ for all $x \in S \setminus \{ c \}$, then
\begin{equation*}
\lim_{x\to c} \frac{f(x)}{g(x)} =
\frac{\lim_{x\to c} f(x)}{\lim_{x\to c} g(x)} .
\end{equation*}
\end{enumerate}
\end{cor}
\begin{cor} \label{fabs:cor}
Let $S \subset \R$ and let $c$ be a cluster point of $S$.
Suppose $f \colon S \to \R$ is a function such that the limit of $f(x)$ as $x$ goes to $c$
exists.
Then
\begin{equation*}
\lim_{x\to c} \abs{f(x)} =
\abs{\lim_{x\to c} f(x)}.
\end{equation*}
\end{cor}
\subsection{Limits of restrictions and one-sided limits}
Sometimes we work with the function defined on a subset.
\begin{defn}
Let $f \colon S \to \R$ be a function and $A \subset S$. Define the
function $f|_A \colon A \to \R$ by
\begin{equation*}
f|_A (x) \coloneqq f(x) \qquad \text{for } x \in A.
\end{equation*}
We call $f|_A$ the \emph{\myindex{restriction}} of $f$ to $A$.
\end{defn}
The function $f|_A$ is simply the function $f$ taken on a smaller domain.
The following proposition is the analogue of taking a tail of a sequence.
It says that the limit is \myquote{local}: The limit only depends on points
arbitrarily near $c$.
\begin{prop} \label{prop:limrest}
Let $S \subset \R$, $c \in \R$, and
let $f \colon S
\to \R$ be a function.
Suppose
$A \subset S$ is such that there is some $\alpha > 0$ such that
$(A \setminus \{ c \}) \cap (c-\alpha,c+\alpha) = (S \setminus \{ c \}) \cap (c-\alpha,c+\alpha)$.
\begin{enumerate}[(i)]
\item The point $c$ is a cluster point of $A$ if and only if $c$ is a cluster point
of $S$.
\item Supposing $c$ is a cluster point of $S$, then $f(x) \to L$ as $x \to c$ if and only if
$f|_A(x) \to L$ as $x \to c$.
\end{enumerate}
\end{prop}
\begin{proof}
First, let $c$ be a cluster point of $A$.
Since $A \subset S$, then if $( A \setminus \{ c\} ) \cap
(c-\epsilon,c+\epsilon)$ is nonempty for every $\epsilon > 0$,
then $( S \setminus \{ c\} ) \cap
(c-\epsilon,c+\epsilon)$ is nonempty for every $\epsilon > 0$.
Thus $c$ is a cluster point of $S$.
Second, suppose $c$ is a cluster
point of $S$. Then for $\epsilon > 0$ such that $\epsilon < \alpha$
we get that $( A \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon) =
( S \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon)$, which is nonempty. This is true for all
$\epsilon < \alpha$ and hence
$( A \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon)$ must be nonempty for all
$\epsilon > 0$. Thus $c$ is a cluster point of $A$.
Now suppose $c$ is a cluster point of $S$ and $f(x) \to L$ as $x \to c$. That is, for every $\epsilon > 0$
there is a $\delta > 0$ such that if $x \in S \setminus \{ c \}$
and $\abs{x-c} < \delta$, then $\abs{f(x)-L} < \epsilon$. Because $A \subset S$,
if $x \in A \setminus \{ c \}$, then $x \in S \setminus \{ c \}$,
and hence $f|_A(x) \to L$ as $x \to c$.
Finally, suppose $f|_A(x) \to L$ as $x \to c$ and let $\epsilon > 0$ be
given.
There is a $\delta' > 0$ such that if $x \in A \setminus \{ c \}$
and $\abs{x-c} < \delta'$, then $\bigl\lvert f|_A(x)-L \bigr\rvert < \epsilon$.
Take $\delta \coloneqq \min \{ \delta', \alpha \}$.
Now suppose $x \in S \setminus \{ c \}$ and
$\abs{x-c} < \delta$. As $\abs{x-c} < \alpha$, we find $x \in A \setminus \{ c \}$,
and as $\abs{x-c} < \delta'$,
we get $\abs{f(x)-L} = \bigl\lvert f|_A(x)-L
\bigr\rvert < \epsilon$.
\end{proof}
The hypothesis on $A$ in the proposition is necessary. For an arbitrary
restriction we generally get an implication in only one direction,
see \exerciseref{exercise:restrictionlimitexercise}.
The usual notation for the limit is
\begin{equation*}
\lim_{\substack{x \to c\\x \in A}} f(x) \coloneqq \lim_{x \to c} f|_A(x) .
\end{equation*}
A common use of restriction with respect to limits, which does not satisfy
the hypothesis in the proposition, is the so-called
\emph{\myindex{one-sided limit}}%
\footnote{%
One sees a plethora of one-sided limit notations.
E.g.,
$\lim\limits_{\substack{x \to c\\x < c}} f(x)$,
$\lim\limits_{x \uparrow c} f(x)$, or
$\lim\limits_{x \nearrow c} f(x)$ for
$\lim\limits_{x \to c^-} f(x)$.}
\begin{defn} \label{defn:onesidedlimits}
Let $f \colon S \to \R$ be function and let $c \in \R$. If
$c$ is a cluster point of
$S \cap (c,\infty)$
and the limit
of the restriction of $f$ to $S \cap (c,\infty)$
as $x \to c$ exists, define
\glsadd{not:onesidedlim}
\begin{equation*}
\lim_{x \to c^+} f(x) \coloneqq \lim_{x\to c} f|_{S \cap (c,\infty)}(x) .
\end{equation*}
Similarly, if $c$ is a cluster point of
$S \cap (-\infty,c)$ and the limit of the restriction as $x \to c$
exists, define
\begin{equation*}
\lim_{x \to c^-} f(x) \coloneqq \lim_{x\to c} f|_{S \cap (-\infty,c)}(x) .
\end{equation*}
\end{defn}
\propref{prop:limrest} does not apply to one-sided limits.
It is possible to have one-sided limits, but no limit at a point. For
example, define $f \colon \R \to \R$ by $f(x) \coloneqq 1$ for $x < 0$ and
$f(x) \coloneqq 0$ for $x \geq 0$.
We leave it to the reader to verify that
\begin{equation*}
\lim_{x \to 0^-} f(x) = 1, \qquad
\lim_{x \to 0^+} f(x) = 0, \qquad
\lim_{x \to 0} f(x) \quad \text{does not exist.}
\end{equation*}
All is not lost, however, for we have the following replacement.
\begin{prop} \label{prop:onesidedlimits}
Let $S \subset \R$ be such that $c$ is a cluster point
of both $S \cap (-\infty,c)$ and $S \cap (c,\infty)$, let
$f \colon S \to \R$ be a function, and let $L \in \R$. Then $c$ is a cluster point of $S$ and
\begin{equation*}
\lim_{x \to c} f(x) = L
\qquad \text{if and only if} \qquad
\lim_{x \to c^-} f(x) =
\lim_{x \to c^+} f(x) =
L .
\end{equation*}
\end{prop}
That is, a limit at $c$ exists if and only if both one-sided limits exist and are equal. The
proof is a straightforward application of the definition of limit
and is left as an exercise. The key point is that
$\bigl( S \cap (-\infty,c) \bigr) \cup \bigl( S \cap (c,\infty) \bigr)
= S \setminus \{ c \}$.
\subsection{Exercises}
\begin{exercise}
Find the limit (and prove it of course) or prove that the limit does not exist
\medskip
\noindent
\begin{tabular}{lllll}
a)
$\displaystyle
\lim_{x\to c} \sqrt{x}
$, for $c \geq 0$
& &
b)
$\displaystyle
\lim_{x\to c} x^2+x+1
$, for $c \in \R$
& &
c)
$\displaystyle
\lim_{x\to 0} x^2 \cos (\nicefrac{1}{x})
$
\\
d)
$\displaystyle
\lim_{x\to 0} \sin(\nicefrac{1}{x}) \cos (\nicefrac{1}{x})
$
& &
e)
$\displaystyle
\lim_{x\to 0} \sin(x) \cos (\nicefrac{1}{x})
$ &
\end{tabular}
\end{exercise}
\begin{exercise}
Prove \corref{fconstineq:cor}.
\end{exercise}
\begin{exercise}
Prove \corref{fsqueeze:cor}.
\end{exercise}
\begin{exercise}
Prove \corref{falg:cor}.
\end{exercise}
\begin{exercise}
Let $A \subset S$. Show that if $c$ is a cluster point of $A$, then $c$
is a cluster point of $S$. Note the difference from
\propref{prop:limrest}.
\end{exercise}
\begin{exercise} \label{exercise:restrictionlimitexercise}
Let $A \subset S$. Suppose $c$ is a cluster point of $A$ and
it is also a cluster point of $S$.
Let $f \colon S \to \R$ be a function. Show that if
$f(x) \to L$ as $x \to c$, then
$f|_A(x) \to L$ as $x \to c$.
Note the difference from
\propref{prop:limrest}.
\end{exercise}
\begin{exercise}
Find an example of a function $f \colon [-1,1] \to \R$, where for
$A\coloneqq [0,1]$, we have
$f|_A(x) \to 0$ as $x \to 0$, but the limit of $f(x)$ as $x \to 0$
does not exist. Note why you cannot apply
\propref{prop:limrest}.
\end{exercise}
\begin{exercise}
Find example functions $f$ and $g$ such that the limit of neither $f(x)$
nor $g(x)$ exists as $x \to 0$, but such that the limit of $f(x)+g(x)$ exists
as $x \to 0$.
\end{exercise}
\begin{exercise} \label{exercise:contlimitcomposition}
Let $c_1$ be a cluster point of $A \subset \R$ and $c_2$ be
a cluster point of $B \subset \R$. Suppose
$f \colon A \to B$ and $g \colon B \to \R$ are functions
such that
$f(x) \to c_2$ as $x \to c_1$ and
$g(y) \to L$ as $y \to c_2$. If $c_2 \in B$, also suppose that $g(c_2) = L$.
Let $h(x) \coloneqq g\bigl(f(x)\bigr)$ and show
$h(x) \to L$ as $x \to c_1$.
Hint: Note that $f(x)$ could equal $c_2$ for many $x \in A$,
see also
\exerciseref{exercise:contlimitbadcomposition}.
\end{exercise}
%\begin{exercise}[note\footnote{This exercise is almost identical to the next one. It
%will be replaced in the next major edition.}]
%Let $c$ be a cluster point of $A \subset \R$, and $f \colon A \to \R$
%be a function. Suppose for every sequence $\{x_n\}_{n=1}^\infty$ in $A$,
%such that $\lim_{n\to\infty} x_n = c$,
%the sequence $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ is Cauchy. Prove that
%$\lim_{x\to c} f(x)$ exists.
%\end{exercise}
\begin{exercise}
Suppose that $f \colon \R \to \R$ be a function such that for every
sequence $\{x_n\}_{n=1}^\infty$ in $\R$, the sequence
$\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges. Prove that
$f$ is constant, that is,
$f(x) = f(y)$ for all $x,y \in \R$.
\end{exercise}
\begin{exercise} \label{exercise:seqflimitalt}
Prove the following stronger version of one direction of
\lemmaref{seqflimit:lemma}:
Let $S \subset \R$, $c$ be a cluster point of $S$, and $f \colon S \to
\R$ be a function.
Suppose that for every sequence $\{x_n\}_{n=1}^\infty$ in $S \setminus \{c\}$ such that
$\lim_{n\to\infty} x_n = c$ the sequence $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ is convergent.
Then show that the limit of $f(x)$ as $x \to c$ exists.
\end{exercise}
\begin{exercise}
Prove \propref{prop:onesidedlimits}.
\end{exercise}
\begin{exercise}
Suppose $S \subset \R$ and $c$ is a cluster point of $S$. Suppose $f \colon
S \to \R$ is bounded. Show that there exists a sequence
$\{ x_n \}_{n=1}^\infty$
with $x_n \in S \setminus \{ c \}$ and $\lim_{n\to\infty} x_n = c$ such that
$\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges.
\end{exercise}
\begin{exercise}[Challenging] \label{exercise:contlimitbadcomposition}
Show that the hypothesis that $g(c_2) = L$ in
\exerciseref{exercise:contlimitcomposition} is necessary. That is, find $f$
and $g$ such that $f(x) \to c_2$ as $x \to c_1$ and
$g(y) \to L$ as $y \to c_2$, but $g\bigl(f(x)\bigr)$ does not go to $L$
as $x \to c_1$.
\end{exercise}
\begin{exercise}
Show that the condition of being a cluster point is necessary to have a
reasonable definition of a limit. That is, suppose $c$ is not a cluster
point of $S \subset \R$, and $f \colon S \to \R$ is a function. Show that
every $L$ would satisfy the definition of limit at $c$ without the condition
on $c$ being a cluster point.
\end{exercise}
\begin{exercise}
\leavevmode
\begin{enumerate}[a)]
\item
Prove \corref{fabs:cor}.
\item
Find an example showing that the converse of
the corollary does not hold.
\end{enumerate}
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\sectionnewpage
\section{Continuous functions}
\label{sec:cont}
%mbxINTROSUBSECTION
\sectionnotes{2--2.5 lectures}
%You undoubtedly heard of continuous functions in your schooling.
A high-school criterion for the concept of continuity
is that a function is continuous if
we can draw its graph without lifting the pen from the paper. While that
intuitive concept may be useful in simple situations, we require
rigor. The following definition took three great mathematicians
(Bolzano, Cauchy, and finally Weierstrass) to get correctly and its final
form dates only to the late 1800s.
\subsection{Definition and basic properties}
\begin{defn}
Suppose $S \subset \R$ and $c \in S$.
We say $f \colon S \to \R$
is \emph{continuous at $c$}\index{continuous at $c$}
if for every $\epsilon > 0$
there is a $\delta > 0$ such that whenever $x \in S$ and $\abs{x-c} <
\delta$, we have
$\abs{f(x)-f(c)} < \epsilon$.
%\medskip
When $f \colon S \to \R$ is continuous at all $c \in S$, then we simply say
$f$ is a \emph{\myindex{continuous function}}\index{function!continuous}.
\end{defn}
\begin{myfigureht}
\subimport*{figures/}{contigr.pdf_t}
\caption{For $\abs{x-c} < \delta$, the graph of $f(x)$ should be within the gray region.\label{fig:contigr}}
\end{myfigureht}
If $f$ is continuous for all $c \in A$, we say
$f$ is \emph{continuous on $A \subset S$}. A straightforward
exercise (\exerciseref{exercise:restrictioncontinuous})
shows that this implies that $f|_A$ is continuous, although
the converse does not hold (as we will see in \exampleref{example:removablediscont}).
Continuity may be the most important definition to understand in analysis,
and it is not an easy one. See \figureref{fig:contigr}.
Note that $\delta$ not only
depends on $\epsilon$, but also on $c$; we need not pick
one $\delta$ for all $c \in S$.
It is no accident
that the definition of continuity is similar to the definition of a
limit of a function. The main feature of continuous functions
is that these are precisely the functions that behave nicely with limits.
\begin{prop} \label{contbasic:prop}
Consider a function $f \colon S \to \R$ defined on a set $S \subset \R$
and let $c \in S$.
Then:
%\begin{enumerate}[(i),itemsep=0.5\itemsep,parsep=0.5\parsep,topsep=0.5\topsep,partopsep=0.5\partopsep]
\begin{enumerate}[(i)]
\item \label{contbasic:prop:i}
If $c$ is not a cluster point of $S$, then $f$ is continuous at $c$.
\item \label{contbasic:prop:ii}
If $c$ is a cluster point of $S$, then $f$ is continuous at $c$
if and only if the limit of $f(x)$ as $x \to c$ exists and
\begin{equation*}
\lim_{x\to c} f(x) = f(c) .
\end{equation*}
\item \label{contbasic:prop:iii}
The function $f$ is continuous at $c$ if and only if for every sequence
$\{ x_n \}_{n=1}^\infty$
where $x_n \in S$ and $\lim\limits_{n\to\infty} x_n = c$, the sequence
$\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$ converges
to $f(c)$.
\end{enumerate}
\end{prop}
\begin{proof}
\pagebreak[2]
We start with \ref{contbasic:prop:i}. Suppose $c$ is not a cluster point of
$S$. Then there exists a $\delta > 0$
such that $S \cap (c-\delta,c+\delta) = \{ c \}$.
For any $\epsilon > 0$, simply pick this given $\delta$.
The only $x \in S$ such that $\abs{x-c} < \delta$ is $x=c$. Then
$\abs{f(x)-f(c)} = \abs{f(c)-f(c)} = 0 < \epsilon$.
Let us move to \ref{contbasic:prop:ii}.
Suppose $c$ is a cluster point of $S$. Let us first suppose
that $\lim_{x\to c} f(x) = f(c)$. Then for every $\epsilon > 0$,
there is a $\delta > 0$ such that if $x \in S \setminus \{ c \}$
and $\abs{x-c} < \delta$, then $\abs{f(x)-f(c)} < \epsilon$.
Also $\abs{f(c)-f(c)} = 0 < \epsilon$, so the definition of continuity at
$c$ is satisfied. On the other hand, suppose $f$ is continuous
at $c$. For every $\epsilon > 0$, there exists a $\delta > 0$
such that for $x \in S$ where $\abs{x-c} < \delta$, we have
$\abs{f(x)-f(c)} < \epsilon$. Then the statement is, of course, still true if
$x \in S \setminus \{ c \} \subset S$. Therefore, $\lim_{x\to c} f(x) =
f(c)$.
For \ref{contbasic:prop:iii}, first suppose $f$ is continuous at $c$.
Let $\{ x_n \}_{n=1}^\infty$
be a sequence such that $x_n \in S$ and $\lim_{n\to\infty} x_n = c$. Let $\epsilon > 0$
be given. Find a $\delta > 0$ such that $\abs{f(x)-f(c)} < \epsilon$
for all $x \in S$ where $\abs{x-c} < \delta$. Find an $M \in \N$
such that for $n \geq M$, we have $\abs{x_n-c} < \delta$. Then for
$n \geq M$, we have that $\abs{f(x_n)-f(c)} < \epsilon$,
so $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$
converges to $f(c)$.
We prove the other direction of \ref{contbasic:prop:iii} by contrapositive.
Suppose $f$ is not
continuous at $c$. Then there exists an $\epsilon > 0$
such that for every $\delta > 0$, there exists an $x \in S$
such that $\abs{x-c} < \delta$ and $\abs{f(x)-f(c)} \geq \epsilon$.
Define a sequence $\{ x_n \}_{n=1}^\infty$ as follows.
Let $x_n \in S$ be such that $\abs{x_n-c} < \nicefrac{1}{n}$
and $\abs{f(x_n)-f(c)} \geq \epsilon$.
Now $\{ x_n \}_{n=1}^\infty$ is
a sequence in $S$ such that
$\lim_{n\to\infty} x_n = c$ and such that
$\abs{f(x_n)-f(c)} \geq \epsilon$ for all $n \in \N$.
Thus $\bigl\{ f(x_n) \bigr\}_{n=1}^\infty$
does not converge to $f(c)$. It may or may not converge, but it definitely
does not converge to $f(c)$.
\end{proof}
The last item in the proposition is particularly powerful. It allows us to
quickly apply what we know about limits of sequences to continuous functions
and even to prove that certain functions are continuous.
It can also be strengthened, see \exerciseref{exercise:contseqalt}.
\begin{example}
The function $f \colon (0,\infty) \to \R$
defined by $f(x) \coloneqq \nicefrac{1}{x}$ is continuous.
Proof: Fix $c \in (0,\infty)$.
Let $\{ x_n \}_{n=1}^\infty$ be a sequence in $(0,\infty)$ such that
$\lim_{n\to\infty} x_n = c$. Then
\begin{equation*}
f(c) = \frac{1}{c}
=
\frac{1}{\lim_{n\to\infty} x_n}
=
\lim_{n \to \infty} \frac{1}{x_n}
=
\lim_{n \to \infty} f(x_n) .
\end{equation*}
Thus $f$ is continuous at $c$. As $f$ is continuous at all $c \in
(0,\infty)$, $f$ is continuous.
\end{example}
We have previously shown $\lim_{x \to c} x^2 = c^2$ directly. Therefore
the function $x^2$ is continuous. The last item of \propref{contbasic:prop} and the continuity of
algebraic operations with respect to limits of sequences,
\propref{prop:contalg}, gives a quick proof of a much more general result.
\begin{prop}
Let $f \colon \R \to \R$ be a \emph{\myindex{polynomial}}. That is,
\begin{equation*}
f(x) = a_d x^d + a_{d-1} x^{d-1} + \cdots + a_1 x + a_0 ,
\end{equation*}
for some constants $a_0, a_1, \ldots, a_d$.
Then $f$ is continuous.
\end{prop}
\begin{proof}
Fix $c \in \R$.
Let $\{ x_n \}_{n=1}^\infty$ be a sequence such that
$\lim_{n\to\infty} x_n = c$. Then
\begin{equation*}
\begin{split}
f(c) &=
a_d c^d + a_{d-1} c^{d-1} + \cdots + a_1 c + a_0
\\
&=
a_d {\left(\lim_{n\to\infty} x_n\right)}^d
+ a_{d-1} {\left(\lim_{n\to\infty} x_n\right)}^{d-1}
+ \cdots
+ a_1 \left(\lim_{n\to\infty} x_n\right) + a_0
\\
& =
\lim_{n \to \infty}
\left(
a_d x_n^d + a_{d-1} x_n^{d-1} + \cdots + a_1 x_n + a_0
\right)
=
\lim_{n \to \infty}
f(x_n) .
\avoidbreak
\end{split}
\end{equation*}
Thus $f$ is continuous at $c$. As $f$ is continuous at all $c \in \R$,
$f$ is continuous.
\end{proof}
By similar reasoning, or by appealing to \corref{falg:cor},
we can prove the following proposition. The proof is left as an
exercise.
\begin{prop} \label{contalg:prop}
Let $f \colon S \to \R$ and $g \colon S \to \R$ be functions
continuous at $c \in S$.
\begin{enumerate}[(i)]
\item The function $h \colon S \to \R$ defined by
$h(x) \coloneqq f(x)+g(x)$ is continuous at $c$.
\item The function $h \colon S \to \R$ defined by
$h(x) \coloneqq f(x)-g(x)$ is continuous at $c$.
\item The function $h \colon S \to \R$ defined by
$h(x) \coloneqq f(x)g(x)$ is continuous at $c$.
\item If $g(x)\not=0$ for all $x \in S$, the function $h \colon S \to \R$
given by $h(x) \coloneqq \frac{f(x)}{g(x)}$ is continuous at $c$.
\end{enumerate}
\end{prop}
\begin{example} \label{sincos:example}
The functions $\sin(x)$ and $\cos(x)$ are continuous.
In the following computations we use the sum-to-product
trigonometric identities. We also use the simple facts that
$\abs{\sin(x)} \leq \abs{x}$, $\abs{\cos(x)} \leq 1$,
and $\abs{\sin(x)} \leq 1$.
\begin{equation*}
\begin{split}
\abs{\sin(x)-\sin(c)} & =
\abs{
2 \sin \left( \frac{x-c}{2} \right) \cos \left( \frac{x+c}{2} \right)
}
\\
& =
2
\abs{ \sin \left( \frac{x-c}{2} \right) }
\abs{ \cos \left( \frac{x+c}{2} \right) }
\\
& \leq
2
\abs{ \sin \left( \frac{x-c}{2} \right) }
\\
& \leq
2
\abs{ \frac{x-c}{2} }
= \abs{x-c}
\end{split}
\end{equation*}
\begin{equation*}
\begin{split}
\abs{\cos(x)-\cos(c)} & =
\abs{
-2 \sin \left( \frac{x-c}{2} \right) \sin \left( \frac{x+c}{2} \right)
}
\\
& =
2
\abs{ \sin \left( \frac{x-c}{2} \right) }
\abs{ \sin \left( \frac{x+c}{2} \right) }
\\
& \leq
2
\abs{ \sin \left( \frac{x-c}{2} \right) }
\\
& \leq
2
\abs{ \frac{x-c}{2} }
= \abs{x-c}
\end{split}
\end{equation*}
The claim that $\sin$ and $\cos$ are continuous follows by taking an
arbitrary sequence $\{ x_n \}_{n=1}^\infty$ converging to $c$, or by applying the
definition of continuity directly. Details are left to the
reader.
\end{example}
\subsection{Composition of continuous functions}
You probably already realized that one of the basic tools in
constructing complicated functions out of simple ones is composition.
Recall that for two functions $f$ and $g$,
the composition $f \circ g$ is defined by
$(f \circ g)(x) \coloneqq f\bigl(g(x)\bigr)$.
A composition of
continuous functions is again
continuous.
\begin{prop} \label{prop:compositioncont}
Let $A, B \subset \R$ and $f \colon B \to \R$ and $g \colon A \to B$ be