Professional Documents
Culture Documents
Functions based on sin x and cos x .
Introduction
In Complex Analysis if a function is differentiable it has derivatives of all
orders. In Real Analysis the situation is very different.
Using sin (π/x) and cos (π/x) it is possible, for any m ≥ 1, to construct a
function, f , which has m derivatives on R but for which f (m+1) (x) does not
exist for all x ∈ R.
Though f (m) (x) will not be differentiable for all x ∈ R we can construct
it so that it is continuous on all of R, or even not continuous on all of R.
The functions.
Define, for n ∈ Z,
( π ( π
xn sin if x 6= 0 xn cos if x 6= 0
fn (x) = x and gn (x) = x
0 if x = 0. 0 if x = 0.
These functions have derivatives of all orders on R \ {0}. The interest comes
when x = 0.
Continuity on R.
If n ≤ −1 then limx→0 fn (x) and limx→0 gn (x) do not exist. In fact, write
n = −m with m ≥ 1, then with k ∈ Z,
1
fn = (2k)m sin (2kπ) = 0,
2k
m m
2 4k + 1 1 4k + 1
fn = sin 2k + π =
4k + 1 2 2 2
4k + 1
≥ , since m ≥ 1, (1)
2
1
gn = (2k)m cos (2kπ) = (2k)m
2k
≥ 2k, since m ≥ 1, (2)
m
2 4k + 1 1
gn = cos 2k + π = 0.
4k + 1 2 2
1
Lemma If n ≤ −1 then limx→0 fn (x) and limx→0 gn (x) do not exist.
Proof Assume that limx→0 fn (x) exists, called ` say.
Choose ε = 1 in the definition of limit to find δ > 0 such that 0 <
|x − 0| < δ ⇒ |fn (x) − `| < 1. But then, for these x we have
both hold. Then we get a contradiction since, by (3), |2/ (4k + 2)| < δ implies
|fn (2/ (4k + 2))| ≤ 1 + |`| which by (1) implies |(4k + 1) /2| ≤ 1 + |`|. So we
have both |(4k + 1) /2| > 1 + |`| and |(4k + 1) /2| ≤ 1 + |`|, a contradiction.
Hence the last assumption is false and thus limx→0 fn (x) does not exist.
A similar proof shows that limx→0 gn (x) does not exist.
2
Differentiability.
• If n = 1 then f10 (0) and g10 (0) are not defined and so f1 and g1
are differentiable only on R \ {0}.
• If n ≥ 2, then (4) and the similar result for gn give fn0 (0) = 0 and
gn0 (0) = 0. Thus fn and gn are differentiable at x = 0 and thus
on R.
• If n ≤ 1 then fn0 (0) and gn0 (0) do not exist so fn0 and gn0 are continuous
only on R \ {0}.
3
Assume that limx→0 f10 (x) exists, called ` say. Choose ε = 1 in the definition
of limit to find δ > 0 such that 0 < |x − 0| < δ ⇒ |f (x) − `| < 1. But then,
for these x we have
both hold. Then we get a contradiction since, by (7), |1/2k| < δ implies
|f (1/2k)| ≤ 1 + |`| which by (6) implies |2kπ| ≤ 1 + |`|. So we have both
|2kπ| > 1 + |`| and |2kπ| ≤ 1 + |`|, a contradiction.
Hence the last assumption is false and thus limx→0 f10 (x) does not exist.
So f10 (x) and g01 (x) fail to be continuous at x = 0 for two reasons, f10 (0)
and g01 (0) do not exist, and limx→0 f10 (x) and limx→0 g10 (x) do not exist.
For f20 (x) and g02 (x) both f20 (0) and g02 (0) both exist, but what about
the limits at 0?
If n = 2 then (5) becomes
π π
f20 (x) = 2x sin − π cos .
x x
Lemma limx→0 f20 (x) and limx→0 g20 (x) do not exist.
Proof We only show this for f20 and leave g20 to the Student.
Note that for any k ∈ Z we have
0 1 2
f2 = sin (2kπ) − π cos (2kπ) = −π, (8)
2k 2k
0 1 2
f2 = sin ((2k + 1) π) − π cos ((2k + 1) π) = π. (9)
2k + 1 2k + 1
Assume that limx→0 f20 (x) exists, called ` say. Choose ε = π/2 in the
definition of limit to find δ > 0 such that
4
Choose k ∈ Z sufficiently large such that |1/2k| < δ for then (10) implies
|f20 (1/2k) − `| < π/2, i.e.
|−π − `| < π/2
by (8) .
Next choose k ∈ Z sufficiently large such that |1/ (2k + 1)| < δ for then
(10) implies |f20 (1/ (2k + 1)) − `| < π/2, i.e.
|π − `| < π/2
by (8) .
So ` is both close to π and −π! We see this contradiction more clearly
by using the triangle inequality to say
2π = |2π| = |π − ` + π + `|
≤ |π − `| + |π + `|
< π/2 + π/2 = π.
This contradiction means that the last assumption is false and thus limx→0 f20 (x)
does not exist.
Higher Derivatives.
5
Note that if x 6= 0 then (5) can be written as
fn0 (x) = nfn−1 (x) − πgn−2 (x) . (11)
Similarly
gn0 (x) = ngn−1 (x) + πfn−2 (x) . (12)
Differentiating (11) then gives
0 0
fn(2) (x) = nfn−1 (x) − πgn−2 (x)
= n ((n − 1) fn−2 (x) − πgn−3 (x)) − π ((n − 2) gn−3 (x) + πfn−4 (x))
on substituting (11) and (12) ,
= n (n − 1) fn−2 (x) − π (2n − 2) gn−3 (x) + π 2 fn−4 (x) , (13)
on collecting terms.
Continue by differentiating (13) to get
0 0 0
fn(3) (x) = n (n − 1) fn−2 (x) − π (2n − 2) gn−3 (x) + π 2 fn−4 (x)
= n (n − 1) ((n − 2) fn−3 (x) − πgn−4 (x))
− π (2n − 2) ((n − 3) gn−4 (x) + πfn−5 (x))
+ π 2 ((n − 4) fn−5 (x) − πgn−6 (x))
= n (n − 1) (n − 2) fn−3 (x) − π 3n2 − 9n + 6 gn−4 (x)
6
(`−1) (`)
If n = 2` then fn (x) is differentiable on R, but fn (x) is differentiable
only on R \ {0}.
Example If you required a function that is differentiable on R 100 times
but not 101 times, and with a 100th derivative that is continuous on all of R
choose f201. .
If you required a function that is differentiable on R 100 times but not
101 times, and with a 100th derivative that is not continuous on all of R
choose f202. .