In calculus lectures, we are told that approaching a limit in a multivariable function through some paths does not guarantee the existence of the limit, for example: here. And one can see that, in the following example its easy to see that there are $2$ paths that seem to point, in one case, that the limit is $0$ and in another case, that the limit is $1$ and hence it does not exist.

$$f(x,y)=\frac{2xy}{x^2+y^2} \quad f(0,0)=0 $$

But the objects we have in question are continuous functions with the exception of perhaps, the point $(0,0)$ or some other strategically placed point. It seems intuitively reasonable that one can approach $(0,0)$ though $2$ or some "low" number of different paths and have different possible limits but it doesn't seems reasonable that one could have a function such that the possible limit is different for $278$ paths, for example.

I'm not sure if these lectures try to take into account the full generality of multivariable functions, but it seems absurd that a $2-$variable function can have such a messy structure that actually allows it to have an arbitrary number of paths that suggest (each one) different possible limits. But I don't know what to say/think when the number of variables is greater than $3$.

EDIT: There are interesting related sub-questions I forgot to add:

  1. Is it possible that we test the existence of a limit with all the lines and polar coordinates, obtain a possible limit $L$ for these tests and yet, the function have another path such that the possible limit for this path is different of $L$?

  2. The question above glooms to this: Isn't there a minimum number of paths given by families of curves in which, the possible limit is $L$ for all of them and this actually guarantees that the limit is $L$? I make this question because it seems extremely counter-intuitive that given - for example - tests with all the lines, all the parabolas and polar coordinates all with possible limit $L$, there could still be one path that gives a possible limit different of $L$.

  • 4
    $\begingroup$ In ' it doesn't seems reasonable that one could have a function such that the possible limit is different for 278 paths,', do you mean 'precisely 278' or 'at least 278' ...? For the former just use 277 rays and assign different value to each of them and a 278-th value to the rest of the space. For the latter, answers present lots of examples of functions which have continuum of path-defined limits. $\endgroup$ – CiaPan Apr 5 '17 at 8:09
  • $\begingroup$ @CiaPan The number was merely an example. $\endgroup$ – Billy Rubina Apr 6 '17 at 3:29
  • 1
    $\begingroup$ What do you mean by 'polar coordinates', as a path? $\endgroup$ – Fimpellizieri Apr 6 '17 at 4:41
  • $\begingroup$ @AskYourself Yes, but it turns out there can be exactly 278 paths along which you get different limits. $\endgroup$ – zhw. Apr 6 '17 at 5:22
  • 1
    $\begingroup$ I think unless you can describe exactly which kinds of paths you're looking for, it will be hard to provide a (sufficiently complex) counter-example. A polar coordinate substituion can suggest looking at one particular kind of path that's perhaps not as obvious as traditional Cartesian coordinates, but there's still a multitude of available paths. $\endgroup$ – Fimpellizieri Apr 6 '17 at 13:57

The granddaddy of ill-behaved functions is $e^{1/x}$. Even in one dimension it is very strange (having what is called an "essential singularity" at the origin), but in 2D or in the complex plane we really see an exotic being take shape:

According to Picard's Great Theorem, $e^{1/z}$ (viewed as a function of a complex number $z$) takes every value except $0$ infinitely many times in any neighborhood of the origin $z=0$. Away from the origin it is perfectly nice and smooth and analytic.

We can make a similarly weird function which is purely real by looking at $$Re\left\{\exp\left(\frac{1}{(x+iy)}\right)\right\} = \exp\left(\frac{x}{x^2+y^2}\right)\cos\left(\frac{y}{x^2+y^2}\right)$$ in the x-y plane. From Picard's Great Theorem it follows that this function also attains every value infinitely many times in any neighborhood of the origin, but is smooth everywhere else. Examining this function along paths to the origin gives arbitrarily wild curves.


  • 3
    $\begingroup$ You don't need Picard for any of this. Take your real valued $f$ for example. For $x>0,$ we have $f(x,x) = e^{1/(2x)}\cos (1/(2x)),$ which on every $(0,\delta)$ takes on every value in $\mathbb R.$ Similary for the complex analytic $e^{1/z}.$ $\endgroup$ – zhw. Apr 5 '17 at 18:35
  • 7
    $\begingroup$ @zhw Indeed, that is a good, more elementary way to see that the claim is true. However, Picard's Theorem was the motivation for me to think of that particular function in the first place. So I think it remains useful to mention Picard, if not so much for technical reasons as for motivation. $\endgroup$ – Yly Apr 5 '17 at 22:00

Consider your function as we approach the origin along the line $y=mx$ of slope $m$ we get. . .

$\displaystyle f(x,mx)=\frac{2x(mx)}{x^2+(mx)^2} = \frac{2mx^2}{(m^2+1)x^2} = \frac{2m}{(m^2+1)}$

So the function is constant along that line and equal to its limit at the origin. It should be easy to see that as we vary $m$ we get an infinite number or limits to chose between.

Can you come up with a continuous function that has only finitely many limits as we approach a singularity?

  • 5
    $\begingroup$ How can I try to "generate" such a function? I guess that trial and error wouldn't be wise. Would it? $\endgroup$ – Billy Rubina Apr 5 '17 at 0:14
  • 4
    $\begingroup$ No, and you wouldn't learn anything through a trial and error approach either. First ask yourself what about the function results in there being more than one limit. Then ask yourself what results in infinitely many limits. $\endgroup$ – Daron Apr 5 '17 at 7:45

Besides all the beautiful examples that have been given already, I wanted to point out that even approaching along a "path" does not necessarily mean that there exists a limit at all. This phenomenon is no specialty of higher dimenions, it can happen in just one dimension.

Consider, for instance, the function \begin{align*} f:\mathbb R\to\mathbb R,\ x\mapsto\begin{cases}\frac{1}{x}\sin(\frac{1}{x}), & x\neq 0, \\ 0, & x=0.\end{cases} \end{align*} This function is so mean around 0, that one can find for every real number $\alpha$ a sequence $(x_n)$ of real numbers converging to 0 such that $f(x_n)$ converges to $\alpha$. Even if one picks $\alpha=\pm\infty$.

In one dimension, however, we have the nice fact that if right and left sided limits at some $x$ exist and coincide with $f(x)$, then $f$ is continuous at $x$. This is no longer true in two dimensions. The first obvious reason is that there is not only "right" and "left", but perhaps also some "top" or "bottom", or any crazy direction you can approach from. However, if the limits approaching some point $(x,y)\in\mathbb R\times\mathbb R$ exist along any line, and are equal, and coincide with $f(x,y)$, $f$ still does not have to be continuous at $(x,y)$. For example, consider \begin{align*} f:\mathbb R\times\mathbb R\to\mathbb R,\ (x,y)\mapsto\begin{cases}1, & (x,y)=t(\cos(t),\sin(t))\text{ for some }t> 0, \\ 0, & \text{elsewhere}.\end{cases} \end{align*} The points $t(\cos(t),\sin(t))$ for $t>0$ describe a spiral emanating from $(0,0)$... enter image description here

...and $f$ is $1$ for points on that spiral, but $0$ otherwise. If one now approaches $(0,0)$ along a stright line starting at some point in the plane, then this line hits the spiral only finitely many times, and therefore the limit of $f$ is 0, which coincides with $f(0,0)$. But $f$ is clearly not continuous at $(0,0)$, since, approaching along the spiral itself, the limit is 1.


You see many fine examples here, but one point has not been addressed: You should not consider a limit $(x,y)\to(0,0)$ in terms of paths, but in terms of neighborhoods. When you feel obliged to test convergence in terms of paths you have to test more paths than there are atoms in the universe (even defining this set of paths is a formidable task) for a single instance of $\lim_{(x,y)\to(0,0)} f(x,y)=L$, whereas in terms of neighborhoods you have to establish a simple $\epsilon/\delta$ relation in terms of inequalities: You have to ascertain that for each given $\epsilon>0$ there is a $\delta>0$ such that $0<\|(x,y)\|<\delta$ implies $|f(x,y)-L|<\epsilon$.

  • $\begingroup$ Yes. Thanks. I am finally noticing that I'll have to wrestle with $\epsilon$'s and $\delta$'s fiercely. $\endgroup$ – Billy Rubina Apr 6 '17 at 3:36

Here's a mind bendy function: $$ f(x,y)=\begin{cases}1 & (x,y)\in \mathbb{R}^2\setminus \mathbb{Q}^2 \\ 0 & \;(x,y)\not\in \mathbb{R}^2\setminus \mathbb{Q}^2 \end{cases} $$ Try to think about what your function does in any ball around the origin.

  • 1
    $\begingroup$ This function is more dope than your scratching! $\endgroup$ – Billy Rubina Apr 4 '17 at 23:45
  • $\begingroup$ Wait. Will that function be continuous? $\endgroup$ – Billy Rubina Apr 4 '17 at 23:49
  • 2
    $\begingroup$ @AskYourself it is not continuous anywhere. But you can come up with lots of paths where the limit "exists" along the path; think about winding to the origin along only rational two-tuples, the function will be identically 0 all along such a path. Now think about just how many of those paths you can come up. $\endgroup$ – qbert Apr 5 '17 at 0:22
  • $\begingroup$ Oh. I was thinking more in terms of continuous functions. For discontinuous functions, I (intuitively) thought about a "spray" function with a lot of points scattered across the space. $\endgroup$ – Billy Rubina Apr 5 '17 at 1:43
  • $\begingroup$ if you would like, you can of course modify the above to be continuous all over the plane except in some tiny ball around the origin. $\endgroup$ – qbert Apr 5 '17 at 1:59

Here's an interesting exercise related to your question: Suppose you have a function $f(x,y)$. If it is continuous at the origin along every (continuous) path passing through the origin, then in fact it must be continuous (as a function of two variables) at the origin. In other words, if a function fails to be continuous at the origin, you can construct a (continuous) path through the origin along which the function fails to be continuous.


In fact, the situation is quite bad. Consider for example the function

$$ f(x,y) = \frac{x}{\sqrt{x^2 + y^2}}. $$

This is a continuous function on $\mathbb{R} \setminus \{ (0, 0) \}$ and it is constant on any ray emanating from the origin because for all $t > 0$ and $(a,b) \neq (0,0)$ we have

$$ f(t(a,b)) = \frac{ta}{\sqrt{t^2a^2 + t^2b^2}} = \frac{a}{\sqrt{a^2+b^2}} = f(a,b).$$

Hence, if you approach the origin via all possible rays, you'll get any possible limit in $[-1,1]$. This can be seen more geometrically by noting that in polar coordinates, $f$ has the form

$$ f(r,\theta) = \cos \theta. $$

In fact, the function you presented in the post suffers from the same problem because in polar coordinates it is given as $f(r,\theta) = \sin(2 \theta)$.


Consider a curve $$y = K / \ln x$$ or $$x = \exp(K / y)$$ for negative constant $K$. Of course, $y$ approaches $0^+$ for $x\to 0^+$.

When you approach $(0,0)$ along this curve, the function: $$f(x,y)=x^y$$ has value $$x^{K / \ln x} = \exp(\ln(x^{K / \ln x})) = \exp((K / \ln x)\ln x) = e^K = \text{const.}$$ or, another way: $$\exp(K/y)^y = e^{\frac Ky\cdot y} = e^K = \text{const.}$$ So a simple $$x^y$$ can have at point $(0,0)$ ANY limit in a range $(0,1)$ when approaching from the interior of the first quarter. And when approaching along the $X$ or $Y$ axis, we obtain $1$ or $0$ as a limit of $x^0$ or $0^y$, respectively. So the function $(x,y)\mapsto x^y$ has a continuum of path limits at $(x,y)=(0,0)$.

But I wouldn't call it messy... :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.