# Blancmange curve

In mathematics, the blancmange curve is a fractal curve constructible by midpoint subdivision. It is also known as the Takagi curve, after Teiji Takagi who described it in 1903, or as the Takagi–Landsberg curve, a generalization of the curve named after Takagi and Georg Landsberg. The name blancmange comes from its resemblance to a pudding of the same name. It is a special case of the more general de Rham curve.

## Definition

The blancmange function is defined on the unit interval by

${\rm blanc}(x) = \sum_{n=0}^\infty {s(2^{n}x)\over 2^n},$

where $s(x)$ is defined by $s(x)=\min_{n\in{\bold Z}}|x-n|$, that is, $s(x)$ is the distance from x to the nearest integer.

The Takagi–Landsberg curve is a slight generalization, given by

$T_w(x) = \sum_{n=0}^\infty w^n s(2^{n}x)$

for a parameter w; thus the blancmange curve is the case $w=1/2$. The value $H=-\log_2 w$ is known as the Hurst parameter.

The function can be extended to all of the real line: applying the definition given above shows that the function repeats on each unit interval.

## Properties

### Convergence and continuity

The infinite sum defining $T_w(x)$ converges absolutely for all x: since $0\le s(x) \le 1/2$ for all $x\in \mathbb{R}$, we have:

$\sum_{n=0}^\infty |w^n s(2^n x)| \le 1/2 \sum_{n=0}^\infty |w|^n = \frac{1}{2} \cdot \frac{1}{1-|w|}$ if $|w|<1$.

Therefore, the Takagi curve of parameter w is defined on the unit interval (or $\mathbb{R}$) if $|w|<1$.

The Takagi function of parameter w is continuous. Indeed, the functions $T_{w,n}$ defined by the partial sums $T_{w,n}(x) = \sum_{k=0}^n w^k s(2^k x)$ are continuous and converge uniformly toward $T_w$, since:

$\left|T_w(x) - T_{w,n}(x)\right| = \left|\sum_{k=n+1}^\infty w^k s(2^k x)\right| = \left|w^{n+1} \sum_{k=0}^\infty w^k s(2^{k+n+1} x)\right| \le \frac{|w|^{n+1}}{2} \cdot \frac{1}{1-|w|}$ for all x when $|w| < 1$.

This value can be made as small as we want by selecting a big enough value of n. Therefore, by the uniform limit theorem, $T_w$ is continuous if |w|<1.

### The special case of the parabola

For $w=1/4$, one obtains the parabola: the construction of the parabola by midpoint subdivision was described by Archimedes.

### Differentiability

The Takagi curve is a fractal for parameters $w \ne 1/4$, as it is nowhere differentiable.

## Graphical construction

The blancmange curve can be visually built up out of triangle wave functions if the infinite sum is approximated by finite sums of the first few terms. In the illustration below, progressively finer triangle functions (shown in red) are added to the curve at each stage.

 n = 0 n ≤ 1 n ≤ 2 n ≤ 3

## Recursive Definition

The periodic version of the Takagi curve can also be defined recursively by:

$T_w(x) = s(x) + w T_w(2x)$.

The version restricted to the unit interval can also be defined recursively by:

$T_w(x) = \begin{cases} x + w T_w(2x) & \text{if }0\leq x\leq 1/2 \\ (1-x) + w T_w(2x-1) & \text{if }1/2 < x\leq 1. \end{cases}$

Proof:

\begin{align} T_w(x) &= \sum_{n=0}^\infty w^n s(2^{n}x)\\ &= s(x) + \sum_{n=1}^\infty w^n s(2^{n}x)\\ &= s(x) + w\sum_{n=0}^\infty w^n s(2^{n+1}x)\\ &= s(x) + wT_w(2x) \end{align}.

## Other Properties

### Integrating the Blancmange curve

Given that the integral of ${\rm blanc}(x)$ from 0 to 1 is 1/2, the identity ${\rm blanc}(x)= {\rm blanc}(2x)/2+s(x)$ allows the integral over any interval to be computed by the following relation. The computation is recursive with computing time on the order of log of the accuracy required.

\begin{align} I(x) &= \int_0^x{\rm blanc}(x)\,dx,\\ I(x) &=\begin{cases} 1/2+I(x-1) & \text{if }x \geq 1\\ 1/2-I(1-x) & \text{if }1/2 < x < 1 \\ I(2x)/4+x^2/2 & \text{if } 0 \leq x \leq 1/2 \\ -I(-x) & \text{if } x < 0 \end{cases} \\ \int_a^b{\rm blanc}(x)\,dx &= I(b) - I(a). \end{align}

### Relation to simplicial complexes

Let

$N=\binom{n_t}{t}+\binom{n_{t-1}}{t-1}+\ldots+\binom{n_j}{j},\quad n_t > n_{t-1} > \ldots > n_j \geq j\geq 1.$

Define the Kruskal–Katona function

$\kappa_t(N)={n_t \choose t+1} + {n_{t-1} \choose t} + \dots + {n_j \choose j+1}.$

The Kruskal–Katona theorem states that this is the minimum number of (t − 1)-simplexes that are faces of a set of N t-simplexes.

As t and N approach infinity, $\kappa_t(N)-N$ (suitably normalized) approaches the blancmange curve.