Re: [math-fun] Can a nonconstant continuous function on the reals
Question: Can a nonconstant continuous function on the reals assume only rational values? Answer: No, because of https://en.wikipedia.org/wiki/Intermediate_value_theorem More interesting question: Find a function F(x), which is continuous (the smoother the better) which maps rationals to rationals, but is not a rational function. -- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)
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. On Tue, Feb 9, 2016 at 1:35 AM, Warren D Smith <warren.wds@gmail.com> wrote:
Question: Can a nonconstant continuous function on the reals assume only rational values?
Answer: No, because of https://en.wikipedia.org/wiki/Intermediate_value_theorem
More interesting question: Find a function F(x), which is continuous (the smoother the better) which maps rationals to rationals, but is not a rational function.
-- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
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.
(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
Young friend Rohan demanded the sin Fourier coefficients of Warut's non-rational-function: Out[439]= -8 Mod[k, 2]/(k^3 Pi^3) . So (-1)^Floor[t]*Mod[Abs[t], 1]*(Mod[Abs[t], 1] - 1) == Sum[% Sin[k*\[Pi]*t], {k, \[Infinity]}] Out[456]= (-1)^Floor[t] (-1 + Mod[Abs[t], 1]) Mod[Abs[t], 1] == ( 2 I (PolyLog[3, -E^(-I \[Pi] t)] - PolyLog[3, E^(-I \[Pi] t)] - PolyLog[3, -E^(I \[Pi] t)] + PolyLog[3, E^(I \[Pi] t)]))/\[Pi]^3 a sum of four trilogs, now defined for complex t due to the loss of (-1)^Floor[t]. The even Fourier terms vanish, so manually bisecting the series, In[443]:= Assuming[k \[Element] Integers, Simplify[%439 /. k -> 2 k - 1]] Out[443]= -8 Sin[(-1 + 2 k) Pi t]/((-1 + 2 k)^3 Pi^3) gives yet another expression: In[444]:= Sum[%, {k, \[Infinity]}] Out[444]= (I E^(-I \[Pi] t) (-LerchPhi[E^(-2 I \[Pi] t), 3, 1/2] + E^(2 I \[Pi] t) LerchPhi[E^(2 I \[Pi] t), 3, 1/2]))/(2 \[Pi]^3) Trying a Gaussian rational, In[505]:= Rationalize[N[%444 /. t -> 3/5 + 4 I/5, 33]] Out[505]= -22/25 + 4 I/25 so we seem to have a non-rational-function preserving Gaussian rationals. With pi^3 in its denominator. But even with t declared real, Mathematica is unable to relate the three equivalent expressions. On 2016-02-10 05:03, rwg wrote:
(Sniff) but these are all _piece_wise rational. How about not even that? gosper.org/baz.png 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}
I.e., baz maps the triadic rationals onto dyadic rationals. That it maps rationals to rationals follows from the finite state preservation of periodicity. E.g., inactivating baz: Clear@ibaz; ibaz@0 = 0; ibaz@1 = 1; ibaz[x_] := Inactive[ibaz][3 x]/2 /; x <= 1/3; ibaz[x_] := 1/2 + Inactive[ibaz][3 x - 2]/2 /; x >= 2/3; ibaz[x_] := 1/2 + Inactive[ibaz][6 x - 2]/2 /; 1/3 <= x <= 1/2; ibaz[x_] := 1/2 + Inactive[ibaz][4 - 6 x]/2 /; 1/2 <= x <= 2/3
Then In[472]:= Inactive[ibaz][1/4]
Out[472]= Inactive[ibaz][1/4]
In[473]:= Activate@%
Out[473]= 1/2 Inactive[ibaz][3/4]
In[474]:= Activate@%
Out[474]= 1/2 (1/2 + 1/2 Inactive[ibaz][1/4])
In[475]:= Solve[% == %%%, %%%]
Out[475]= {{Inactive[ibaz][1/4] -> 1/3}}
a nondyadic rational. But, ironically, triadic. Less trivially,
Out[487]= Inactive[ibaz][7/22]
In[488]:= Activate@%
Out[488]= 1/2 Inactive[ibaz][21/22]
In[489]:= Activate@%
Out[489]= 1/2 (1/2 + 1/2 Inactive[ibaz][19/22])
In[490]:= Activate@%
Out[490]= 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][13/22]))
In[491]:= Activate@%
Out[491]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][5/11])))
In[492]:= Activate@%
Out[492]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][8/11]))))
In[493]:= Activate@%
Out[493]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][2/11])))))
In[494]:= Activate@%
Out[494]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/4 Inactive[ibaz][6/11])))))
In[495]:= Activate@%
Out[495]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/4 (1/2 + 1/2 Inactive[ibaz][8/11]))))))
In[496]:= Solve[% == %%%%, Inactive[ibaz][8/11]]
Out[496]= {{Inactive[ibaz][8/11] -> 5/7}}
In[497]:= %%%%%%%%%% == %% /. %
Out[497]= {Inactive[ibaz][7/22] == 55/112} a reasonably generic rational. --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.
-- You received this message because you are subscribed to the Google Groups "mathfuneavesdroppers" group. To unsubscribe from this group and stop receiving emails from it, send an email to mathfuneavesdroppers+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout [1]. Links: ------ [1] https://groups.google.com/d/optout
On Thu, Feb 11, 2016 at 9:40 AM, rwg <rwg@sdf.org> wrote:
Young friend Rohan demanded the sin Fourier coefficients of Warut's non-rational-function:
Out[439]= -8 Mod[k, 2]/(k^3 Pi^3) .
So (-1)^Floor[t]*Mod[Abs[t], 1]*(Mod[Abs[t], 1] - 1) == Sum[% Sin[k*\[Pi]*t], {k, \[Infinity]}]
Out[456]= (-1)^Floor[t] (-1 + Mod[Abs[t], 1]) Mod[Abs[t], 1] == ( 2 I (PolyLog[3, -E^(-I \[Pi] t)] - PolyLog[3, E^(-I \[Pi] t)] - PolyLog[3, -E^(I \[Pi] t)] + PolyLog[3, E^(I \[Pi] t)]))/\[Pi]^3
a sum of four trilogs, now defined for complex t due to the loss of
(-1)^Floor[t]. The even Fourier terms vanish, so
manually bisecting the series,
In[443]:= Assuming[k \[Element] Integers, Simplify[%439 /. k -> 2 k - 1]]
Out[443]= -8 Sin[(-1 + 2 k) Pi t]/((-1 + 2 k)^3 Pi^3)
gives yet another expression:
In[444]:= Sum[%, {k, \[Infinity]}]
Out[444]= (I E^(-I \[Pi] t) (-LerchPhi[E^(-2 I \[Pi] t), 3, 1/2] + E^(2 I \[Pi] t) LerchPhi[E^(2 I \[Pi] t), 3, 1/2]))/(2 \[Pi]^3)
Trying a Gaussian rational,
In[505]:= Rationalize[N[%444 /. t -> 3/5 + 4 I/5, 33]]
Out[505]= -22/25 + 4 I/25
so we seem to have a non-rational-function preserving Gaussian
rationals. With pi^3 in its denominator.
But even with t declared real, Mathematica is unable to relate the
three equivalent expressions.
On 2016-02-10 05:03, rwg wrote:
(Sniff) but these are all _piece_wise rational. How about not even that? gosper.org/baz.png 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}
I.e., baz maps the triadic rationals onto dyadic rationals. That it maps rationals to rationals follows from the finite state preservation of periodicity. E.g., inactivating baz: Clear@ibaz; ibaz@0 = 0; ibaz@1 = 1; ibaz[x_] := Inactive[ibaz][3 x]/2 /; x <= 1/3; ibaz[x_] := 1/2 + Inactive[ibaz][3 x - 2]/2 /; x >= 2/3; ibaz[x_] := 1/2 + Inactive[ibaz][6 x - 2]/2 /; 1/3 <= x <= 1/2; ibaz[x_] := 1/2 + Inactive[ibaz][4 - 6 x]/2 /; 1/2 <= x <= 2/3
Then In[472]:= Inactive[ibaz][1/4]
Out[472]= Inactive[ibaz][1/4]
In[473]:= Activate@%
Out[473]= 1/2 Inactive[ibaz][3/4]
In[474]:= Activate@%
Out[474]= 1/2 (1/2 + 1/2 Inactive[ibaz][1/4])
In[475]:= Solve[% == %%%, %%%]
Out[475]= {{Inactive[ibaz][1/4] -> 1/3}}
a nondyadic rational. But, ironically, triadic. Less trivially,
Out[487]= Inactive[ibaz][7/22]
In[488]:= Activate@%
Out[488]= 1/2 Inactive[ibaz][21/22]
In[489]:= Activate@%
Out[489]= 1/2 (1/2 + 1/2 Inactive[ibaz][19/22])
In[490]:= Activate@%
Out[490]= 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][13/22]))
In[491]:= Activate@%
Out[491]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][5/11])))
In[492]:= Activate@%
Out[492]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][8/11]))))
In[493]:= Activate@%
Out[493]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 Inactive[ibaz][2/11])))))
In[494]:= Activate@%
Out[494]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/4 Inactive[ibaz][6/11])))))
In[495]:= Activate@%
Out[495]= 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/2 (1/2 + 1/4 (1/2 + 1/2 Inactive[ibaz][8/11]))))))
In[496]:= Solve[% == %%%%, Inactive[ibaz][8/11]]
Out[496]= {{Inactive[ibaz][8/11] -> 5/7}}
In[497]:= %%%%%%%%%% == %% /. %
Out[497]= {Inactive[ibaz][7/22] == 55/112} a reasonably generic rational. --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.
-- You received this message because you are subscribed to the Google Groups "mathfuneavesdroppers" group. To unsubscribe from this group and stop receiving emails from it, send an email to mathfuneavesdroppers+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout [1].
Links: ------ [1] https://groups.google.com/d/optout _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com
On 10/02/2016 05:50, Dan Asimov wrote:
Does there exist a real analytic function
f: R —> R
that takes rationals to rationals, but is not a rational function?
http://mathoverflow.net/questions/48910/smooth-functions-for-which-fx-is-rat... has (for its top-rated answer) a pretty straightforward construction giving you C^\infty functions that do this while simultaneously looking "approximately" more or less however you like. The second answer links to http://mathoverflow.net/questions/42460/is-a-real-power-series-that-maps-rat... whose second answer appears to give a construction for an entire (complex) function mapping rationals to rationals. Of course it also maps reals to reals, so its restriction to R is a real-analytic function mapping rationals to rationals. I'm not sure how easy it is to make sure that the resulting function doesn't happen to be a rational function (maybe it's trivial and I'm just not seeing how?). -- g
On Mon, Feb 8, 2016 at 1:35 PM, Warren D Smith <warren.wds@gmail.com> wrote:
More interesting question: Find a function F(x), which is continuous (the smoother the better) which maps rationals to rationals, but is not a rational function.
F(x) = |x|^n takes rationals to rationals for any positive integer n, is not a rational function when n is odd, and is n times differentiable, so you can make it as smooth as you like by making n large enough. Andy Latto andy.latto@pobox.com
OK, as an attempted fix, consider this new function F(x): 1. let continued fraction expansion of x be [a0; a1,a2,a3,a4,...] 2. consider the the a[j] which obey (i) a[j]>=4 (ii) min(a[j-1],a[j+1])>=2 Replace these a by either a+1 (if a=even) or a-1 (if a=odd), also known as "a XOR 1." 3. result is F(x). This function's range has no "holes." So perhaps it is continuous function. (I would think it obviously is continuous, but apparently there is something wrong with my intuition?) It maps rationals to rationals and quadratic irrationals to quadratic irrationals. It would seem to have Kth derivatives at any rational argument x, for any K=1,2,3... -- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)
[sorry about the blank message; hit the wrong key] On Wed, Feb 10, 2016 at 9:50 PM, Warren D Smith <warren.wds@gmail.com> wrote:
OK, as an attempted fix, consider this new function F(x):
1. let continued fraction expansion of x be [a0; a1,a2,a3,a4,...]
2. consider the the a[j] which obey (i) a[j]>=4 (ii) min(a[j-1],a[j+1])>=2 Replace these a by either a+1 (if a=even) or a-1 (if a=odd), also known as "a XOR 1."
Doesn't this have exactly the same problem? [......2, 7, 2] -> [...2, 7XOR 1, 2], while the very slightly smaller or larger [...2, 7, 1, 1, large,... is unchanged. Andy
3. result is F(x).
This function's range has no "holes." So perhaps it is continuous function. (I would think it obviously is continuous, but apparently there is something wrong with my intuition?) It maps rationals to rationals and quadratic irrationals to quadratic irrationals. It would seem to have Kth derivatives at any rational argument x, for any K=1,2,3...
-- Warren D. Smith http://RangeVoting.org <-- add your endorsement (by clicking "endorse" as 1st step)
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- Andy.Latto@pobox.com
participants (6)
-
Andy Latto -
Dan Asimov -
Gareth McCaughan -
rwg -
Warren D Smith -
Warut Roonguthai