WolframAlpha says limit exists when it doesn't?
I was trying to calculate the following limit:
$$ \lim_{(x,y)\to (0,0)} \frac{(x^2+y^2)^2}{x^2+y^4} $$
and, feeding it into WolframAlpha, I obtain the following answer, stating the limit is $0$:
However, when I try to calculate the limit when $x = 0$ and $y$ approaches 0, the limit is 1...
Is the answer given by WolframAlpha wrong? or am I?
Solution 1:
This limit is an excellent example to illustrate the power of the (two-)path test and apparently also an excellent example to see that you have to be very careful with how mathematical software deals with this type of problems.
However, when I try to calculate the limit when x = 0 and y approaches 0, the limit is 1...
I the Wolfram wrong ? or am I ?
You are right since, as you say: $$\lim_{x \to 0} \left( \lim_{y \to 0} \frac{\left(x^2+y^2\right)^2}{x^2+y^4} \right) =\lim_{x \to 0} x^2 =0 \quad \color{red}{\ne} \quad \lim_{y \to 0} \left( \lim_{x \to 0} \frac{\left(x^2+y^2\right)^2}{x^2+y^4} \right) =\lim_{y \to 0} \frac{y^4}{y^4} =1$$
WolframpAlpha does produce a decent plot where you can clearly see the parabola $x^2$ when you set $y=0$, but you can also see the 'line' at height $1$ when you set $x=0$.
Solution 2:
This is only to complement the excellent answer of StackTD, who correctly shows that you are right — the limit does not exist (as one can find two different paths to the origin along which the limits of the function differ). The key message is:
Do not try limits in more than one variable with Mathematica or WolframAlpha.
(actually, I'd go further and suggest: Do not try limits in more than one real variable with Mathematica or WolframAlpha.)
See e.g. this thread on Mathematica.SE which goes at length into explaining one can possibly try and do it -- spoiler, it's complicated. Quoting a comment from there, by Jens:
With
Limit
, you're always restricted to a line in the larger space, and you can't make statements about the existence of the limit in the sense of the higher-dimensional space. For that you have to show the independence of the result on the direction of the line. If you intentionally set up a function to have different limits along different lines, I dont (sic) see what else you can do with Mathematica.