Throughout this sheet, we let f:A⟶Rf: A \longrightarrow \mathbb{R} be a real valued function with domain A⊂RA \subset \mathbb{R}.

Remark 10.0. Theorem 9.21 holds for a function f:A⟶Rf: A \longrightarrow \mathbb{R} if we change "p∈Rp \in \mathbb{R}" to "p∈Ap \in A" and "(p−δ,p+δ)(p - \delta, p + \delta)" to "A∩(p−δ,p+δ)A \cap (p - \delta, p + \delta)". Similarly, Theorem 9.24 and Definition 9.25 hold for f:A⟶Rf: A \longrightarrow \mathbb{R} so long as we take p∈Ap \in A and change the condition "if ∣x−p∣<δ|x - p| < \delta" to "if x∈Ax \in A and ∣x−p∣<δ|x - p| < \delta".

Definition 10.1. Let a∈Ra \in \mathbb{R} such that there exists a region RR containing aa with R∖{a}⊂AR \setminus \{a\} \subset A. The limit of ff at a point a∈Ra \in \mathbb{R} is a number L∈RL \in \mathbb{R} satisfying the following condition: for every ϵ>0\epsilon > 0, there exists a δ>0\delta > 0 such that

if x∈A and 0<∣x−a∣<δ,then ∣f(x)−L∣<ϵ.\text{if } x \in A \text{ and } 0 < |x - a| < \delta, \quad \text{then } |f(x) - L| < \epsilon.

If the limit LL of ff at aa exists, we write this as:

lim⁡x→af(x)=L.\lim_{x \to a} f(x) = L.

More generally, we can extend the above definition to any a∈Ra \in \mathbb{R} such that aa is a limit point of AA. In this case, the fact that aa is a limit point guarantees that for all δ>0\delta > 0 there exists an xx such that x∈Ax \in A and 0<∣x−a∣<δ0 < |x - a| < \delta. So the "if" part of the statement is never vacuous.

Proposition 10.2. Limits are unique: if lim⁡x→af(x)=L\lim_{x \to a} f(x) = L and lim⁡x→af(x)=L′\lim_{x \to a} f(x) = L', then L=L′L = L'.

集合不相交(还原回region的形式,借鉴数列极限unique的证明(连续的数列)/当...时,有...

Exercise 10.3. Give an example of a set A⊂RA \subset \mathbb{R}, a function f:A⟶Rf: A \longrightarrow \mathbb{R}, and a point aa (such that there exists a region RR with R∖{a}⊂AR \setminus \{a\} \subset A) such that lim⁡x→af(x)\lim_{x \to a} f(x) does not exist.

Theorem 10.4. A function ff is continuous at aa if and only if:

lim⁡x→af(x)=f(a).\lim_{x \to a} f(x) = f(a).

Exercise 10.5. (i) For every c∈Rc \in \mathbb{R}, the constant function f:R→Rf: \mathbb{R} \to \mathbb{R}, defined by f(x)=cf(x) = c for all x∈Rx \in \mathbb{R}, is continuous.
(ii) The identity function, defined by g(x)=xg(x) = x, is continuous.

The following lemma is very useful in proofs involving inequalities. (Hint: the second inequality follows from the first.)

Lemma 10.6. For any real numbers xx and yy, we have:

The Triangle Inequality: ∣x+y∣≤∣x∣+∣y∣,\text{The Triangle Inequality: } |x + y| \leq |x| + |y|, The Reverse Triangle Inequality: ∣∣x∣−∣y∣∣≤∣x−y∣.\text{The Reverse Triangle Inequality: } \big||x| - |y|\big| \leq |x - y|.

Exercise 10.7. Show that the absolute value function f:R→Rf: \mathbb{R} \to \mathbb{R}, f(x)=∣x∣f(x) = |x|, is continuous.

Given real-valued functions ff and gg, we define new functions f+gf + g, fgfg and 1f\frac{1}{f} by:

(f+g)(x)=f(x)+g(x),(fg)(x)=f(x)⋅g(x),1f(x)=1f(x), provided that f(x)≠0.(f + g)(x) = f(x) + g(x), \qquad (fg)(x) = f(x) \cdot g(x), \qquad \frac{1}{f}(x) = \frac{1}{f(x)}, \text{ provided that } f(x) \neq 0.

We wish to understand the limits of f+gf + g, fgfg and 1f\frac{1}{f} in terms of the limits of ff and gg.

Lemma 10.8. If ∣x−x0∣<ϵ2|x - x_0| < \frac{\epsilon}{2} and ∣y−y0∣<ϵ2|y - y_0| < \frac{\epsilon}{2}, then ∣(x+y)−(x0+y0)∣<ϵ|(x + y) - (x_0 + y_0)| < \epsilon.

Theorem 10.9. Suppose that lim⁡x→af(x)=L\lim_{x \to a} f(x) = L and lim⁡x→ag(x)=M\lim_{x \to a} g(x) = M. Then:

lim⁡x→a(f+g)(x)=L+M.\lim_{x \to a} (f + g)(x) = L + M.

Lemma 10.10. If

∣x−x0∣<min⁡ ⁣(1,ϵ2(∣y0∣+1))and∣y−y0∣<ϵ2(∣x0∣+1),|x - x_0| < \min\!\left(1, \frac{\epsilon}{2(|y_0| + 1)}\right) \quad \text{and} \quad |y - y_0| < \frac{\epsilon}{2(|x_0| + 1)},

then ∣xy−x0y0∣<ϵ|xy - x_0 y_0| < \epsilon.

Theorem 10.11. Suppose that lim⁡x→af(x)=L\lim_{x \to a} f(x) = L and lim⁡x→ag(x)=M\lim_{x \to a} g(x) = M. Then:

lim⁡x→a(fg)(x)=L⋅M.\lim_{x \to a} (fg)(x) = L \cdot M.

Lemma 10.12. If x0≠0x_0 \neq 0 and

∣x−x0∣<min⁡ ⁣(∣x0∣2,ϵ∣x0∣22),|x - x_0| < \min\!\left(\frac{|x_0|}{2}, \frac{\epsilon |x_0|^2}{2}\right),

then x≠0x \neq 0 and

∣1x−1x0∣<ϵ.\left|\frac{1}{x} - \frac{1}{x_0}\right| < \epsilon.

Theorem 10.13. Suppose that lim⁡x→af(x)=L≠0\lim_{x \to a} f(x) = L \neq 0. Then:

lim⁡x→a1f(x)=1L.\lim_{x \to a} \frac{1}{f}(x) = \frac{1}{L}.

Corollary 10.14. If ff and gg are continuous at aa, then f+gf + g, fgfg and 1/f1/f are continuous at aa (the latter provided that f(a)≠0f(a) \neq 0).

Definition 10.15. A polynomial in one variable with real coefficients is a function ff of the form

f(x)=anxn+an−1xn−1+⋯+a1x+a0f(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0

for some n∈N∪{0}n \in \mathbb{N} \cup \{0\}, where ai∈Ra_i \in \mathbb{R} for 0≤i≤n0 \leq i \leq n. A rational function in one variable with real coefficients is a function of the form h(x)=f(x)g(x)h(x) = \frac{f(x)}{g(x)} where ff and gg are polynomials in one variable with real coefficients.

Corollary 10.16. Polynomials in one variable with real coefficients are continuous. A rational function in one variable with real coefficients h(x)=f(x)g(x)h(x) = \frac{f(x)}{g(x)} is continuous at all a∈Ra \in \mathbb{R} where g(a)≠0g(a) \neq 0.

Now we want to look at limits of the composition of functions. It is not quite true in general that if lim⁡x→ag(x)=M\lim_{x \to a} g(x) = M and lim⁡y→Mf(y)=L\lim_{y \to M} f(y) = L, then lim⁡x→af(g(x))=L\lim_{x \to a} f(g(x)) = L, but it is true in some cases.

Proposition 10.17. Let a∈Ra \in \mathbb{R}. Then

lim⁡x→af(x)=lim⁡h→0f(a+h),\lim_{x \to a} f(x) = \lim_{h \to 0} f(a + h),

assuming that the limit on the left exists. (Hint: You can think of the right hand side as the composition of ff with the function g(h)=a+hg(h) = a + h.)

Theorem 10.18. If lim⁡x→ag(x)=M\lim_{x \to a} g(x) = M and ff is continuous at MM, then lim⁡x→af(g(x))=f(M)\lim_{x \to a} f(g(x)) = f(M).

Remark 10.19. This theorem can also be rewritten as

lim⁡x→af(g(x))=f ⁣(lim⁡x→ag(x)),\lim_{x \to a} f(g(x)) = f\!\left(\lim_{x \to a} g(x)\right),

which can be remembered as "limits pass through continuous functions."

Corollary 10.20. If gg is continuous at aa and ff is continuous at g(a)g(a), then f∘gf \circ g is continuous at aa.

We now assume the domain A⊂RA \subset \mathbb{R} is open.

Definition 10.21. The derivative of ff at a point a∈Aa \in A is the number f′(a)f'(a) defined by the following limit:

f′(a)=lim⁡h→0f(a+h)−f(a)h,f'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h},

provided the limit on the right hand side exists. If f′(a)f'(a) exists, we say that ff is differentiable at aa. If ff is differentiable at all points of its domain, we say that ff is differentiable. In this case, the values f′(a)f'(a) define a new function f′:A⟶Rf': A \longrightarrow \mathbb{R} called the derivative of ff.

Here is a useful reformulation of the definition of the derivative.

Theorem 10.22. If ff is differentiable at aa, the derivative of ff at aa is given by the limit:

f′(a)=lim⁡x→af(x)−f(a)x−a.f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}.

Theorem 10.23. If ff is differentiable at aa, then ff is continuous at aa.

Exercise 10.24. Show that the converse of Theorem 10.23 is not true in general.

Exercise 10.25. (i) Show that for all n∈Nn \in \mathbb{N},

xn−an=(x−a)(xn−1+axn−2+a2xn−3+⋯+an−2x+an−1),x^n - a^n = (x - a)(x^{n-1} + a x^{n-2} + a^2 x^{n-3} + \dots + a^{n-2} x + a^{n-1}),

or more formally,

xn−an=(x−a)(∑i=0n−1xn−1−iai).x^n - a^n = (x - a)\left( \sum_{i=0}^{n-1} x^{n-1-i} a^i \right).

(ii) Use this to prove that if f(x)=xnf(x) = x^n for some n∈Nn \in \mathbb{N}, then f′(a)=nan−1f'(a) = n a^{n-1}.

Exercise 10.26. Suppose that ff and gg are differentiable at aa.

(i) Compute (f+g)′(a)(f + g)'(a) in terms of f′(a)f'(a) and g′(a)g'(a).
(ii) Compute (fg)′(a)(fg)'(a) in terms of f(a)f(a), g(a)g(a), f′(a)f'(a) and g′(a)g'(a).
(iii) Compute (1f)′(a)\left(\frac{1}{f}\right)'(a) in terms of f′(a)f'(a) and f(a)f(a).

These results are known as the Sum Rule, Product Rule, and (a special case of the) Quotient Rule for Derivatives, respectively.

Exercise 10.27. Suppose ff and gg are differentiable at aa and g(a)≠0g(a) \neq 0.

(i) Show that f(x)g(x)\frac{f(x)}{g(x)} is continuous at aa.
(ii) Show that f(x)g(x)\frac{f(x)}{g(x)} is differentiable at aa, and compute (fg)′(a)\left(\frac{f}{g}\right)'(a) in terms of f(a)f(a), g(a)g(a), f′(a)f'(a) and g′(a)g'(a).

This last result is known as the Quotient Rule for Derivatives.

One of the most important results concerning the differentiation of functions is the Chain Rule for the derivative of a composition of functions. Let f:B→Rf: B \to \mathbb{R}, g:A→Rg: A \to \mathbb{R} be functions such that g(A)⊂Bg(A) \subset B. Thus, the composition (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) is defined for all x∈Ax \in A.

Lemma 10.28. Given ff and gg as above, define a new function ϕ:B→R\phi: B \to \mathbb{R} (note that the domain is the same as the domain of ff) by

ϕ(y)={f(y)−f(g(a))y−g(a),y≠g(a),f′(g(a)),y=g(a).\phi(y) = \begin{cases} \frac{f(y) - f(g(a))}{y - g(a)}, & y \neq g(a), \\ f'(g(a)), & y = g(a). \end{cases}

Then ϕ\phi is continuous at the point g(a)g(a).

Lemma 10.29. With ff and gg as above,

lim⁡x→af(g(x))−f(g(a))g(x)−g(a)=f′(g(a)).\lim_{x \to a} \frac{f(g(x)) - f(g(a))}{g(x) - g(a)} = f'(g(a)).

(Hint: Consider the function ϕ∘g\phi \circ g and distinguish between the two cases when g(x)≠g(a)g(x) \neq g(a) and when g(x)=g(a)g(x) = g(a).)

Theorem 10.30 (Chain Rule). Let a∈Aa \in A, suppose that gg is differentiable at aa and ff is differentiable at g(a)g(a). Then f∘gf \circ g is differentiable at aa and:

(f∘g)′(a)=f′(g(a))⋅g′(a).(f \circ g)'(a) = f'(g(a)) \cdot g'(a).

We finish this sheet with a discussion of maxima and minima of real-valued functions and the most important theorem in differential Calculus, the Mean Value Theorem.

Definition 10.31. Let f:A⟶Rf: A \longrightarrow \mathbb{R} be a function. If f(a)f(a) is the last point of f(A)f(A), then f(a)f(a) is called the maximum value of ff. If f(a)f(a) is the first point of f(A)f(A), then f(a)f(a) is the minimum value of ff. We say that f(a)f(a) is a local maximum value of ff if there exists a region RR containing aa such that f(a)f(a) is the last point of f(A∩R)f(A \cap R). We say that f(a)f(a) is a local minimum value of ff if there exists a region RR containing aa such that f(a)f(a) is the first point of f(A∩R)f(A \cap R).

Remark 10.32. Equivalently, f(a)f(a) is a local maximum (resp. minimum) value of ff if there exists UU open in AA such that f(a)f(a) is the last (resp. first) point of f(U)f(U).

Theorem 10.33. Let f:A⟶Rf: A \longrightarrow \mathbb{R} be differentiable at aa. Suppose that f(a)f(a) is the maximum value or minimum value of ff. Then f′(a)=0f'(a) = 0.

Corollary 10.34. Let f:A⟶Rf: A \longrightarrow \mathbb{R} be differentiable at aa. Suppose that f(a)f(a) is a local maximum or local minimum value of ff. Then f′(a)=0f'(a) = 0.

Theorem 10.35 (Rolle's Theorem). Suppose that f:[a,b]⟶Rf: [a,b] \longrightarrow \mathbb{R} is continuous, differentiable on (a,b)(a,b) and that f(a)=f(b)=0f(a) = f(b) = 0. Then there exists a point c∈(a,b)c \in (a,b) such that f′(c)=0f'(c) = 0.

By Corollary 5.13 Extreme Value Theorem.

Corollary 10.36 (The Mean Value Theorem). Suppose that f:[a,b]⟶Rf: [a,b] \longrightarrow \mathbb{R} is continuous and differentiable on (a,b)(a,b). Then there exists a point c∈(a,b)c \in (a,b) such that:

f(b)−f(a)=f′(c)(b−a).f(b) - f(a) = f'(c)(b - a).