Weaking the path test for multivariable limits The multivariable limit $\lim_{(x,y)\to (x_0,y_0)} f(x,y)$ exists and is equal to some scalar $L$ if and only if the limit $\lim_{t\to 1} f(r(t))$ exists and is equal to $L$ for all functions $r:\mathbb{R}\to \mathbb{R}^2$ such that $\lim_{t\to 1} r(t) = (x_0, y_0)$. It is common to use this fact as a way to conclude that a certain limit does not exist, by checking that taking the limit along different paths leads to different limits or by showing that the limit along a certain path does not exist. I wonder if this characterizarion can be weakened in the following way:
The multivariable limit $\lim_{(x,y)\to (x_0,y_0)} f(x,y)$ exists and is equal to some scalar $L$ if and only if $\lim_{y\to y_0} f(x_0,y)=L$ and $\lim_{x\to x_0} f(x,g(x)) = L$ for all functions $g:\mathbb{R}\to \mathbb{R}$ such that $\lim_{x\to x_0} g(x) = y_0$.
That is, it the limit exists and is the same going through all graphs of functions $g(x)$ and through the $y$ axis, can I conclude the existence of the multivariable limit?
EDIT: I substituted my initial condition of $\lim_{y\to y_0} \lim_{x\to x_0} f(x,y)=L$ by $\lim_{x\to x_0} f(x,g(x)) = L$ since, as José Carlos Santos noted in the comments, formalizes better the idea of approaching the limit vertically.
 A: Yes, you can.
Suppose that, for some $L\in\Bbb R$, you don't have $\lim_{(x,y)\to(x_0,y_0)}f(x,y)=L$. Then there is some $\varepsilon>0$ such that, for every $\delta>0$, there is some $(x,y)\in D_f$ such that$$\|(x,y)-(x_0,y_0)\|<\delta\quad\text{and that}\quad|f(x,y)-f(x_0,y_0)|\geqslant\varepsilon.$$In particular, for every $n\in\Bbb N$, there is some $(x_n,y_n)\in D_f$ such that$$\|(x_n,y_n)-(x_0,y_0)\|<\frac1n\quad\text{and that}\quad|f(x_n,y_n)-L|\geqslant\varepsilon.$$At least one of the following assertions holds:

*

*We have $x_n=x_0$ for infinitely many $n$'s.

*We have $x_n>x_0$ for infinitely many $n$'s.

*We have $x_n<x_0$ for infinitely many $n$'s.

If the first assertion holds, we can assume without loss of generality that $x_n=x_0$ for each $n\in\Bbb N$. But then, since $\lim_{n\to\infty}(x_n,y_n)=(x_0,y_0)$, $\lim_{n\to\infty}y_n=y_0$, and so we cannot have $\lim_{y\to y_0}f(x_0,y)=L$ (because $|f(x_0,y_n)-L|\geqslant\varepsilon$ for each $n\in\Bbb N$).
If the second assertion holds, we can assume without loss of generality that the sequence $(x_n)_{n\in\Bbb N}$ is strictly decreasing. Consider the only function $g\colon[x_0,x_1]\longrightarrow\Bbb R$ such that:

*

*$(\forall n\in\Bbb Z_+):g(x_n)=y_n$;

*the restriction of $f$ to each interval $[x_{n-1},x_n]$ is affine.

Then, since $\lim_{n\to\infty}x_n=x_0$, $g$ is continuous. But, since $(\forall n\in\Bbb N):\bigl|f(x_n,g(x_n))-L\bigr|\geqslant\varepsilon$, we cannot have $\lim_{x\to x_0}f(x,g(x))=L$.
What can be done under the third assumption is similar to what was done with the second one.
