Skip to main content
added 170 characters in body
Source Link
ydd
  • 6.9k
  • 1
  • 9
  • 25

This is not an answer, but something too long to put into comments that I thought could be useful to others with more knowledge in similar subjects. I used the Wikipedia definition of the Cantor staircase to create my own version of the function where we see explicitly what is happening:

cantorFun[x0_] := Module[{x = x0},
  
  inBase3 = 
   RealDigits[x, 3, 
    100];(*you have to hope the first 1 shows up in the first 100 \
digits*)
  
  base3Digs = inBase3[[1]];
  first1 = First@FirstPosition[base3Digs, 1];
  If[IntegerQ@first1,
   base3Digs[[first1 + 1 ;; All]] = 0;
   ];
  base3Digs = base3Digs /. (2 -> 1);
  inBase3[[1]] = base3Digs;
  FromDigits[inBase3, 2]
  ]

(Tiny note: there is probably a way to optimize this to only take the base-3 expansion until there is a 1 instead of taking the first 100 digits for every $x$, but I don't know how to tell RealDigits to do that)

What we could do from here to get the derivative is find the locations where the function changes, and put (scaled) Dirac delta functions at those jumps. I am not sure how exactly to determine where those jumps occur, but my guess is it has to do with the base-3 expansion of the number.

Add-on after reading bill s's comment on the answer above, I believe looking for the "jump" locations may be infeasible, as the function is sort of fractal in the sense that the closer you zoom in, the more jumps you see and there are probably infinite jump locations from 0 to 1.

This is not an answer, but something too long to put into comments that I thought could be useful to others with more knowledge in similar subjects. I used the Wikipedia definition of the Cantor staircase to create my own version of the function where we see explicitly what is happening:

cantorFun[x0_] := Module[{x = x0},
  
  inBase3 = 
   RealDigits[x, 3, 
    100];(*you have to hope the first 1 shows up in the first 100 \
digits*)
  
  base3Digs = inBase3[[1]];
  first1 = First@FirstPosition[base3Digs, 1];
  If[IntegerQ@first1,
   base3Digs[[first1 + 1 ;; All]] = 0;
   ];
  base3Digs = base3Digs /. (2 -> 1);
  inBase3[[1]] = base3Digs;
  FromDigits[inBase3, 2]
  ]

What we could do from here to get the derivative is find the locations where the function changes, and put (scaled) Dirac delta functions at those jumps. I am not sure how exactly to determine where those jumps occur, but my guess is it has to do with the base-3 expansion of the number.

Add-on after reading bill s's comment on the answer above, I believe looking for the "jump" locations may be infeasible, as the function is sort of fractal in the sense that the closer you zoom in, the more jumps you see and there are probably infinite jump locations from 0 to 1.

This is not an answer, but something too long to put into comments that I thought could be useful to others with more knowledge in similar subjects. I used the Wikipedia definition of the Cantor staircase to create my own version of the function where we see explicitly what is happening:

cantorFun[x0_] := Module[{x = x0},
  
  inBase3 = 
   RealDigits[x, 3, 
    100];(*you have to hope the first 1 shows up in the first 100 \
digits*)
  
  base3Digs = inBase3[[1]];
  first1 = First@FirstPosition[base3Digs, 1];
  If[IntegerQ@first1,
   base3Digs[[first1 + 1 ;; All]] = 0;
   ];
  base3Digs = base3Digs /. (2 -> 1);
  inBase3[[1]] = base3Digs;
  FromDigits[inBase3, 2]
  ]

(Tiny note: there is probably a way to optimize this to only take the base-3 expansion until there is a 1 instead of taking the first 100 digits for every $x$, but I don't know how to tell RealDigits to do that)

What we could do from here to get the derivative is find the locations where the function changes, and put (scaled) Dirac delta functions at those jumps. I am not sure how exactly to determine where those jumps occur, but my guess is it has to do with the base-3 expansion of the number.

Add-on after reading bill s's comment on the answer above, I believe looking for the "jump" locations may be infeasible, as the function is sort of fractal in the sense that the closer you zoom in, the more jumps you see and there are probably infinite jump locations from 0 to 1.

Source Link
ydd
  • 6.9k
  • 1
  • 9
  • 25

This is not an answer, but something too long to put into comments that I thought could be useful to others with more knowledge in similar subjects. I used the Wikipedia definition of the Cantor staircase to create my own version of the function where we see explicitly what is happening:

cantorFun[x0_] := Module[{x = x0},
  
  inBase3 = 
   RealDigits[x, 3, 
    100];(*you have to hope the first 1 shows up in the first 100 \
digits*)
  
  base3Digs = inBase3[[1]];
  first1 = First@FirstPosition[base3Digs, 1];
  If[IntegerQ@first1,
   base3Digs[[first1 + 1 ;; All]] = 0;
   ];
  base3Digs = base3Digs /. (2 -> 1);
  inBase3[[1]] = base3Digs;
  FromDigits[inBase3, 2]
  ]

What we could do from here to get the derivative is find the locations where the function changes, and put (scaled) Dirac delta functions at those jumps. I am not sure how exactly to determine where those jumps occur, but my guess is it has to do with the base-3 expansion of the number.

Add-on after reading bill s's comment on the answer above, I believe looking for the "jump" locations may be infeasible, as the function is sort of fractal in the sense that the closer you zoom in, the more jumps you see and there are probably infinite jump locations from 0 to 1.