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

Does this condition imply f:R^2->R is continuous?

  1. Jul 27, 2012 #1
    Here's an interesting question--I've asked some faculty members around here and "off the top of their head" none of them knows the answer. My gut says "yes", but my gut sucks at math. So here's the statement:

    Suppose we have a function [itex]f:\mathbb{R}^2\to\mathbb{R}[/itex], with the property that for every line segment [itex]L\subset\mathbb{R}^2[/itex], the restriction [itex]f\big|_L[/itex] is continuous. Is [itex]f[/itex] necessarily continuous?
  2. jcsd
  3. Jul 27, 2012 #2
    My gut says no, for the following reason. In order for the limit of f(x,y) as (x,y) goes to (a,b) to exist, we must have that for any continuous curve C on the plane, the limit of f(x,y) as (x,y) goes to (a,b) along C must exist and must have the same value for all curves C. However, there are functions for which the limit of f(x,y) exists along every line passing through (a,b), but the limit still doesn't exist. For instance the limit of [itex]\frac{x^2y}{x^4+y^2}[\itex] as (x,y) goes to (0,0) along any line passing through the origin is 0, but the limit of the function along the curve y=x^2 is .5.

    So I would reason that continuity of the function along every line doesn't even suffice to guarantee existence of the limit at even a single point, so it doesn't suffice to guarantee continuity.
  4. Jul 27, 2012 #3
    So. I think this might work (but I'm leaving soon so I don't have time to really think; I just thought I'd post an initial reaction and if other people see improvements or downright errors, then they can let me know). I think I also just found a better idea, if this does make sense, but I am about to leave so I don't have time to write it. Anyway, my answer is "yes." Basicly, I say that if [itex]x_n[/itex] is a sequence approaching the origin then at some point, since [itex]f\big|_L[/itex] is continuous for each [itex]L[/itex] through the origin, then all of the [itex]f(x_n)[/itex] will be close to [itex]f(0)[/itex]. (That is, [itex]f(x_n) \to f(0)[/itex]. This only explicitly proves it is continuous at [itex]0[/itex] but (if this is correct) it is easily extended to all [itex]x \in \mathbb{R}^2[/itex]

    Let [itex]\{x_n\}[/itex] be a sequence of elements that converges to [itex]0[/itex] Where [itex]0[/itex] is the zero vector in [itex]\mathbb{R}^2[/itex]. Let [itex]\Lambda[/itex] be the collection of lines through [itex]0[/itex]. Let the elements of this set be [itex]L_\theta[/itex] with [itex]\theta[/itex] being the rotation from the positive [itex]x[/itex] axis.

    Now, for each real number [itex]r[/itex], consider the set [itex]\{f(x_{r,L_\theta}):x_{r,L_\theta} \in L_\theta, |x| = r\}[/itex].

    Let [itex]k_M=\sup\{|f(x_{r,L_\theta}) - f(0)|:|x_{r,L_\theta}|=r, x_{r,L_\theta} \in L_\theta \}[/itex].

    Now, let [itex]\epsilon > 0[/itex]. I want to show that there is an [itex]N[/itex] such that for each [itex]n \geq N[/itex] then [itex]|f(x_n) - f(0)| < \epsilon [/itex].

    Now, since [itex]f\big|_{L_\theta}[/itex] is continuous, there exists an [itex]r[/itex] such that [itex]k_M < \epsilon[/itex] (since [itex]|f\big|_{L_\theta} (x_{r,\theta}) - f(0)| < \epsilon[/itex] for [itex]r[/itex] close enough to [itex]0[/itex]). Since [itex]x_n \to 0[/itex] there is a [itex]N[/itex] such that [itex]|x_n| < r[/itex] for each [itex]n \geq N[/itex].

    Thus, for all [itex]n \geq N[/itex], [itex]|f(x_n) - f(0)| < \epsilon [/itex] and so [itex]f[/itex] is continuous at [itex]0[/itex].

    I think [itex]k_M[/itex] might be a problem; can these be defined?
    Last edited: Jul 27, 2012
  5. Jul 27, 2012 #4
    I personally think the proposition is false. I have an idea for a counterexample, but I'm trying to rigorize it.

    Here's my idea of Robert's proof:

    You mean, that for each r fixed, we can define [itex]k_M[/itex] as that supremum. The supremum is taken over all [itex]\theta[/itex], right?
    So, the supremum is dependend of r, right? So it might be better to write [itex]k_M(r)[/itex].
    I also note that we still need to show that [itex]k_M(r)[/itex] is not infinite.

    This last thing is problematic, I think. You have that [itex]f\vert_{L_\theta}[/itex]is continuous in 0. So for a certain [itex]\theta[/itex], there exists an r such that we can make


    But the thing is that our r here depends on [itex]\theta[/itex]. So we can't just take the supremum of this expression to get

    [tex]\sup_{theta} |f(x_{r,\theta})-f(0)|\leq \varepsilon[/tex]

    since the r's change with [itex]\theta[/itex].
  6. Jul 27, 2012 #5
    Here is another try, that might be simpler (my wife is getting ready so I have near infinite time, contrary to what I previously thought :) )

    Let [itex]\Lambda[/itex] and [itex]L_\theta[/itex] be defined as in my last post.
    Let [itex]k_{r,\theta} = |f(x_{r,\theta}) - f(0)|[/itex] and let [itex]k_{M,r} = \sup_\theta k_{r,\theta}[/itex].

    Now, let [itex]\epsilon > 0[/itex]. Then there is a [itex]r > 0[/itex] such that [itex]k_{M,r}<\epsilon[/itex]. Thus, if [itex]|x| < r[/itex] then [itex]|f(x) - f(0)| \leq k_{M,r} < \epsilon[/itex].

    That's shorter, and uses the same ideas, so the mistakes (if there are any) will still be there.
  7. Jul 27, 2012 #6
    I think I fiexed some of the notation stuff in my next post. (I really have to leave this time, so this will be short.) But, what if we add that [itex]f[/itex] is bounded? This at least takes away the problem of [itex]k_{M,r}[/itex] being infinite, right?
  8. Jul 27, 2012 #7
    Yeah - I see the problem with the [itex]K_{M,r}[/itex].

    That messes it all up I think.
  9. Jul 27, 2012 #8
    I don't see this step. For every [itex]\theta[/itex], there exists an r such that [itex]k_{\theta,r}<\varepsilon[/itex]. But you can't just take the maximum since r depends on [itex]\theta[/itex].
  10. Jul 27, 2012 #9
    Here's what I'm think about for a counterexample.

    In [itex]\mathbb{R}^2[/itex], take the curve [itex]C=\{(x,y)~\vert~x>0, y=x^2\}[/itex]. This is of course just the positive half of a parabola.

    Now, take the open set

    [tex]A=\{(x,y)~\vert~x\geq 0,~\frac{x^2}{2}\leq y\leq 2x^2\}[/tex]

    This is a set around our curve C.

    Now, take a function f such that f(x,y)=1 for (x,y) in C. And such that f(x,y)=0 for (x,y) not in A.

    Within A, the function connects 0 and 1 linearly (I don't want to write this out formally, but I think it's clear).

    This function is not continuous in 0, since the sequence [itex](1/n,1/n^2)[/itex] converges to 0. But [itex]f(1/n,1/n^2)=1[/itex] and f(0,0)=0.
    I think (but am not sure), that it is continuous on every line.
  11. Jul 27, 2012 #10


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    In polar form, f = sin 2θ. Consider the origin.
    Last edited: Jul 27, 2012
  12. Jul 27, 2012 #11
    OK. I'm going to think about micromass's counter example. But here is another attempt:

    Let [itex]\epsilon > 0 [/itex]. For each [itex]L_\theta[/itex] there is a [itex]\delta_\theta [/itex] such that if [itex]x_\theta \in L_\theta[/itex] and [itex]|x_\theta| < \delta_\theta[/itex] then [itex]|f(x_\theta) - f(0)|< \epsilon[/itex]. Now, let [itex]\delta = \inf_\theta \delta_\theta[/itex].

    Now, let [itex]x[/itex] be arbitrary. So, [itex]x[/itex] is on some [itex]L_\theta[/itex], say [itex]L_\psi[/itex]. Now, if [itex]|x| < \delta_\psi[/itex] then [itex]|f(x) - f(0)| < \epsilon[/itex]. But, [itex]\delta \leq \delta_\psi[/itex]. Thus, we require that [itex]|x| < \delta [/itex] and so [itex]|f(x)-f(0)| < \epsilon[/itex].
  13. Jul 27, 2012 #12
    Why is [itex]\delta>0[/itex]?
  14. Jul 27, 2012 #13
    Yeah; that's a problem. That might do me in. I'm going to think about this tonight; I'd like to say that if [itex]\delta = 0[/itex] then [itex]f[/itex] isn't continuous on a line, but I don't think that is true.
  15. Jul 27, 2012 #14


    User Avatar
    Science Advisor


    f(x,y)= xy/(x2+y2) ; (x,y)≠ (0,0)

    0, if (x,y)=(0,0)

    The standard counter? f(c,y), f(x,c) are continuous for c constant/fixed (similar

    argument for "slanted" lines ), but f(x,y) not continuous at (0,0) --if we approach along

    y=x, the limit is 1/2≠ 0 .
  16. Jul 27, 2012 #15
    But it should be continuous along every line. So it should also be continuous on the line y=x.
  17. Jul 27, 2012 #16
    What about the example I gave above, ((x^2)y)/(x^4+y^2)? It's limit along any line passing through the origin is 0, but its limit along y=x^2 is 1/2.
  18. Jul 27, 2012 #17
    Oh, I missed that somehow. Yeah, that's a very pretty example actually!! Nice!
  19. Jul 27, 2012 #18
    If you like that, you can generalize it, by increasing the exponents, so that all quadratics passing through the point yield the same limit. And for any n, you can make it so that all polynomials of degree less than or equal to n yield the same limit. What would be really neat is if you could make it so that ALL polynomials, of all orders, yield the same limit and still have the limit not exist. I don't know how to do that, or even whether it is possible, but that would be really counterintuitive.
  20. Jul 28, 2012 #19


    User Avatar
    Science Advisor

    You're right. This one is continuous as a function of y, x individuaally, but not as

    a function f(x,y).
  21. Jul 28, 2012 #20


    User Avatar
    Science Advisor

    I think the overall issue comes down to the fact that you can have f: R^2-->R not continuous and remove discontinuities by pre-composing with the right g: R^2-->R^2;
    in this case, you want g(x,y)=(x, mx+b) to smooth-out the discontinuities and, of course, not introduce new ones.
  22. Jul 28, 2012 #21
    To make my question more precise, does there exist a function f(x,y) such that for all real numbers k and and all natural numbers n, the limit of f(x,kxn) as x goes to 0 is equal to 0, yet the limit of f(x,y) as (x,y) goes to (0,0) does not exist?
  23. Jul 28, 2012 #22
    Interesting; I somehow missed your first post with this counterexample. Well, this question at least gives me something interesting to think about tonight.
  24. Jul 28, 2012 #23


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The problem with that condition is that fails to cover the case of approaching the origin along the y-axis. f could be badly behaved there. E.g., in polar coordinates, f = r2sec2θ. Or, to make it better behaved everywhere except at the origin, f = r2/(cos2θ + r3)
  25. Jul 29, 2012 #24
    Fine, I'm willing to add the condition that the limit of f(0,y) as y goes to 0 is also zero. Given this addendum, does there exist any such example?
  26. Jul 30, 2012 #25
    I think I've answered this in the negative. Here's my counterexample: [tex]f(x)=\begin{cases}1-2\left|\frac{y-x^2}{x^2}\right|&\text{ if }x>0\text{ and }\frac12x^2\le y\le\frac32x^2,\\0&\text{ otherwise.}\end{cases}[/tex]

    This function is equal to 1 on the open half-parabola [itex]y=x^2,\;x>0[/itex], and decreases to zero away from it. It's not hard to see that the function is continuous away from the origin, and therefore is continuous on every line segment not containing the origin. However, looking at its values on the sequence [itex]\{(\frac1n,\frac1{n^2})\}[/itex] shows that it's discontinuous at the origin.

    All that's left to consider are line segments through the origin. The function is zero on the y-axis and on the x-axis, and outside the first quadrant, so suppose our segment has a positive slope [itex]m[/itex]. As we approach the origin from the right, eventually [itex]mx>\frac32x^2[/itex], and so [itex]f[/itex] is constantly zero in some neighborhood of the origin on that line segment.

    So there's a function that's continuous on every line segment, but not continuous. I thought it would have to be weirder than that--so much for my gut reaction!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook