5.2 Limits of Functions and Derivatives 151
for h = 0. Note that the differentiability of f is equivalent to the existence of the
limit of φ at 0. Note that since I is an open interval, if a is in I , there exists a δ>0
such that (a + δ, a −δ) ⊂ I (see the exercises). If h is in (−δ,δ), then a + h is in
(a −δ, a +δ) ⊂ I. Hence, φ is defined on D =(−δ, 0) ∪(0,δ).Ifweleth
n
=
δ
2n
,
then h
n
is always in D, is never 0, and converges to 0. Hence, h
n
is in the set of
sequences in D converging to 0. Therefore, this set is not empty, and the question
of a limit of φ at 0 is meaningful.
The following result is quite useful to compute derivatives. It formalizes the ob-
servation that the limit of a function at a does not depend on what happens at a.
Lemma Assume that f and g are defined on D =(−δ,0) ∪(0,δ) for some δ>0.
Assume also that
f(x)=g(x) for x =0
and that
lim
x→ 0
g(x) =.
Then is also the limit of f as x approaches 0.
In order to prove the lemma, let x
n
be a sequence in D that converges to 0 and
such that x
n
=0 for all n. Since x
n
=0, we have
f(x
n
) =g(x
n
) for every n.
That is, the sequences f(x
n
) and g(x
n
) are identical. Since g(x
n
) converges to ,so
does f(x
n
), and this proves that is the limit of f as x approaches 0. The lemma is
proved.
Example 5.16 A constant function is differentiable, and its derivative is 0.
For a real c,letg(x) =c for all x in R. Then, for any real a,
g(a +h) −g(a)
h
=0 for all h =0.
Note that the functions on the left-hand side and right-hand side are equal except for
h =0. The r.h.s. is a constant and so has a limit as h goes to 0. By the lemma, so does
the r.h.s. We get g
(a) =0 for all a. This shows that g is differentiable everywhere
and that its derivative is identically 0.
Example 5.17 The function f(x) = x
2
is defined on the open interval I =
(−∞, ∞). Note that
f(a+h) −f(a)=(a +h)
2
−a
2
=h(2a +h).
Hence,
f(a+h) −f(a)
h
=2a +h for all h =0.