One Function, Two Different Behaviors
The function \(x\sin(1/x)\) has a striking feature near zero. Its values become small as \(x\) approaches zero, even though the sine factor continues to oscillate. After defining the function to equal zero at the origin, we can show that it is continuous there.
However, continuity does not guarantee that the difference quotient has a limit. For this function, the quotient simplifies to an oscillating sine expression that repeatedly takes the values \(1\) and \(-1\) arbitrarily close to zero. This gives a precise example of continuity at a point without differentiability there.
The point zero is in the domain, and the function is defined on both sides of it. We will use the derivative definition directly, first proving that the function values approach \(f(0)\), then checking whether the difference quotient approaches a single number.
Continuity at Zero
For every real \(x\), the sine function satisfies \(|\sin(1/x)|\le 1\) when \(x\ne 0\). Therefore, for nonzero \(x\),
As \(x\) approaches zero, the upper bound \(|x|\) approaches zero. The estimate traps the distance between \(f(x)\) and \(f(0)\) between zero and a quantity that can be made arbitrarily small. Here is the direct epsilon-delta argument.
Let \(\varepsilon>0\) be any desired upper bound on \(|f(x)-f(0)|\).
Choose \(\delta=\varepsilon\). If \(0<|x-0|<\delta\), then \(|x|<\varepsilon\).
For such \(x\), \(|f(x)-f(0)|\le |x|<\varepsilon\). This is exactly the condition for continuity at zero.
The value \(f(0)=0\) is important: continuity asks whether nearby function values approach the value assigned at the point. In this case, the estimate proves they do. The oscillation of \(\sin(1/x)\) does not prevent continuity because that factor is multiplied by \(x\), whose magnitude shrinks to zero.
Worked Example: Verifying Continuity for a Specific Tolerance
Suppose the required change in function value is less than \(\varepsilon=0.02\). Choose \(\delta=0.02\). For any \(x\) satisfying \(0<|x|<0.02\),
Thus every input within \(0.02\) of zero, other than zero itself, gives a function value within \(0.02\) of \(f(0)=0\). The estimate works for every positive tolerance, not only \(0.02\), so it verifies continuity at zero.
Check: The chosen \(\delta\) makes the final bound \(|f(x)-f(0)|<\varepsilon\), which is the required continuity condition.
Forming the Difference Quotient
To test differentiability at zero, substitute the function values into the derivative definition. For \(h\ne 0\), \(f(h)=h\sin(1/h)\) and \(f(0)=0\). Therefore,
This simplification is valid because \(h\ne 0\) in the difference quotient. The resulting expression does not settle to a fixed number as \(h\) approaches zero: the input \(1/h\) becomes unbounded, and the sine of that input continues to oscillate.
Worked Example: Evaluating the Quotient at Selected Inputs
Take \(h=1/\pi\). Then \(1/h=\pi\), so the difference quotient is
Now take \(h=2/\pi\). Then \(1/h=\pi/2\), and
These two inputs give different quotient values, but two isolated calculations alone do not prove that a limit fails to exist. For that, we need inputs approaching zero that keep producing incompatible values.
Check: Substituting each chosen \(h\) into \(\sin(1/h)\) gives the displayed values \(0\) and \(1\).
Proving the Difference Quotient Has No Limit
We can choose positive inputs approaching zero for which the quotient equals \(1\), and other positive inputs approaching zero for which it equals \(-1\). For each positive integer \(n\), define
The denominators grow without bound as \(n\) increases, so both sequences consist of positive numbers and approach zero. Substitution into the quotient gives
These identities hold for every positive integer \(n\). Thus, as the inputs approach zero, the quotient has values equal to \(1\) along one sequence and \(-1\) along another. A limit at zero would have to be the same along both sequences, so these behaviors are incompatible with a limit.
Worked Example: Checking the Two Oscillating Sequences
For \(n=1\), the first input is \(h_1=1/(5\pi/2)=2/(5\pi)\). Its reciprocal is \(5\pi/2=\pi/2+2\pi\), so
For the second sequence, \(k_1=1/(7\pi/2)=2/(7\pi)\). Its reciprocal is \(7\pi/2=3\pi/2+2\pi\), so
As \(n\) increases, the denominators \(\pi/2+2\pi n\) and \(3\pi/2+2\pi n\) increase without bound, so \(h_n\to0\) and \(k_n\to0\). The same substitutions give quotient values \(1\) and \(-1\) for every \(n\), not just for \(n=1\).
Check: The inputs tend to zero, while their quotient values remain separated by \(2\). They therefore cannot both approach one common limit.
The contradiction can also be stated directly using the definition of a limit. Suppose, for contradiction, that the quotient has a limit \(L\) as \(h\to0\). Using tolerance \(1/2\), there would be some \(\delta>0\) such that every \(h\) with \(0<|h|<\delta\) satisfies
Because both sequences approach zero, we can choose \(n\) large enough that \(0<h_n<\delta\) and \(0<k_n<\delta\). The displayed limit condition would then imply
By the triangle inequality, these two inequalities would give
which is impossible. Hence the difference quotient has no limit at zero, and \(f\) is not differentiable there.
Why Continuity Does Not Settle Differentiability
Continuity controls the size of the change in function value. In this example, the estimate \(|f(x)|\le |x|\) forces the graph’s values toward zero. Differentiability asks for more: the ratio of the change in function value to the change in input must approach one finite value.
Here the function value has a shrinking factor \(x\), but dividing by the input \(h\) cancels that factor. The quotient is left with \(\sin(1/h)\), whose oscillations have full amplitude. Thus, the function values can converge while their ratios to the input changes do not.
The distinction is useful whenever a function approaches its value at a point rapidly or irregularly. A continuity estimate may prove that the numerator of a difference quotient becomes small, but it does not by itself control what happens after division by the input change. For differentiability, the quotient itself must settle to a single finite number.
Check Your Understanding
Use the definition of the function and the difference quotient to answer the following questions.
- What inequality proves that \(f(x)\) approaches \(f(0)\) as \(x\) approaches zero?
- For \(h\ne0\), simplify \(\frac{f(h)-f(0)}{h}\).
- Why do the inputs \(h_n=1/(\pi/2+2\pi n)\) approach zero?
- What quotient value results from the sequence \(k_n=1/(3\pi/2+2\pi n)\)?
- Why does \(f(h)\to0\) not imply that \(f(h)/h\to0\)?