You are on page 1of 7

π π

 
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

|fn (x)| = |fn (x) − ` + `| ≤ |fn (x) − `| + |`| ≤ 1 + |`| , (3)

by the triangle inequality.


Choose k ∈ Z sufficiently large such that

2
< δ and 4k + 1 > 1 + |`|


4k + 2 2

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.


If n = 0 then for x 6= 0, f0 (x) = sin (π/x) which has no limit as x → 0,


as seen in the notes. Similarly g0 (x) = cos (π/x) has no limit as x → 0.

• If n ≤ −1 then fn (x) and gn (x) are continuous only on R \ {0}.

• If n = 0 then f0 (x) and g0 (x) are continuous only on R \ {0}.

• For n ≥ 1, the fn (x) and gn (x) are continuous on R. We can combine


π 
−1 ≤ sin ≤ 1 and − |xn | ≤ xn ≤ |xn |
x
to get π 
− |xn | ≤ xn sin≤ |xn | .
x
Then as x → 0 the Sandwich Rule shows that limx→0 fn (x) = 0. Simi-
larly for gn .

2
Differentiability.

Existence of the first derivatives.

• If n ≤ 0 the functions fn and gn are not continuous at x = 0 and are


thus differentiable only on R \ {0}.

• If n ≥ 1 then, for x = 0, we look at the definition of derivative as a


limit
fn (x) − fn (0) n−1
π 
lim = lim x sin = lim fn−1 (x) . (4)
x→0 x−0 x→0 x x→0

As we’ve seen above, this limit exists only when n − 1 ≥ 1, i.e. n ≥ 2,


when the value is 0. Similarly for gn , hence

• 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.

Continuity of the First derivatives.

• If n ≤ 1 then fn0 (0) and gn0 (0) do not exist so fn0 and gn0 are continuous
only on R \ {0}.

If n ≥ 1 then, for x 6= 0, from the definition we have,


π  π 
fn0 (x) = nxn−1 sin − πxn−2 cos . (5)
x x
which is continuous on R \ {0}. Similarly for gn . With n = 1, (5)becomes
π  π 
f10 (x) = sin − πx−1 cos
x x
Lemma limx→0 f10 (x) and limx→0 g10 (x) do not exist.
Proof We only show this for f10 and leave g10 to the Student.
Note that for any k ∈ Z we have
 
0 1
f1 = sin (2kπ) − 2kπ cos (2kπ) = −2kπ. (6)
2k

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

|f (x)| = |f (x) − ` + `| ≤ |f (x) − `| + |`| ≤ 1 + |`| , (7)

by the triangle inequality.


Choose k ∈ Z sufficiently large such that

1
< δ and |2kπ| > 1 + |`|
2k

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

0 < |x − 0| < δ ⇒ |f20 (x) − `| < π/2. (10)

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. 

If n ≥ 3 then the Sandwich Rule gives both of


π  π 
lim nxn−1 sin = 0 and lim πxn−2 cos = 0.
x→0 x x→0 x

Thus limx→0 fn0 (x) = 0 = fn0 (0) .


All the above also hold for gn , hence

• If n = 2 then f20 and g20 are continuous only on R \ {0}.

• If n ≥ 3, then fn0 and gn0 are continuous on R.

We can sum up the above as

fn and gn are continuous on R iff n ≥ 1,


fn and gn are differentiable on R iff n ≥ 2,
fn0 and gn0 are continuous on R iff n ≥ 3.

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)


− π 2 (n + 2) fn−5 (x) − π 3 gn−6 (x) .


Though the details look complicated, these few results indicate that on con-
(j)
tinued differentiating, fn (x) will be a sum of fn−j , gn−j−1 , fn−j−2 , gn−j−3 ,
etc. down to either fn−2j if j even or gn−2j if j odd. In particular, the prop-
(j)
erties of fn will come from the properties of the fn−k or gn−k , j ≤ k ≤ 2j.
(j)
Thus fn (x) will be continuous on R iff all the fn−k and gn−k , j ≤ k ≤ 2j
are continuous, which by above is equivalent to n − 2j ≥ 1, i.e. 2j ≤ n − 1.
(j)
Similarly fn (x) will be differentiable on R iff all the fn−k and gn−k ,
j ≤ k ≤ 2j are differentiable, which by above is equivalent to n − 2j ≥ 2, i.e.
2j ≤ n − 2.
Hence
(j)
fn (x) is continuous on R iff 2j ≤ n − 1,
(j)
fn (x) is differentiable on R iff 2j ≤ n − 2.
(k)
Example If n = 2k + 1, then fn (x) is continuous on R but is differentiable
only on R \ {0}.

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. .

Finally. In the examples if something goes “wrong”, i.e. non-continuous or


non-differentiable, it happens at x = 0. By looking at fn (x − a) the problems
will occur at x = a. By summing over a, we get functions with problems
that occur in subsets of R. Further, using the ideas that Wierestrass uses to
give continuous functions nowhere differentiable, we can sum over countable
sets of a. This leads to some very interesting ”pathological” functions, i.e. f
differentiable m times but for which f (m) is nowhere differentiable.

Finally, Finally Examples are sometimes given using


 π   π 
n n
fn,m (x) = x sin m and gn,m (x) = x cos m .
x x
I leave it to the Student to check the properties of these functions.

You might also like