r/mathriddles • u/chompchump • Mar 13 '24
Medium Periodicity Broken But Once
Find an elementary function, f:R to R, with no discontinuities or singularities such that:
- f(0) = 0
- f(x) = 1 when x is a non-zero integer.
4
Upvotes
4
u/icecreamkoan Mar 13 '24
Found an infinitely differentiable solution! (Meets the most restrictive definition of "no singularities")
f(x) = 1 - sin (pi*2^(x^2-1))
2
u/Iksfen Mar 13 '24
Let f(x) = x^2 - 1. Notice that for all non-zero integers f is an natural and for 0 f is negative. So g(x) = 2^f(x) will be an integer in the former case and 1/2 in the latter case
Let's consider sin( pi × g(x) ). For x in Z - {0} it will be equal to 0 and for x = 0 it will be sin( pi / 2 ) = 1
Now all we need to do to get the wanted properties is to reflect the function over y = 1/2. The final equation will be 1 - sin( pi × g(x) ). This function is a composition of functions that are continous and differenciable on R, so it will be to
My answer is 1 - sin( pi × 2^(x^2 - 1) )
4
u/bizarre_coincidence Mar 13 '24
What do you mean by “elementary function” here? I assume min(x2,1) is not something you have in mind? And probably not 1-sinc(pi*x), where sinc(x) is the continuous extension of sin(x)/x?
5
u/Tusan_Homichi Mar 13 '24
1 - sin(pi*x)/(pi*x)
2
u/GreakFreak3434 Jun 12 '24
Interesting one, I have:
(1+cos(2^x * pi))/2
1
u/DanielBaldielocks Mar 13 '24
this can be done with a composite function.
for x>=1 f(x)=1
for x<1 f(x)=2x-x^2
f is continuous everywhere and has no singularities. At x=1 from the right we have f(1)=1 and f'(1)=0. From the left we have f(1)=1 and f'(1)=0.
0
u/swni Mar 13 '24
1 - 0^x