MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Several variables limit?

Ersek_Ted%PAX1A at wrote:
> Nacho wrote:
> |
> |  It is possible to do several variables limits in Mathematica 3.0?
> |
> This capability isn't built in, but I think I found a way to write the code
> for it.
> Strange, but I couldn't find a way to make this a DownValue for Limit.
> So I made my own function "Lim".
> In[1]:=  Lim[expr_, {x_->x0_, y_->y0_}]/;
>               (Abs[x0]<Infinity && Abs[y0]<Infinity):=
>               Module[{a, z, cx, cy},(
>                    a=Limit[expr/.{x->x0+cx*eps, y->y0+cy*eps}, eps->0];
>                    If[ FreeQ[a,cx]&&FreeQ[a,cy],a, Indeterminate]
>               )]
> My code gives the right answer for the following non-trivial problems
> out of a text book.
> In[2]:=  Lim[(x^2 - y^2)/(x-y), {x->0, y->0}]
> Out[2]=  0
> In[3]:=  Lim[x y/ (x^2+y^2), {x->0, y->0}]
> Out[3]:= Indeterminate
> If you invest enough effort you can generalize this to a Limit in
> n-dimensions, and allow for a user specified Direction.
> A few weeks ago I sent this to WRI, and asked them to include it in
> future versions of Mma.  Maybe they will include it.
>       Ted Ersek

Multivariate limits are not so simple. Unless trivial e.g. when the
expression is continuous at the limit point, they are generally path
dependent. Here is an example using Lim as defined above.

In[38]:= expr = (x^2 + y^2)/(x+y);

In[39]:= Lim[expr, {x->0, y->0}]
Out[39]= 0

But this result is not correct. Any neighborhood of the origin in {x,y}
space contains a piece of the (complex) hypersurface V defined by
x+y==0, that is, the vanishing set of the denominator of expr. This
polynomial and the numerator x^2+y^2 are relatively prime, hence it is
not hard to show that sufficiently close to V expr can be made
arbitrarily large, even as y approaches zero.

In[40]:= elarge = expr /. x->-y+y^3;

In[41]:= Limit[elarge, y->0]
Out[41]= Infinity

In[28]:= elarge = expr /. x->-y^2+y^4
          3      2    4 2
         y  + (-y  + y )
Out[28]= ----------------

In[29]:= Limit[elarge, y->0]
Out[29]= Infinity

Hence the limit of expr as we approach the origin is path dependent, not
zero. In fact, by approaching V a bit more slowly we can obtain nonzero
finite limits.

In[42]:= efinite = expr /. x->-y+y^2;

In[43]:= Limit[efinite, y->0]
Out[43]= 2

Daniel Lichtblau
Wolfram Research
danl at

  • Prev by Date: Re: Flat: Problems & Workarounds Sweden.
  • Next by Date: Compiled InterpolatingFunctions
  • Previous by thread: Re: Loading Standard Packages
  • Next by thread: Compiled InterpolatingFunctions