6

Is there a function that can be built with addition, multiplication, exponentiation, trigonometric functions, integrals, (and all of their inverses i.e subtraction, division, taking logarithms, $\arcsin(x)$, derivatives, etc) that would take an integer and output $1$ and take a non-integer and output $0$?
I looked at the Dirichlet Function but it separated rationals from irrationals, and the only solution that I could come up with was with the Fourier Series of $$x-\lfloor x \rfloor = \frac 12 - \frac 1\pi \sum_{k=1}^\infty \frac 1k \sin (2 \pi k x)$$ But this uses infinite series. Is there a way to build such a function? If there is not, why not?

Dan Brumleve
  • 17,796
GuPe
  • 7,318
  • 2
    It's trivial. Just take the left side of what you have in your formula above and call 1 iff it is 0, 0 otherwise. –  Mar 12 '16 at 17:55
  • For your example, do you mean $1 - (\lceil x \rceil - \lfloor x \rfloor)$ instead of $x - \lfloor x \rfloor$? The latter is a sawtooth wave not an indicator function for the integers. – Dan Brumleve Mar 13 '16 at 00:03

3 Answers3

5

Maybe this is cheating, but I don't think it's possible otherwise, since all of the other functions are continuous and a composition of continuous functions is continuous, integrals preserve continuity too, and even though differentiation doesn't in general, all of the functions you listed are not just continuous but analytic or infinitely differentiable so their derivatives are continuous as well at all orders. Anyway, here is my example:

$f(x) = 0^{\sin(\pi \cdot x)^2}$

For this to be correct you have to define $0^0=1$ which is not an unreasonable choice, but usually this expression is left undefined.

Dan Brumleve
  • 17,796
  • 1
    Wow, that is a really clever answer, I know I did not mention limits as possible building blocks for the function, but would $f(x) = \lim_{n \to x} 0^{\sin(\pi n)^2}$ be an equivalent statement to the one you gave? – GuPe Mar 13 '16 at 06:36
  • Unfortunately no, that function is identically $0$ (regardless of how one defines $0^0$), for example: http://www.wolframalpha.com/input/?i=limit+as+x+goes+to+0+of+0%5E(sin(pi+x)%5E2) – Dan Brumleve Mar 13 '16 at 06:42
  • Is allowing limits the same as allowing derivatives? – Dan Brumleve Mar 13 '16 at 06:49
  • 1
    Yes, I think that in some twisted way allowing limits is the same thing as allowing derivatives. – GuPe Mar 13 '16 at 07:14
1

It can be simply defined as an infinite product $$f(x)=\prod_{n=1}^{\infty}\cos^{2n}(\frac{\tau x}{2})$$ Where $\tau=2\pi$

  • Welcome to Math.SE! You could explain in your answer why this function is an answer to the question (it is not obvious to me). – fonini Jun 23 '16 at 23:57
-1

Well.. you can always built it as a distribution:

$$ \Upsilon(x) = \begin{cases} 1 ~~~ \text{for} ~~~ x\in\mathbb{N} \\ 0 ~~~ \text{for} ~~~x\not\in\mathbb{N} \end{cases} $$

lol

Enrico M.
  • 26,114