Why does limit $\lim_{(x,y) \to (0,0)}\frac{2x}{x^2+x+y^2}$ not exist? I don't understand how this limit doesn't exist.
\begin{align*} 
\lim_{(x,y) \to (0,0)}\dfrac{2x}{x^2+x+y^2}&= \lim_{r \to 0}\dfrac{2r\cos\theta}{r^2\cos^2\theta+r\cos\theta+r^2\sin^2\theta}\\
&=\lim_{r \to 0}\dfrac{2r\cos\theta}{r^2+r\cos\theta}\\
&=\lim_{r \to 0}\dfrac{2\cos\theta}{r+\cos\theta} \\
&= 2
\end{align*}
I find that limit goes to $2$. But by WolframAlpha, limit does not exist. How does that work ?
Thanks in advance.
 A: The other answers give excellent reasons as to why the "limit does not exist" but here is more of a reason "why" your logic breaks down at the last line (which answers your question "How does that work?"):
In the last line we should really write
$$\lim_{r\to0}\dfrac{2\cos\theta}{r+\cos\theta}=\dfrac{2\cos\theta}{\cos\theta}=2 \text{, if }\cos\theta\neq0.$$
Because in that last step, by 'cancelling' $\cos\theta$ from the numerator and denominator, you want to make sure that you're not dividing by zero. Since $\cos\theta=0$ is a definite possibility, then we need to consider it as a separate case.
As suggested by @Patrick, we can get this scenario by setting $\theta=\tfrac{\pi}2$, yielding the sub-case
$$\left.\lim_{r\to0}\dfrac{2\cos\theta}{r+\cos\theta}\right|_{\theta=\tfrac{\pi}2}=\lim_{r\to0}\dfrac{0}{r+0}=0,$$
hence showing that we can get a different answer to the limit, hence it does not exist.
A: You neglected to control $\theta$ too.
A: The limit doesn't exist. Fix $y=0$; then the limit expression is $$\lim_{x \to 0} \frac{2}{x+1} = 2$$
Fix $x=0$; then the limit expression is identically $$\lim_{y \to 0} \frac{0}{y^2} = 0$$
