(Sniff) but these are all _piece_wise rational. How about not even that? gosper.org/baz.png [1] The continuous function defined on the triadic rationals to satisfy In[88]:= Clear@baz; baz[0] = 0; baz[1] = 1; baz[x_] := baz[3 x]/2 /; x <= 1/3; baz[x_] := 1/2 + baz[3 x - 2]/2 /; x >= 2/3; baz[x_] := 1/2 + baz[6 x - 2]/2 /; 1/3 <= x <= 1/2; baz[x_] := 1/2 + baz[4 - 6 x]/2 /; 1/2 <= x <= 2/3 In[89]:= baz /@ Range[0, 1, 1/9] Out[89]= {0, 1/4, 1/4, 1/2, 3/4, 3/4, 1/2, 3/4, 3/4, 1} --rwg On 2016-02-09 21:50, Dan Asimov wrote:
Warut, nice formula.
For any n in Z+, here's an (2n-1)-times differentiable example that is not a rational function:
H(x) = sgn(x) x^(2n).
Which suggests a question:
Question: ---------
Does there exist a real analytic function
f: R --> R
that takes rationals to rationals, but is not a rational function?
--Dan
On Feb 9, 2016, at 8:45 PM, Warut Roonguthai <warut822@gmail.com> wrote:
Here is my example of a continuous function which maps rationals to rationals, but is not a rational function:
F(x) = (-1)^floor(x) * frac(|x|) * (frac(|x|) - 1),
where frac(x) is the fractional part of x.
Links: ------ [1] http://ma.sdf.org/gosper.org/baz.png