Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Zeros of a function

  1. Mar 23, 2007 #1
    Does there exist a continuous function [tex]f:\mathbb{R}\rightarrow\mathbb{R}[/tex] such that f is nowhere constant and [tex]\{x:f(x)=0\}[/tex] is uncountable?
  2. jcsd
  3. Mar 23, 2007 #2
    Sure there is.
  4. Mar 23, 2007 #3
    Can you give an example?
  5. Mar 23, 2007 #4
    Well....the irrationals aren't countable...
  6. Mar 23, 2007 #5

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    That is a misleading answer - any continuous function that is zero on the irrationals is 0 everywhere. [0,1] is uncountable, and surely anyone can think of a function that is

    1) continuous
    2) non-constant
    3) 0 on [0,1]
  7. Mar 23, 2007 #6
    He said that f is nowhere constant.
  8. Mar 23, 2007 #7
    Yes, I did say f is nowhere constant. If f=0 on the subset of irrationals of some interval, then continuity implies that f=0 on that interval.

    Intuitively, what I want is a everywhere continuous nowhere differentiable function that is "straight" enough so that a horizontal line intersects the values uncountably many times. I don't think such a function exists, but I can't prove it either way.

    The "continuous but nowhere differentiable" requirement might not be necessary, or even relevant, but it's a good place to start looking.
    Last edited: Mar 23, 2007
  9. Mar 23, 2007 #8
    Take the function f(x) = 0 on [0,1]. Now replace f on the interval [1/3,2/3] with a triangle wave. Now replace f on the intervals [1/9,2/9] and [7/9,8/9] with a similar triangle wave. Repeat this process for every interval on which f is zero, and we have a continuous function that vanishes on the Cantor set (which is uncountable), and is nowhere constant. Replacing the triangle wave with a suitable [itex]C^{\infty}[/itex] function yields an infinitely differentiable function that vanishes uncountably many times but is not constant. If you want it to be continuous but nowhere differentiable, replace each triangle wave with such a function instead.
  10. Mar 23, 2007 #9
    Whoops. Missed the continuity assumption.
  11. Mar 23, 2007 #10
    Can you please "formally" define your function? "if we infinitely repeat..." is not a formal term and I am not sure the ultimate function remains a continuous one.
  12. Mar 23, 2007 #11
    "if we infinitely repeat..." simply refers to the limit function of the sequence of functions I described.

    f_1[a,b](x) = \left\{
    0 & x \in \left[a,\frac{2a+b}{3}\right]\cup\left[\frac{a+2b}{3},b\right]\\
    x-\frac{2a+b}{3} & x \in \left[\frac{2a+b}{3},\frac{a+b}{2}\right]\\
    \frac{a+2b}{3}-x & x \in \left[\frac{a+b}{2},\frac{a+2b}{3}\right]

    f_{n+1}[a,b](x) = \left\{
    f_n\left[a,\frac{2a+b}{3}\right](x) & x \in \left[a,\frac{2a+b}{3}\right]\\
    x-\frac{2a+b}{3} & x \in \left[\frac{2a+b}{3},\frac{a+b}{2}\right]\\
    \frac{a+2b}{3}-x & x \in \left[\frac{a+b}{2},\frac{a+2b}{3}\right]\\
    f_n\left[\frac{a+2b}{3},b\right](x) & x \in \left[\frac{a+2b}{3},b\right]

    Then [tex]f(x) = \lim_{n\to\infty}f_n[0,1](x)[/tex] is the function I just described.
    Last edited: Mar 23, 2007
  13. Mar 23, 2007 #12


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    There's a simpler description of (something like) Moo's function:

    f(x) = [distance from x to the Cantor set]

    Incidentally, I don't think I've heard "nowhere constant" before -- I would have used the phrase "locally nonconstant".
    Last edited: Mar 23, 2007
  14. Mar 24, 2007 #13
    Hmm.. each f_n is uniformly continuous, then if the seq {f_n} converges uniformly, the trick is done.
    For the triangular waves become more little as n surges up, I think the convergence is uniform. But, can you dfevise a formal, maybe inductive, proof?
  15. Mar 24, 2007 #14


    User Avatar
    Science Advisor
    Homework Helper

    If C is a closed uncountable set in R containing no intervals (like the Cantor set), then it's complement is a countable union of disjoint open intervals. Define f to be 0 on C, and f is a triangle of slope with absolute value 1 on each open interval. So let C be the Cantor set. [itex]\mathbb{R} = (-\infty ,0) \sqcup \bigsqcup (a_n,b_n) \sqcup C \sqcup (1,\infty )[/itex]. Define [itex]f : \mathbb{R} \to \mathbb{R}[/itex] by:

    [tex]f(x)=\left\{\begin{array}{cc}x,&\mbox{ if }
    x < 0\\ \frac{b_n-a_n}{2} - |x - \frac{b_n+a_n}{2}|, & \mbox{ if } a_n < x < b_n\\ 0, & \mbox{ if } x \in C\\ 1-x, & \mbox{ if } x > 1\right.[/tex]
    Last edited: Mar 24, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook