0

I thought I could use $x = \tan(\pi x/2)$, but this only works for $x: = (0,1)$. How should I address the 0? I saw somewhere else's to find a function for $x = 1/n$ (eg ($f(x) = 1/(n+1)$), but I did not understand this.

aram2
  • 9

1 Answers1

4

Write the positive numbers and $[0,1)$ as $$(0,\infty) = \bigcup_{n=0}^\infty (n,n+1], \quad [0,1) = \bigcup_{n=0}^\infty [1-\tfrac1{n+1},1-\tfrac1{n+2}) .$$ Let $f$ restricted to $(n,n+1]$ be the linear function that takes $n$ to $1-\frac1{n+2}$, and $n+1$ to $1-\frac1{n+1}$.

Stephen Montgomery-Smith
  • 26,430
  • 2
  • 35
  • 64