3

I have a homework problem that I'm completely stumped on: Construct a function $f:[0,1] \to [0,1]$ that takes every value in $[0,1]$ an infinite number of times. I spent the better part of 2 hours on this problem, so I need some help. I started with a piece-wise function, just to get the every value an infinite number of times part, and played with it to make it continuous, but I made no progress. It's a very hard problem for me.

user124910
  • 3,241
  • 4
    Toplogist's Sine Curve works: http://en.wikipedia.org/wiki/Topologist%27s_sine_curve – David P Feb 17 '14 at 06:05
  • 4
    There are good answers. Here is another approach: Construct a function $f:\mathbb{R} \to [0,1]$ that oscillates between 0 and 1, then take the function $t \mapsto f(\tan {2 x \over \pi})$ on $[0,1)$ (define the function at $t=1$ any way you like). – copper.hat Feb 17 '14 at 06:15
  • Thank you for the two suggestions. They are both very instructive – user124910 Feb 17 '14 at 06:25
  • 1
    You used the word "continuous" in the body of your question but not in the title. Do you want your function $f$ to be continuous, or you don't care? (I'm guessing you want it to be continuous.) – bof Feb 17 '14 at 08:38
  • A continuous solution on a closed interval can't exist. Hint: accumulation points. – The Vee Oct 30 '16 at 18:43

3 Answers3

6

Hint: Draw a line connecting the points $(0,0)$ with $(1/2, 1)$. Draw a line connecting $(1/2,1)$ with $(3/4,0)$. Connect to $(7/8, 1)$.

6

You want a function that oscillates "violently". Not sure if you have seen such wildly oscillating functions using $\sin$. If you have not seen it, the question is unfair as only a certified genius can come up with such examples without any prior knowledge. That said, here is very broad hint... $$ f(x) = \sin(g(x)) $$ where you want $g(x)$ to grow to infinity in the interval. Then $f$ will have infinitely many oscillations. Now pick your favorite $g(x)$ that has a singularity in $[0,1]$

user44197
  • 9,818
  • I think he wants a continuous function. Note the use of the word "continuous" in the body (though not in the title) of the question. – bof Feb 17 '14 at 08:42
  • @user44197, if g(x) has already a singularity, then how will you remove that for f•g(x)? As the last part of the question asking for continuity... – Pro_blem_finder Nov 15 '24 at 11:55
6

Here is an easy answer if you've seen how to construct a space-filling curve: just take a continuous mapping of the closed unit interval $[0,1]$ onto the closed unit square $[0,1]\times[0,1]$, and follow it with a projection of the square onto its horizontal side. In other words, if $x=f(t),y=g(t),0\le t\le1$ is a parametric representation of a continuous curve which fills the unit square, then $f:[0,1]\to[0,1]$ is a continuous function which takes every value in $[0,1]$ an uncountable number of times.

bof
  • 82,298