home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!wri!spider.wri.com!withoff
- From: withoff@spider.wri.com (David Withoff)
- Subject: Re: Mathematica problem with limits (oo - oo).
- Message-ID: <1992Jul16.150225.14506@wri.com>
- Sender: news@wri.com
- Nntp-Posting-Host: spider.wri.com
- Organization: Wolfram Research, Inc.
- References: <1992Jul15.211655.37815@ns1.cc.lehigh.edu> <alex.711294892@pv3449.vincent.iastate.edu>
- Date: Thu, 16 Jul 1992 15:02:25 GMT
- Lines: 78
-
- In article <alex.711294892@pv3449.vincent.iastate.edu> alex@iastate.edu (Roger Alexander) writes:
- >In <1992Jul15.211655.37815@ns1.cc.lehigh.edu> fc03@ns1.cc.lehigh.edu (Frederick W. Chapman) writes:
- >
- >>I am posting this for one of our Mathematica users.
- >
- >> [...]
- >
- >>The user is running Mathematica V1.2 on an IBM RS/6000 workstation.
- >
- >> Limit[E^x - x, x -> Infinity]
- >
- >>is left unevaluated (as written, it is of the indeterminate form
- >>Infinity - Infinity) [...]
- >
- >> [...] The user would like to know if there is a way to
- >>get Mathematica to evaluate the limit of the original form of the
- >>expression, without having to first factor out an 'x'.
- >
- >In case you hoped that an upgrade would help:
- >
- >--------------------------------------------------------------
- >Mathematica 2.0 for DEC RISC
- >Copyright 1988-91 Wolfram Research, Inc.
- > -- X11 windows graphics initialized --
- >
- >In[1]:= Limit[E^x - x, x -> Infinity]
- >
- >Infinity::indet: Indeterminate expression -Infinity + Infinity encountered.
- >
- > x
- >Out[1]= Limit[E - x, x -> Infinity]
- >------------------------------------------------------------------------
- >
- >May someone will contribute a solution that uses pattern matching?
- >Or even functional programming?
- >--
- >*_________________* "Faculty members encourage the free pursuit of
- > Roger Alexander | learning in their students and protect academic
- > alex@iastate.edu | freedom of students." --ISU Faculty Handbook
- >*_________________* [official statement of policies & procedures]
-
- Actually, an upgrade might help after all. Version 2 includes a
- package Calculus`Limit` which, among other things, distinguishes
- different orders of Infinity, thereby allowing it to handle things
- like x - Exp[x]:
-
- In[1]:= << Calculus`Limit`
-
- In[2]:= Limit[E^x - x, x -> Infinity]
-
- Out[2]= Infinity
-
- In[3]:= Limit[x - Exp[x], x -> Infinity]
-
- Out[3]= -Infinity
-
- If an upgrade isn't available, you could add a rule
- to implement the suggested transformation:
-
- In[5]:= Limit[a_ + b_, lim_] := Block[{lima, limb},
- lima = Limit[a, lim];
- limb = Limit[b, lim];
- If[Head[lima] == DirectedInfinity,
- Return[Limit[a (1 + b/a), lim] ] ];
- If[Head[limb] == DirectedInfinity,
- Return[Limit[b (1 + a/b), lim] ] ];
- lima + limb ]
-
- In[6]:= Limit[E^x - x, x -> Infinity]
-
- Out[6]= Infinity
-
- Or, if you lots of time and are interested in limit algorithms, you could
- adapt the Version 2 package to run in Version 1, or write such a package
- yourself. The basic ideas are fairly straightforward.
-
- Dave Withoff
- withoff@wri.com
-