Tutorials › AP Calculus › Oscillatory Difference Quotients at a Boundary

Differentiability and Continuity · Tutorial 118 of 999

Oscillatory Difference Quotients at a Boundary

Use a squeeze estimate and carefully chosen inputs to distinguish continuity at zero from the existence of a derivative there.

Beginner 9 min read

What You'll Learn

  • Define the function at zero and state the derivative quotient at that point
  • Prove continuity at zero using a bound on the sine function
  • Simplify the difference quotient without cancelling terms incorrectly
  • Construct inputs approaching zero that make the quotient equal to 1 and -1
  • Explain why these two behaviors rule out a derivative
  • Identify the mistake of inferring differentiability from continuity

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.

Definition: Define \(f:\mathbb{R}\to\mathbb{R}\) by \(f(x)=x\sin(1/x)\) when \(x\ne 0\), and \(f(0)=0\). The derivative at zero exists if the limit \(\lim_{h\to 0}\frac{f(0+h)-f(0)}{h}\) exists as a finite real number.

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\),

$$ |f(x)-f(0)| = |x\sin(1/x)-0| = |x|\,|\sin(1/x)| \le |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.

1
Choose a tolerance.
Let \(\varepsilon>0\) be any desired upper bound on \(|f(x)-f(0)|\).
2
Restrict the input.
Choose \(\delta=\varepsilon\). If \(0<|x-0|<\delta\), then \(|x|<\varepsilon\).
3
Apply the estimate.
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\),

$$ |f(x)-f(0)| = |x|\,|\sin(1/x)| \le |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,

$$ \frac{f(0+h)-f(0)}{h} = \frac{h\sin(1/h)-0}{h} = \sin(1/h). $$

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

$$ \frac{f(h)-f(0)}{h} = \sin(1/h) = \sin(\pi) = 0. $$

Now take \(h=2/\pi\). Then \(1/h=\pi/2\), and

$$ \frac{f(h)-f(0)}{h} = \sin(1/h) = \sin(\pi/2) = 1. $$

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

$$ h_n=\frac{1}{\pi/2+2\pi n}, \qquad k_n=\frac{1}{3\pi/2+2\pi n}. $$

The denominators grow without bound as \(n\) increases, so both sequences consist of positive numbers and approach zero. Substitution into the quotient gives

$$ \frac{f(h_n)-f(0)}{h_n} = \sin(1/h_n) = \sin(\pi/2+2\pi n) = 1, $$ $$ \frac{f(k_n)-f(0)}{k_n} = \sin(1/k_n) = \sin(3\pi/2+2\pi n) = -1. $$

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

$$ \frac{f(h_1)-f(0)}{h_1} = \sin(5\pi/2) = 1. $$

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

$$ \frac{f(k_1)-f(0)}{k_1} = \sin(7\pi/2) = -1. $$

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

$$ \left|\sin(1/h)-L\right|<\frac12. $$

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

$$ |1-L|<\frac12 \qquad\text{and}\qquad |-1-L|<\frac12. $$

By the triangle inequality, these two inequalities would give

$$ 2 = |1-(-1)| \le |1-L|+|L-(-1)| <\frac12+\frac12 = 1, $$

which is impossible. Hence the difference quotient has no limit at zero, and \(f\) is not differentiable there.

Theorem: For the function defined here, \(f\) is continuous at zero but is not differentiable at zero. Continuity follows from \(|f(x)-f(0)|\le |x|\). Differentiability fails because the difference quotient equals \(\sin(1/h)\), which takes the incompatible values \(1\) and \(-1\) along inputs approaching zero.

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.

Common pitfall: Since \(f(h)\to0\), it is incorrect to conclude that \(f(h)/h\to0\). The two limits concern different expressions. In this case the incorrect calculation is \(\lim_{h\to0}f(h)/h=0/0=0\). The form \(0/0\) does not determine a limit; simplifying first gives \(\frac{f(h)}h=\sin(1/h)\), and the sequences above show that this expression has no limit.

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.

  1. What inequality proves that \(f(x)\) approaches \(f(0)\) as \(x\) approaches zero?
  2. For \(h\ne0\), simplify \(\frac{f(h)-f(0)}{h}\).
  3. Why do the inputs \(h_n=1/(\pi/2+2\pi n)\) approach zero?
  4. What quotient value results from the sequence \(k_n=1/(3\pi/2+2\pi n)\)?
  5. Why does \(f(h)\to0\) not imply that \(f(h)/h\to0\)?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats