{
  "id": "weierstrass-function",
  "title": "Weierstrass Function",
  "lang": "en",
  "source_lang": "en",
  "summary": "The Weierstrass function is a continuous, nowhere-differentiable function constructed as an infinite sum of cosine waves with decreasing amplitudes and increasing frequencies.",
  "category": "mathematics",
  "subcategory": "analysis",
  "type": "concept",
  "aliases": [
    "Weierstrass’s nowhere-differentiable function",
    "Weierstrass cosine function"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/weierstrass-function/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/weierstrass-function/",
      "json": "https://aiwiki.page/zh/weierstrass-function.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The Weierstrass function is a family of real-valued functions best known for providing explicit examples that are continuous everywhere but differentiable nowhere. Introduced by Karl Weierstrass in 1872, it showed that a continuous function need not possess a finite derivative at even a single point. Its construction combines increasingly rapid cosine oscillations with increasingly small amplitudes, producing a well-defined curve whose irregularity persists at arbitrarily small scales."
    },
    {
      "heading": "Definition",
      "text": "A standard form is\n\n\\[W_{a,b}(x)=\\sum_{n=0}^{\\infty}a^n\\cos(\\pi b^n x),\\]\n\nwhere \\(x\\) is a real number, \\(0<a<1\\), and \\(b>1\\). The parameter \\(a\\) controls how quickly the amplitudes decrease, while \\(b\\) controls how quickly the frequencies increase.\n\nIn the classical construction, \\(b\\) is an odd positive integer greater than \\(1\\), and the parameters satisfy\n\n\\[ab>1+\\frac{3\\pi}{2}.\\]\n\nUnder these sufficient conditions, the function is continuous everywhere and nowhere differentiable. The inequality is stronger than necessary: later results established nowhere differentiability under substantially weaker assumptions.\n\nAnother common convention is\n\n\\[\\widetilde W_{a,b}(x) =\\sum_{n=0}^{\\infty}a^n\\cos(2\\pi b^n x).\\]\n\nThis changes only the horizontal scale, since \\(\\widetilde W_{a,b}(x)=W_{a,b}(2x)\\).\n\nThe name is also used for related constructions with different periodic functions in place of cosine. It should not be confused with the Weierstrass elliptic function, usually denoted \\(\\wp\\), which belongs to complex analysis."
    },
    {
      "heading": "Convergence and continuity",
      "text": "The continuity of the function follows from uniform convergence. Each summand is continuous, and\n\n\\[\\left|a^n\\cos(\\pi b^n x)\\right|\\leq a^n\\]\n\nfor every real \\(x\\). The bounding geometric series converges:\n\n\\[\\sum_{n=0}^{\\infty}a^n=\\frac{1}{1-a}.\\]\n\nConsequently, the Weierstrass M-test shows that the defining series converges absolutely and uniformly on the entire real line. A uniform limit of continuous functions is continuous, so \\(W_{a,b}\\) is continuous everywhere.\n\nThe same bound gives\n\n\\[|W_{a,b}(x)|\\leq \\frac{1}{1-a}.\\]\n\nFor the partial sum\n\n\\[S_N(x)=\\sum_{n=0}^{N}a^n\\cos(\\pi b^n x),\\]\n\nthe approximation error satisfies\n\n\\[\\sup_{x\\in\\mathbb R}|W_{a,b}(x)-S_N(x)| \\leq \\frac{a^{N+1}}{1-a}.\\]\n\nWhen \\(b\\) is an integer, the function is even and has period \\(2\\). The convention using \\(2\\pi\\) instead of \\(\\pi\\) gives period \\(1\\)."
    },
    {
      "heading": "Why differentiability fails",
      "text": "Every finite partial sum is infinitely differentiable. Formally differentiating the infinite series, however, gives\n\n\\[-\\pi\\sum_{n=0}^{\\infty}(ab)^n\\sin(\\pi b^n x).\\]\n\nIf \\(ab>1\\), the amplitudes of these formal derivative terms grow rather than decay. This expresses the mechanism behind the function’s roughness: the original waves become smaller, but their slopes become steeper.\n\nThis observation alone is not a proof of nowhere differentiability. A function can have a derivative even when a proposed term-by-term differentiation procedure fails. A rigorous argument must control the actual difference quotients\n\n\\[\\frac{W_{a,b}(x+h)-W_{a,b}(x)}{h}\\]\n\nas \\(h\\) approaches zero, or use equivalent analytic estimates that would be incompatible with a finite derivative.\n\nThe relevant scale is \\(h\\) comparable to \\(b^{-N}\\). At that scale, the \\(N\\)-th oscillation has amplitude approximately \\(a^N\\), so its amplitude divided by the horizontal scale is approximately\n\n\\[\\frac{a^N}{b^{-N}}=(ab)^N.\\]\n\nWhen \\(ab>1\\), this quantity increases with \\(N\\). Proofs must additionally handle cancellation among the different frequencies.\n\nWeierstrass’s original parameter restriction made such estimates possible. In 1916, G. H. Hardy established stronger results; in particular, for integer \\(b\\geq2\\), \\(0<a<1\\), and \\(ab\\geq1\\), the function has no finite derivative at any point.\n\nHere, nowhere differentiable means that no point admits a finite, two-sided derivative. It does not mean that every difference quotient tends to infinity, or that all points exhibit the same kind of limiting behavior."
    },
    {
      "heading": "Smooth and rough parameter regimes",
      "text": "The contrast between continuity and differentiability depends on the relationship between amplitude decay and frequency growth.\n\nThe regime \\(ab<1\\)\n\nIf \\(ab<1\\), the differentiated series is bounded term by term by the convergent series\n\n\\[\\pi\\sum_{n=0}^{\\infty}(ab)^n.\\]\n\nStandard term-by-term differentiation results then give\n\n\\[W_{a,b}'(x) =-\\pi\\sum_{n=0}^{\\infty}(ab)^n\\sin(\\pi b^n x),\\]\n\nwith a continuous derivative. Thus, not every function written in Weierstrass-series form is nowhere differentiable.\n\nMore generally, if \\(k\\) is a positive integer and\n\n\\[ab^k<1,\\]\n\nthen the function has \\(k\\) continuous derivatives.\n\nThe regime \\(ab>1\\)\n\nFor integer \\(b\\geq2\\), this is the standard rough regime. A useful regularity exponent is\n\n\\[\\alpha=-\\frac{\\log a}{\\log b},\\]\n\nwhich lies between \\(0\\) and \\(1\\). Equivalently, \\(a=b^{-\\alpha}\\).\n\nThe function satisfies a Hölder continuity estimate\n\n\\[|W_{a,b}(x+h)-W_{a,b}(x)| \\leq C|h|^\\alpha\\]\n\nfor a constant \\(C\\) depending on the parameters.\n\nTo obtain this estimate, split the series near the index \\(N\\) for which \\(b^N|h|\\) is of order \\(1\\). For lower frequencies, use\n\n\\[|\\cos(u+v)-\\cos u|\\leq |v|;\\]\n\nfor higher frequencies, use the bound \\(2\\). The two parts are bounded by constant multiples of\n\n\\[|h|\\sum_{n=0}^{N}(ab)^n \\quad\\text{and}\\quad \\sum_{n>N}a^n,\\]\n\nrespectively. Both have order \\(|h|^\\alpha\\).\n\nHölder continuity describes a quantitative intermediate level of regularity: the function is continuous, but rougher than a function satisfying Lipschitz continuity."
    },
    {
      "heading": "Scaling and fractal geometry",
      "text": "Separating the first term gives the exact identity\n\n\\[W_{a,b}(x)=\\cos(\\pi x)+aW_{a,b}(bx).\\]\n\nThis expresses a repeating relationship between horizontal magnification by \\(b\\) and vertical scaling by \\(a\\), together with an added smooth cosine term. It explains the recurring fine structure of the graph.\n\nThe graph is therefore an important example in fractal geometry. It is not simply an exact collection of smaller, geometrically identical copies: the cosine term modifies the relationship between scales.\n\nFor integer \\(b\\geq2\\) and \\(1/b<a<1\\), the graph over a period has box-counting dimension\n\n\\[D=2+\\frac{\\log a}{\\log b}=2-\\alpha.\\]\n\nThis dimension lies strictly between \\(1\\) and \\(2\\). Faster amplitude decay makes the graph less rough, while slower amplitude decay produces a graph with dimension closer to \\(2\\).\n\nStatements about dimension require specifying both the definition of dimension and the family of functions involved. The corresponding Hausdorff dimension problem is more delicate; the scaling identity alone does not establish it."
    },
    {
      "heading": "Integration and variation",
      "text": "Nowhere differentiability does not prevent integration. Since \\(W_{a,b}\\) is continuous, it has a Riemann integral on every compact interval.\n\nUniform convergence permits term-by-term integration:\n\n\\[\\int_0^x W_{a,b}(t)\\,dt = \\sum_{n=0}^{\\infty} \\frac{a^n}{\\pi b^n}\\sin(\\pi b^n x).\\]\n\nBy the fundamental theorem of calculus, this defines a continuously differentiable antiderivative whose derivative is \\(W_{a,b}\\). In the nowhere-differentiable regime, that antiderivative has no second derivative at any point.\n\nThe function also has infinite total variation on every nondegenerate compact interval. Indeed, a function of bounded variation is differentiable almost everywhere, which is incompatible with nowhere differentiability. In particular, the Weierstrass function is not absolutely continuous on any such interval."
    },
    {
      "heading": "Historical and mathematical significance",
      "text": "Weierstrass presented his construction in 1872, during the development of rigorous analysis. Earlier examples and related constructions existed, including an unpublished construction by Bernard Bolzano, but Weierstrass’s example became a standard demonstration that continuity and differentiability are fundamentally distinct properties.\n\nIts importance extends beyond supplying a counterexample. It shows that:\n\n- uniform convergence preserves continuity but does not, by itself, preserve differentiability;\n- an infinite sum of smooth functions can be nowhere differentiable;\n- small function values or amplitudes do not imply small slopes;\n- geometric intuition based on finite, smooth drawings can misrepresent limiting behavior.\n\nThe function is also a model example of a lacunary Fourier series, in which the nonzero frequencies are separated by increasingly large gaps. Such series connect the construction to harmonic analysis and the study of fine regularity.\n\nIn numerical visualization, every finite truncation is smooth, even though its limiting function is nowhere differentiable. The uniform tail bound controls vertical approximation error, but it does not control derivatives. Consequently, an accurate plot at a fixed resolution can conceal the increasingly fine oscillations responsible for the limiting curve’s roughness."
    }
  ],
  "links": [
    "mathematical-function",
    "karl-weierstrass",
    "continuous-function",
    "derivative",
    "real-number",
    "complex-analysis",
    "uniform-convergence",
    "geometric-series",
    "lipschitz-continuity",
    "graph-of-a-function",
    "fractal",
    "hausdorff-dimension",
    "riemann-integral",
    "fundamental-theorem-of-calculus",
    "antiderivative",
    "absolute-continuity",
    "mathematical-analysis",
    "fourier-series",
    "harmonic-analysis"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}