# Give an example of a function $f:D\subseteq \mathbb R^2 \to \mathbb R$ so that $lim_{x\to x_0}f(x,y)$ does not exist

Give an example of a function $f:D\subseteq \mathbb R^2 \to \mathbb R$ so that $$lim_{y\to y_0}f(x,y)$$ and $$lim_{x\to x_0}(lim_{y\rightarrow y_0}f(x,y))$$ exists but $lim_{x\to x_0}f(x,y)$ does not exist for a fixed $(x_0,y_0)\in D$

I haven´t been able to give an example. Can you please help me? I would really appreciate it :)

$$f(x,y)=y\sin\left(\frac1x\right)$$ at $(0,0)$. (You can define $f(0,0)=0$, for example).
• Or simply $f(x,y)=\frac{y}{x}$ ? – Matthias Dec 2 '14 at 13:41
• Are you sure that you can apply the L'Hospital rule for $lim_{x\to x_0}(lim_{y\rightarrow y_0}f(x,y))$ ? – Matthias Dec 2 '14 at 13:45
At $(x_0,y_0)=(0,0)$,$$(x,y)\mapsto \frac{xy}{x^2 + y^2}\ ?$$
Edit: Following Matthias's comment -- this does not answer the question. I was thinking of a non-existing limit when $(x,y)\to (x_0,y_0)$.
• Why does $lim_{x\to x_0}f(x,y)$ not exists but $lim_{y\to y_0}f(x,y)$ do in your example? – Matthias Dec 2 '14 at 13:39
• Misread -- thought it was the limit when $(x,y)\to(x_0,y_0)$. (of course, the thing I suggested is symmetric between $x$ and $y$ in all respects, so anything applying to $x$ alone also applies to $y$ alone). – Clement C. Dec 2 '14 at 13:41