Tag: differentiability

  • Can a Function Be Continuous Everywhere but Differentiable Nowhere?

    A basic theorem from calculus says that every differentiable function is continuous. But what about the converse?

    If a function is continuous everywhere, must it be differentiable somewhere?

    It seems reasonable. A continuous graph has no jumps or breaks, and we might expect that if we zoom in far enough, at least some part of the graph should begin to look like a straight line.

    Surprisingly, this intuition is completely wrong.

    There are functions that are continuous at every point and yet differentiable at no point.

    Continuous Does Not Mean Smooth

    We learn early in calculus that

    differentiable⟹continuous.

    The reverse implication is false. Continuity only says that nearby inputs give nearby outputs. It does not say that the graph must have a well-defined tangent line.

    A corner such as the one in the graph of f(x)=|x| already shows that a continuous function can fail to be differentiable at a point.

    But that raises a much more surprising question:

    Can a continuous function have a corner-like failure of smoothness everywhere?

    Weierstrass’s Remarkable Example

    A famous example is the Weierstrass function, constructed from an infinite sum of cosine waves:

    W(x)=∑n=0∞ancos⁡(bnπx).

    Here 0<a<1 and b is chosen sufficiently large.

    For a concrete example, take

    a=12,b=13.

    Then

    W(x)=∑n=0∞12ncos⁡(13nπx).

    What Is Happening?

    Look carefully at the two competing parts of each term.

    The amplitude is

    an.

    Because 0<a<1, these amplitudes become smaller and smaller.

    But the frequency is controlled by

    bn,

    which becomes larger and larger.

    So every new term adds a smaller wave—but a wave that oscillates much more rapidly than the waves before it.

    Watch the Roughness Appear

    Instead of looking immediately at the infinite sum, consider its partial sums

    WN(x)=∑n=0Nancos⁡(bnπx).

    The first term is just a smooth cosine curve. Adding more terms creates smaller and faster oscillations. The graph becomes increasingly rough.

    Every finite partial sum is still perfectly smooth. The strange behavior appears only in the limit as infinitely many increasingly rapid oscillations are added.

    Why Is the Function Continuous?

    The continuity is actually the easier part. Since

    |ancos⁡(bnπx)|≤an,

    and the geometric series

    ∑n=0∞an=11−a

    converges, the Weierstrass series converges uniformly. Each partial sum is continuous, and a uniform limit of continuous functions is continuous.

    Thus W(x) is continuous everywhere.

    So Why Is It Not Differentiable?

    Here is the intuition.

    At any fixed scale, the graph may appear almost smooth. But when we zoom in, terms with higher frequencies become visible. Zoom in again, and still higher-frequency terms reveal another layer of oscillation.

    There is no scale at which the graph finally settles down into a straight line.

    A derivative would require the difference quotient

    W(x+h)−W(x)h

    to approach a single finite value as h→0. For suitable choices of a and b, the increasingly rapid oscillations prevent this from happening at every point.

    A rigorous proof of nowhere differentiability requires more work, but the mechanism is visible directly in the construction: decreasing amplitudes preserve continuity while rapidly increasing frequencies destroy local smoothness.

    A Change in Mathematical Intuition

    Examples like the Weierstrass function were historically important because they challenged the idea that a continuous curve should be smooth except perhaps at a few exceptional points.

    Continuity turns out to permit behavior far more complicated than our geometric intuition initially suggests.

    A function can have no jumps, no breaks, and no discontinuities anywhere—and still have no tangent line anywhere.

    The Main Surprise

    The Weierstrass function separates two ideas that can look almost identical when we first learn calculus:

    continuity and smoothness are not the same thing.

    Even more remarkably, the failure of smoothness does not have to occur at a few isolated points. It can occur at every single point.


    Continue exploring: Continuous functions can behave strangely in other ways too. Can a Curve Fill a Square? The Mathematics of Space-Filling Curves