# Drawing by lifting pencil from paper can still beget continuous function.

From page 105 of the 1994 edition of Spivak's Calculus:

A continuous function is sometimes described, intuitively, as one whose graph can be drawn without lifting your pencil from the paper. Consideration of the continuous function $$f(x) = \begin{cases} x \sin \frac 1x, & \text{if }x\neq 0 \\ x, & \text{if }x=0 \end{cases}$$ shows that this description is a little too optimistic.

What does Spivak mean? $f(x)$ can be drawn without lifting the pen, can't it? http://www.wolframalpha.com/input/?i=x+sin+(1%2Fx)

(On the other hand, the function $x \mapsto x$ with domain $\mathbb R -\{0\}$ is clearly continuous but can't be drawn without lifting the pen.)

• Well, it's going to be hard for anyone to draw the function in a neighborhood of zero. Certainly the function equals zero there, but can you see how the $\,x\sin1/x\,$ part looks close to zero? A mess to accurately draw it (in fact, impossible), though some approximation can be made – DonAntonio Jan 27 '13 at 15:17
• But still, the function is only almost an essential discontinuity at 0 -- not an actual essential discontinuity -- so shouldn't it still be possible to draw without lifting the pen? – Ryan G Jan 27 '13 at 15:27
• The curve from one side of zero to the other has infinite length, I think (based on estimating the lengths of the zigzags as curve hits $1/x$ then $-1/x$ in turn). Maybe one could say that if drawn, either the pen speed becomes infinite, or it takes infinitely long to draw. – coffeemath Jan 27 '13 at 15:31
• @coffeemath Ah, now Spivak's example is more acceptable--thank you. (I will accept your answer if you post it below.) – Ryan G Jan 27 '13 at 15:34
• Putting aside things like drawing speed, I think the "without lifting the pen" criterion mostly captures the fact that the graph is connected rather than continuous. For functions on intervals in the real line, this is the first order approximation for students to glom onto. Naturally that breaks down outside such nice circumstances, but that is why it's only an approximation. – rschwieb Jan 27 '13 at 16:05

## 1 Answer

The curve has infinite length between $x=-1/\pi$ and $x=1/\pi$. To see this note that it passes through each point $$\left(\frac{2}{(4k+1)\pi},\frac{2}{(4k+1)\pi}\right)$$ just before passing through $$\left(\frac{2}{(4k+3)\pi},\frac{-2}{(4k+3)\pi}\right).$$ The distance between these two points is at least the absolute value of $\Delta y$, which is $$(2/\pi)\left[\frac{1}{4k+1}+\frac{1}{4k+3}\right]$$ which as $k \to \infty$ is asymptotic to $\frac{1}{k\pi}.$ [the same asymptotic estimate occurs between the points going with $1/(4k+3)\pi$ and $1/(4k+5)\pi.$]

So by limit comparison with the sum $\sum 1/(k\pi)$, and the fact that the length computed along straight line segments is less than the curve length, we see there is indeed infinite length as claimed.

This means when drawn the pen point would have to move with unbounded speed, or else that it would take an infinitely long time to draw.