I just realized that I don't have to worry about this; the worksheet says "Find the value of the limit using Mathematica or justify the limit does not exist". I've already done so by hand, so me asking this is probably pointless.
Thank you to everyone who gave answers, and sorry for wasting your time.

Welp. I can't find anything helpful, so here we go again.

I'm trying to find the multivariable limit (if it exists) of $$\lim_{(x,y)\to(0,0)}\frac{2x+y} {x+3y}$$ Mathematica says that the limit evaluates to $2$, but I ran it through manually along the x- and y-axes and got that the limit does not exist. Wolfram Alpha agrees with my result.
$f(x,0) = 2; f(0,y) = \frac{1}{3}; 2 \ne \frac{1}{3}$

I have no idea why Mathematica got the result it did or how to fix it, if possible. This was done in Mathematica 11.0, if that makes any difference.

The input and output is as follows:

In:= w[x_, y_] = (2*x + y)/(x + 3*y)
Out= (2*x + y)/(x + 3*y)

In:= Limit[Limit[w[x, y], y -> 0], x -> 0]
Out= 2

By hand:
Along y=0 (x-axis): $f(x,0) = \frac{2x}{x} = 2$
Along x=0: $f(0,y) = \frac{y}{3y} = \frac{1}{3}$
$2 \ne \frac{1}{3}$ so limit does not exist

  • $\begingroup$ People here generally like users to post code as Mathematica code instead of images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful $\endgroup$
    – Michael E2
    Oct 16, 2016 at 21:28
  • $\begingroup$ Related: (21544), (25381) $\endgroup$
    – Michael E2
    Oct 16, 2016 at 21:28
  • 2
    $\begingroup$ You're not performing a multivariate limit. You're iterating two single-variable limits. The interior one depends on a generic parameter x and is in fact 2 for all nonzero x. So if the limit exists, it has to be 2. Perhaps the links to the related problems can help you get Mathematica to prove or disprove that it is 2. $\endgroup$
    – Michael E2
    Oct 16, 2016 at 21:31

3 Answers 3


As with your hand computations,

limYX = Limit[Limit[w[x, y], y -> 0], x -> 0]


limXY = Limit[Limit[w[x, y], x -> 0], y -> 0]

To compare with your hand calculations:

limXY == limYX
  • 1
    $\begingroup$ I tried Limit[(2 x + y)/(x + 3 y), x | y -> [Infinity]] and got 3/4. $\endgroup$
    – Fred Kline
    Oct 17, 2016 at 4:31
  • $\begingroup$ @fred woah, is this even documented syntax? $\endgroup$
    – LLlAMnYP
    Oct 17, 2016 at 6:38
  • $\begingroup$ @LLlAMnYP, no. However, we can Reduce to 3/4 and find that whatever is input for x becomes y and vice versa. So, the Limit when $x=y$ is 3/4. $\endgroup$
    – Fred Kline
    Oct 17, 2016 at 6:51
  • $\begingroup$ @LLlAMnYP, I use $(a|b)\in\mathbb{N}$ often and just tried it for this problem. $\endgroup$
    – Fred Kline
    Oct 17, 2016 at 6:53
  • $\begingroup$ $$\lim_{x|y\to \infty }\frac{2 x+y }{x+3 y}=\frac{3}{4}$$ $\endgroup$
    – Fred Kline
    Oct 17, 2016 at 6:59

Since version 11.2, Mathematica now has support for genuine multivariate limits. In this case, we can now get the expected answer:

Limit[(2 x + y)/(x + 3 y), {x, y} -> {0, 0}]

that is, the limit does not exist, as already demonstrated by other answers.


You can get ANY real result for the function

w[x_, y_] := (2*x + y)/(x + 3*y)

if you let {x,y}->{0,0} in an appropriate manner. Hence the limit does not exist.

Proof in two parts

1) The substitution

w[x, y] /. {y -> t, x -> ((1 - 3 z)/(-2 + z)) t} // Simplify

(* Out[138]= z *)

gives any z except z = 2 (where the substitution breaks down). Notice that the Limit t->0 does not appear explicitly.

2) this substitution gives you

w[x, y] /. {y -> t^2, x -> t} // Simplify

(* Out[140]= (2 + t)/(1 + 3 t) *)

Limit[%, t -> 0]

(* Out[136]= 2 *)

the missing 2.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.