# About the limit of a function in two (or more) variables

Let $f:D\subseteq \mathbb R^2\longrightarrow\mathbb R$ and suppose that $x_0$ is a limit point for $D$ such that $\lim_{x\to x_0} f(x)=\ell$.

If we restrict $f$ to any subset $S\subseteq D$ ($S$ is for example a curve) whereby $x_0$ is a limit point, and take the limit for $x\to x_0$ (along the new restricted domain) the value of the limit will be $\ell$.

The converse of the above statement is clearly true (take $S=D$).

Now if $\lim_{x\to x_0} f(x)=\ell$, for $x$ varying in the image of any continuous curve $\gamma:[a,b]\longrightarrow D$ (whereby $x_0$ is a limit point), is it true that $\lim_{x\to x_0} f(x)=\ell$ with $x\in D$? Any counterexamples?

A very famous counter-example is $$f \,:\, \mathbb{C}\setminus \{0\} \to \mathbb{C} \,:\, z \to e^{-\frac{1}{z^2}}$$ $f$ has an essential singularity at $0$, i.e. not only can't you extend $f$ continously to $\mathbb{C}$, $f$ even takes nearly every value of $\mathbb{C}$ (everone except 2 or so) on an arbitrary small neighbourhood of $0$.

Yet, the restriction of $f$ to $\mathbb{R}$ can be extended continously to the whole real line (you get $f(0) = 0$), and this extension is even $C^\infty$ (you get, in fact, $f^{(n)}(0) = 0$ for all $n \in \mathbb{N}$).

You can express that function without using complex numbers by e.g. doing \begin{aligned} \Rightarrow&& z &= e^{\log |z| + i\arg z } \\ \Rightarrow&& z^2 &= e^{2\log |z| + i2\arg z } \\ \Rightarrow&& \frac{1}{z^2} &= e^{-2\log |z| - i2\arg z } \\ \Rightarrow&& -\frac{1}{z^2} &= e^{-2\log |z| +i\pi - i2\arg z} = \frac{1}{|z|^2}\left(\cos(\pi - 2\arg z) + i\sin(\pi - 2\arg z)\right) \\ \Rightarrow&& e^{-\frac{1}{z^2}} &= e^{\frac{1}{|z|^2}\cos(\pi - 2\arg z)}\left(\cos\sin(\pi - 2\arg z) + i\sin\sin(\pi - 2\arg z)\right) \end{aligned}

This yields (if I haven't made a mistake somehwere...) $$f \,:\, \mathbb{R}^2 \to \mathbb{R^2}, \begin{pmatrix}x\\y\end{pmatrix} \to e^{\frac{\cos(\pi - 2\arg (x,y))}{x^2 + y^2}} \begin{pmatrix} \cos\sin(\pi - 2\arg(x,y)) \\ \sin\sin(\pi - 2\arg(x,y)) \end{pmatrix}$$ where $\arg(x,y)$ is the argument function, i.e. the function that maps a vector $(x,y)$ to the angle between $(x,y)$ and $(1,0)$ (http://en.wikipedia.org/wiki/Argument_%28complex_analysis%29).

Since you're not interested in differentiability, you can pick a simpler counter-example, though. Observe for example that the reason this function has a limit when you approach $x$ via the real line is that the exponent is negative in this case. You can use a similar idea and define $$f \,:\, \mathbb{R}^2 \to \mathbb{R^2}, \left(x,y\right)^T \to e^{\frac{y}{x^2 + y^2}}$$

This function is constant $1$ on $\mathbb{R} \times \{0\}$, but on $\{0\}\times\mathbb{R}^+$ you have $$\lim_{y\to 0^+} f(0,y) = \lim_{y\to 0^+} e^{\frac{1}{y}} = \infty \text{.}$$

• Does exist some example of this kind for function in $\mathbb R^2$? I'd like something that doesn't involve complex arguments. May 26 '13 at 19:30
• @Galoisfan You can translate this to yield something purely real. I've added such a translation, and also a simplified counter-example.
– fgp
May 26 '13 at 20:22