#02 (08/23/2023)

Continuity

Note that for

lim
xx0 
f(x) = a,
(1)
x does not have to be equal to x0. If, however, f(x0) = a holds, we say that f(x) is continuous at x = x0. In plain words, if f(x) does not have any hole or gap, it is continuous, i.e. f(x) is continuous at x = x0 if

lim
xx0 
f(x) = f(x0).
(2)

Differentiability

In the ϵ−δ language, the definition of differentiability is stated as:
To each ϵ > 0, there exists a δ > 0 such that

f(x0 + h) − f(x0)

h
a
< ϵ,
(3)
whenever
|h| < δ,
and we write
f′(x0) = a.
(4)
In plain words, the above statement is equivalent to

f′(x0)
=

lim
h→ 0 
f(x0 + h) − f(x0)

h
=
a.
(5)
Note that if f(x) is differentiable at x = x0, it is also continuous at x0. The converse is not true, however (counterexample: f(x) = |x|).

Exercise 1

Examine continuity and differentiability of the following function at x = 0.
f(x) =



x sin  1

x
x ≠ 0
0
x = 0
(6)
This function is a combination of the following two graphs.
yequalx.jpg sin1x.jpg
The part x represents the magnitude of f(x) that increases linearly as x increases. The part sin (1/x) is expressed as sin (ωx) where ω = 1/x2 which represents the frequency. As x→ 0, ω(=1/x2) becomes larger and sin (1/x) oscillates rapidly. Thus the graph of f(x) may look like
xsin1x.jpg
Note that f(x) is sandwiched from both sides as

0 ≤
x sin 1

x

≤ |x|
sin  1

x

≤ |x|
(7)
by letting x approach to 0, one obtains

0 ≤
x sin  1

x

≤ 0
(8)
i.e.


lim
x→ 0 
f(x) = f(0),
(9)
so f(x) is continuous at x = 0.
For differentiability,


lim
h→ 0 
f(0+h) − f(0)

h
=

lim
h→ 0 
f(h)

h
=

lim
h→ 0 
h sin  1

h

h
=

lim
h→ 0 
sin ( 1

h
).
(10)
This limit does not exist, hence, f(x) is NOT differentiable at x = 0.

Exercise 2

Examine continuity and differentiability of the following function at x = 0.
f(x) =



x2 sin 1

x
x ≠ 0
0
x = 0
(11)
The graph of f(x) looks like
x2sin1x.jpg
Note that in this case, f(x) behaves much gently around x=0 because x2 (the magnitude of f(x)) approaches to 0 more quickly than x. The function, f(x), is continuous at x = 0 using the same logic as in the previous example. For differentiability,


lim
h→ 0 
f(0 + h) − f(0)

h
=

lim
h→ 0 
f(h)

h
=

lim
h→ 0 
h2 sin 1

h

h
=

lim
h→ 0 
h sin ( 1

h
)
=
0.
(12)
Thus, f(x) is differentiable at x = 0 and

f′(0) = 0.
(13)

Review of some of important derivatives


    (a)

    u

    v

    ′ = uvu v

    v2

    (b)
    (ax)′ = ln(a)  ax

    (c)
    (arctanx)′ = 1

    1+x2

Exercise

Differentiate the following functions:

(a) a x + b

c x + d
(b)


 

1 + xn
 
(c) arctan(arctan (x))
(d)
xx

Numerical Differentiation

Example Suppose we are given a table below and want to compute f′(2). Approximating f′(2) by (f(3) − f(2))/(3 − 2) = 19 results in overestimation and approximating f′(2) by (f(2) − f(1))/(2 − 1) = 7 yields an underestimated result.
x f(x)
1 1
2 8
3 27
4 64
5 125
6 216
numdiff.jpg
It is possible to numerically differentiate a given function using all available data points.
What is known from the table is the difference of f(x), i.e.

f(x) = f(x + h) − f(x),
(14)
where h is the step size.
What is sought for numerical differentiation is the differential operator, D, defined as
D f = f′(x).
(15)
Using the Taylor series expansion for f(x + h),
f(x + h)
=
f(x) + h f′(x) + h2

2!
f"(x) + h3

3!
f"′(x) +…
=
f + h D f + h2 D2

2!
f + h3 D3

3!
f + …
=

1+ hD + (hD)2

2!
+ (hD)3

3!
+ …
f
=
ehD f,
(16)
Therefore, it follows that
f(x + h) − f(x) = eh D f(x) − f(x),
(17)
or
f = (ehD − 1) f.
(18)
This is equivalent to
∆ = eh D − 1,
(19)
or

h D = ln (1 + ∆),
(20)
or
h D = ∆− 2

2
+3

3
4

4
+ …
(21)
or
D = 1

h

∆− 2

2
+3

3
4

4
+ …
.
(22)
Thus, one can express the differential operator, D, with the difference operator, ∆. A table of differences on f(x) can be easily created as
x f(x) f 2 f 3 f 4 f
1 1 7 12 6 0
2 8 19 18 6 X
3 27 37 24 X X
4 64 61 X X X
5 125 X X
Therefore,
f′(2)
=
Df|2
=
1

h

f|22 f|2

2
+3 f|2

3
− …
=
1

1
(19 − 9 + 2 − 0)
=
12.
(23)




File translated from TEX by TTH, version 4.03.
On 22 Aug 2023, 23:16.