### A Few Wild Functions

Sine Function: ${\mathbf{y=\sin x}}$

The function ${y=\sin x}$ is beautifully behaved, oscillating regularly along the entire real line ${\mathbb{R}}$ (it is also well-behaved for complex ${x}$ but we won’t consider that here).

The sine function, the essence of good behaviour.

Chirp Function: ${\mathbf{y=\sin x^2}}$

Now ${y=\sin x^2}$ is also well-behaved: its oscillations become more rapid as ${|x|}$ increases, but nothing really bad happens. This is called a chirp function, as, if we write it as ${y=\sin \omega x}$ we see that the `frequency’ ${\omega=x}$ increases with ${x}$. The derivative is ${y=2x\cos x^2}$, which is regular throughout ${\mathbb{R}}$.

The function {y=\sin x^2}, a so-called chirp function.

Function ${\mathbf{y=\sin(1/x)}}$

Now let’s get more adventurous and turn the argument of the first function upside-down: ${y=\sin(1/x)}$. Since ${1/x}$ is not defined for ${x=0}$, we complete the definition by setting ${y(0)=0}$. The graph below shows that it is getting wild near the origin. The derivative is ${y= (-1/x^2)\cos 1/x}$, which is even wilder at ${x=0}$.

The function {y=\sin 1/x} gets wild near {x=0}.

Function ${\mathbf{y=x\sin(1/x)}}$

Let us try to control the wildness at ${x=0}$ by multiplying by ${x}$, defining ${y=x\sin 1/x}$. Although ${y\longrightarrow0}$ as ${x\longrightarrow0}$ the derivative is ${y^\prime = \sin 1/x - (1/x)\cos 1/x}$, which blows up there. Here is the graph of ${y=x\sin 1/x}$:

The function {y=x\sin 1/x} looks fine near {x=0}, but the derivative blows up.

Function ${\mathbf{y=x^2\sin(1/x)}}$

Now let us further constrain the behaviour of the function near the origin by defining ${y=x^2 \sin 1/x}$. The derivative is ${y^\prime = 2x\sin 1/x - \cos 1/x}$, which oscillates wildly as ${x\longrightarrow0}$, but at least it doesn’t blow up!

The function {y=x^2\sin 1/x} looks fine near {x=0}. The derivative oscillates wildly but does not blow up.

Function ${\mathbf{y=x^2\sin(1/x^2)}}$

Finally, we define ${y=x^2 \sin 1/x^2}$ (with ${y(0)=0}$ as usual). This function is bounded on any bounded interval. But ${y^\prime = 2x\sin 1/x^2 - (2/x)\cos 1/x^2}$, which is unbounded as ${x\longrightarrow0}$. Let us look at the picture:

The function {y=x^2\sin 1/x^2} looks fine near {x=0}. The derivative is unbounded near {x=0}, yet {y^\prime(0)=0}.

Non-commuting Limits

The function is squeezed between two parabolas, ${y=\pm x^2}$; surely, its derivative must vanish at ${x=0}$. Let us check the fundamental definition

$\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x} = \lim_{h\rightarrow0} \left[ \frac{y(h)-y(0)}{h} \right] = \lim_{h\rightarrow0} \left[ h \sin 1/h^2 \right] = 0 \,.$

Thus the derivative vanishes: ${y^\prime(0)=0}$. But close to ${x=0}$ it oscillates wildly, and the limit does not exist:

$\displaystyle \lim_{x\rightarrow0} y^\prime(x) \ \ \mbox{does not exist} \qquad\mbox{so}\qquad y^\prime(0) \ne \lim_{x\rightarrow0} y^\prime(x) \,.$

*        *        *        *        *        *

Peter Lynch’s book about walking around the coastal counties of Ireland is now available as an ebook (at a very low price!). For more information and photographs go to RRI.