Function Repository Resource:

# TakagiT

Evaluate the Takagi function

Contributed by: Jan Mangaldan
 ResourceFunction["TakagiT"][x] gives the Takagi function T(x).

## Details

The Takagi function is also known as the blancmange function or the Takagi–Landsberg function.
Mathematical function, suitable for both symbolic and numeric manipulation.
The Takagi function is a self-affine function that is continuous and nowhere differentiable.
The Takagi function is a singly periodic function in x with period 1.
For certain arguments, ResourceFunction["TakagiT"] automatically evaluates to exact values.
ResourceFunction["TakagiT"] can be evaluated to arbitrary numerical precision.
ResourceFunction["TakagiT"] automatically threads over lists.

## Examples

### Basic Examples (1)

Plot the Takagi function:

 In[1]:=
 Out[1]=

### Scope (4)

Evaluate at integers or rationals:

 In[2]:=
 Out[2]=
 In[3]:=
 Out[3]=

Evaluate at inexact real numbers:

 In[4]:=
 Out[4]=
 In[5]:=
 Out[5]=

Parity transformation is automatically applied:

 In[6]:=
 Out[6]=

TakagiT threads elementwise over lists:

 In[7]:=
 Out[7]=

### Applications (2)

Compare the Takagi function with a sum of the successive iterates of the tent map:

 In[8]:=
 In[9]:=
 Out[9]=

Compare the Takagi function with its Fourier series approximation:

 In[10]:=
 In[11]:=
 Out[11]=

### Properties and Relations (2)

The Takagi function satisfies the reflection identity T(1-x)=T(x) for 0≤x≤1:

 In[12]:=
 Out[12]=

The Takagi function satisfies the self-similarity identity T(x/2)=x/2+T(x)/2 for 0≤x≤1:

 In[13]:=
 Out[13]=

## Version History

• 1.0.0 – 10 May 2021