home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / math / symbolic / 2032 < prev    next >
Encoding:
Text File  |  1992-07-21  |  3.0 KB  |  91 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!wri!spider.wri.com!withoff
  3. From: withoff@spider.wri.com (David Withoff)
  4. Subject: Re: Mathematica problem with limits (oo - oo).
  5. Message-ID: <1992Jul16.150225.14506@wri.com>
  6. Sender: news@wri.com
  7. Nntp-Posting-Host: spider.wri.com
  8. Organization: Wolfram Research, Inc.
  9. References: <1992Jul15.211655.37815@ns1.cc.lehigh.edu> <alex.711294892@pv3449.vincent.iastate.edu>
  10. Date: Thu, 16 Jul 1992 15:02:25 GMT
  11. Lines: 78
  12.  
  13. In article <alex.711294892@pv3449.vincent.iastate.edu> alex@iastate.edu (Roger Alexander) writes:
  14. >In <1992Jul15.211655.37815@ns1.cc.lehigh.edu> fc03@ns1.cc.lehigh.edu (Frederick W. Chapman) writes:
  15. >
  16. >>I am posting this for one of our Mathematica users.
  17. >
  18. >> [...]
  19. >
  20. >>The user is running Mathematica V1.2 on an IBM RS/6000 workstation.
  21. >
  22. >>                    Limit[E^x - x, x -> Infinity]
  23. >
  24. >>is left unevaluated (as written, it is of the indeterminate form
  25. >>Infinity - Infinity) [...]
  26. >
  27. >>      [...]     The user would like to know if there is a way to
  28. >>get Mathematica to evaluate the limit of the original form of the
  29. >>expression, without having to first factor out an 'x'. 
  30. >
  31. >In case you hoped that an upgrade would help:
  32. >
  33. >--------------------------------------------------------------
  34. >Mathematica 2.0 for DEC RISC
  35. >Copyright 1988-91 Wolfram Research, Inc.
  36. > -- X11 windows graphics initialized --
  37. >
  38. >In[1]:= Limit[E^x - x, x -> Infinity]
  39. >
  40. >Infinity::indet: Indeterminate expression -Infinity + Infinity encountered.
  41. >
  42. >               x
  43. >Out[1]= Limit[E  - x, x -> Infinity]
  44. >------------------------------------------------------------------------
  45. >
  46. >May someone will contribute a solution that uses pattern matching?
  47. >Or even functional programming?
  48. >-- 
  49. >*_________________*  "Faculty members encourage the free pursuit of       
  50. > Roger Alexander  | learning in their students and protect academic          
  51. > alex@iastate.edu | freedom of students." --ISU Faculty Handbook
  52. >*_________________* [official statement of policies & procedures]
  53.  
  54. Actually, an upgrade might help after all.  Version 2 includes a
  55. package Calculus`Limit` which, among other things, distinguishes
  56. different orders of Infinity, thereby allowing it to handle things
  57. like x - Exp[x]:
  58.  
  59. In[1]:= << Calculus`Limit`
  60.  
  61. In[2]:= Limit[E^x - x, x -> Infinity]
  62.  
  63. Out[2]= Infinity
  64.  
  65. In[3]:= Limit[x - Exp[x], x -> Infinity]
  66.  
  67. Out[3]= -Infinity
  68.  
  69. If an upgrade isn't available, you could add a rule
  70. to implement the suggested transformation:
  71.  
  72. In[5]:= Limit[a_ + b_, lim_] := Block[{lima, limb},
  73.             lima = Limit[a, lim];
  74.             limb = Limit[b, lim];
  75.             If[Head[lima] == DirectedInfinity,
  76.                 Return[Limit[a (1 + b/a), lim] ] ];
  77.             If[Head[limb] == DirectedInfinity,
  78.                 Return[Limit[b (1 + a/b), lim] ] ];
  79.             lima + limb ]
  80.  
  81. In[6]:= Limit[E^x - x, x -> Infinity]
  82.  
  83. Out[6]= Infinity
  84.  
  85. Or, if you lots of time and are interested in limit algorithms, you could
  86. adapt the Version 2 package to run in Version 1, or write such a package
  87. yourself.  The basic ideas are fairly straightforward.
  88.  
  89. Dave Withoff
  90. withoff@wri.com
  91.