# Why can't you take the limit of a 2-D function in every direction and call that the limit if they're equal?

In my second-year calculus class this term, one of the thing that the professor insisted was wrong was that the limit of a two-dimensional function as the input approached a certain point could not be calculated simply by taking the limit of the function in every direction and verifying that they were all equal.

I've taken her word for it, but why is this not true? Is there a counterexample to this proposition, and if so, what general principle does it violate?

-
You can approach with non-linear paths and get a different limit from all linear paths. – Potato Dec 24 '12 at 1:25
Can I get an example of that? I'm not quite sure how that would work. – Joe Z. Dec 24 '12 at 1:25
It has been awhile since multivariate calculus, but perhaps she is referring to non-euclidean geometry — en.wikipedia.org/wiki/Non-Euclidean_geometry. – David542 Dec 24 '12 at 1:27
Let $f(x,y) = \begin{cases}1&\text{if }y=x^2,\\0&\text{otherwise.}\end{cases}$ – Rahul Dec 24 '12 at 1:36
On the other hand, you could calculate the limit by using every path approaching the point. This is hardly practical, though. – user53153 Dec 24 '12 at 1:59

Consider the limit of the function $$f(x,y) = \begin{cases}\frac{x^4}{y^2} & \text{for } y \ne 0 \\ 0 & \text{for } y = 0\end{cases}$$ as $(x,y) \to (0,0)$. Clearly, along any line $y = ax$ passing through the origin, $$f(x,ax) = \begin{cases}\frac{x^2}{a^2} & \text{for } a \ne 0 \\ 0 & \text{for } a = 0,\end{cases}$$ and thus $\lim_{x \to 0} f(x,ax) = 0$. Indeed, $f(0,y)=0$ for all $y$ as well, so the same limit holds when approaching the origin along any line. Yet $f$ maps any open neighborhood of the origin to $[0,\infty)$, and so has no limit at the origin.
nice! (for those unpacking this, the idea is, on the circle of radius $\epsilon$, the function still blows up to infinity as you approach the line $y = 0$) – uncookedfalcon Dec 24 '12 at 1:36