The Volterra Function

whose derivative is Riemann Non-integrable
In[]:=
ClearAll["Global`*"];

The Smith-Volterra-Cantor Set

In this section, we construct several iterations of Smith-Volterra-Cantor set by marking its pair of points indicating the interval being removed.
In[]:=
ClearAll[SVC,SVCG];​​SVC[0]={0,1};​​SVC[n_]:=Ifn>0,Sort@FlattenJoinTableIfOddQ[k]&&k<Length[SVC[n-1]],
SVC[n-1][[k]]+SVC[n-1][[k+1]]
2
-
1
2
n
4
,
SVC[n-1][[k]]+SVC[n-1][[k+1]]
2
+
1
2
n
4
,Nothing,{k,1,Length[SVC[n-1]]},SVC[n-1],​​SVC[0];
SVC[4]
Out[]=
0,
9
128
,
11
128
,
5
32
,
7
32
,
37
128
,
39
128
,
3
8
,
5
8
,
89
128
,
91
128
,
25
32
,
27
32
,
117
128
,
119
128
,1
In[]:=
SVCG=SVC[4];​​​​Graphics[Table[If[OddQ[k],Line[{{SVCG[[k]],0},{SVCG[[k+1]],0}}]],{k,1,Length[SVCG]}],ImageSizeLarge,PlotRange{{-0.2,1.2},{-0.2,0.2}}]
Out[]=

The Volterra Function

The Volterra function is constructed recursively, by using
2
x
sin
1
x
.
1
.
Consider subinterval
0,
1
8

, find the maximum zero
z
1
for the derivative of
2
x
sin
1
x
in this interval, and make a piecewise defined function
f
1
such that
f
1
(x)
2
x
sin
1
x
on
[0,
z
1
]
but
f
1
(x)
2
z
1
sin
1
z
1
on

z
1
,
1
8

. Define the function
f
1
(x)
symmetrically on

1
8
,
1
4

, set
f
1
(x)0
elsewhere, and shift the graph of
f
1
(x)
to the right by the amount
3
8
, such that the
supp
f
1
⊂
3
8
,
5
8

.
2
.
Consider subinterval
0,
1
2·
2
4

, find the maximum zero
z
2
for the derivative of
2
x
sin
1
x
inside of this interval, and make a piecewise defined function
f
2
such that
f
2
(x)
2
x
sin
1
x
on
[0,
z
2
]
but
f
2
(x)
2
z
2
sin
1
z
2
on

z
2
,
1
2·
2
4

. Define the function
f
2
(x)
symmetrically on

1
2·
2
4
,
1
2
4

, set
f
2
(x)0
elsewhere, and shift the graph of
f
2
(x)
to the right by the amount
5
32
and
25
32
respectively.
3
.
Do the same thing again and again.
4
.
The Volterra function is defined by adding altogether all such functions.
​
In[]:=
Chi[a_,b_,x_]:=Piecewise[{{1,a<x<b}},0];​​V[a_,b_,x_]:=Module{z},z=Maxu/.NSolve2uSin
1
u
-Cos
1
u
==0&&u>
b-a
100
&&u<
b-a
2
,u;
2
(x-a)
Sin
1
x-a
Chi[a,a+z,x]+
2
(b-x)
Sin
1
b-x
Chi[b-z,b,x]+
2
z
Sin
1
z
Chi[a+z,b-z,x];​​Vd[a_,b_,x_]:=Module{z},z=Maxu/.NSolve2uSin
1
u
-Cos
1
u
==0&&u>
b-a
100
&&u<
b-a
2
,u;2(x-a)Sin
1
x-a
-Cos
1
x-a
Chi[a,a+z,x]+2(b-x)Sin
1
b-x
-Cos
1
b-x
Chi[b-z,b,x];
In[]:=
Volterra[x_]:=Sum[If[OddQ[k],0,V[SVCG[[k]],SVCG[[k+1]],x]],{k,1,Length[SVCG]-1}];​​DVolterra[x_]:=Sum[If[OddQ[k],0,Vd[SVCG[[k]],SVCG[[k+1]],x]],{k,1,Length[SVCG]-1}];​​​​Plot[Evaluate[Volterra[x]],{x,0,1},PlotRange->All]//AbsoluteTiming​​Plot[Evaluate[DVolterra[x]],{x,0,1},PlotRange->All]//AbsoluteTiming
Out[]=
45.7245,
0.2
0.4
0.6
0.8
1.0
-0.008
-0.006
-0.004
-0.002
0.000
0.002
0.004

Out[]=
46.0275,
0.2
0.4
0.6
0.8
1.0
-1.0
-0.5
0.5
1.0
