   Square function
  I just remembered an old math problem from my first year in college. It goes like this: provide an explicit description of a function which has a graph that is dense in the unit square. That is, if you choose a point (x0,y0) within [0,1]2 and a distance ε > 0, then you can find a point (x,f(x)) which is closer than ε to (x0,y0).   
  Hmm, isn't "x^infinity + y^infinity = 1" a function describing the unit square (infinity being limit to infinity of course)?   ;  I'm just guessing here but f(x) = limk -> 0 sin(x/k) ?   ;  I don't know, but it's not a function.   ;Quote:Original post by LodeHmm, isn't "x^infinity + y^infinity = 1" a function describing the unit square (infinity being limit to infinity of course)?1° The unit square is not a function graph (because it has an infinite number of values of y for x=0).2° The graph should be dense within the unit square, not only along its edges.Quote:Original post by Jesper T I'm just guessing here but f(x) = limk -> 0 sin(x/k) ?That limit is undefined.Quote:Original post by jfclavetteI don't know, but it's not a function.Why not?   ;  This one should do the trick:X(t) = cos2(πt)Y(t) = sin2(πet)It's parametric though, so probably not valid.   ;  How about:½ + (½ cos(x π (1/ε)))   ;Quote:Quote:Original post by jfclavetteI don't know, but it's not a function.Why not?I was referring to Lode's attempt, sorry.Should be possible with any sinusoidal, given a sufficiently small period.   ;Quote:Original post by SandmanHow about:½ + (½ cos(x π (1/ε)))That would work, but I would assume that the (x0,y0) and the epsilon was given after you defined the function. Otherwise you could just pick f(x) = y0.   ;Quote:Original post by SandmanHow about:½ + (½ cos(x π (1/ε)))What's &epsilon ? (In the problem statement, the function is chosen once and must then verify the property for any ε).Quote:Original post by Jesper TIt's parametric though, so probably not valid.Yep