home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / sci / math / symbolic / 2287 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  2.2 KB

  1. Path: sparky!uunet!europa.asd.contel.com!emory!riddle
  2. From: riddle@mathcs.emory.edu (Larry Riddle)
  3. Newsgroups: sci.math.symbolic
  4. Subject: Re: Some comparison of Mma, Maple and SymbMath (REBUTTAL)
  5. Message-ID: <9417@emory.mathcs.emory.edu>
  6. Date: 31 Aug 92 02:21:39 GMT
  7. References: <3936@sol.deakin.OZ.AU> <BtJp3I.DHx@mentor.cc.purdue.edu> <3991@sol.deakin.OZ.AU>
  8. Organization: Emory University, Dept of Math and CS
  9. Lines: 58
  10.  
  11. In article <3991@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang Huang) writes:
  12. >For some examples of improper integrals (such as inte(1/x^2, x from -1 to
  13. >2), inte(1/x^2, x from -2 to 4), inte(1/x^(4/5), x from -2 to 3),
  14. >inte(1/x^6, x from -2 to 6), etc.), Mma gives the wrong results while
  15. >SymbMath gives inf. Mma cannot detect any improper point for the single
  16. >inteval while SymbMath can do some.
  17. >
  18.  
  19. But, for the following equivalent improper integrals, SymbMath gives
  20.  
  21. inte(1/(x-1)^2, x from 0 to 3) = -3/2
  22. inte(1/(x-1)^2, x from -1 to 5) = -3/4
  23. inte(1/(x-1)^6, x from -2 to 6) = -3368/3796875
  24.  
  25. which are all wrong. (Also, I don't think you really meant to say
  26. inte(1/x^(4/5), x from -2 to 3) = inf).
  27.  
  28. My guess is that SymbMath has built-in rules for how to handle
  29. inte(1/x^n, x from a to b) when n > 1 and a < 0 < b, which is fine,
  30. but "cannot detect any improper point for the single interval" when
  31. that point is anything other than 0. For example
  32.  
  33. inte(1/x^(8/3), x from -1 to 2) = inf, but
  34. inte(1/(x-1)^(8/3), x from 0 to 3) = -3/5 - 2^(-5/3)*3/5
  35.  
  36. Mathematica can be given the same capability with a single line:
  37. In[1]:= Unprotect[Integrate]
  38.  
  39. Out[1]= {Integrate}
  40.  
  41. In[2]:= Integrate[Power[x_,n_],{x_,a_,b_}] := Infinity /; (n < -1 && a < 0 && 0 < b)
  42.  
  43. In[3]:= Integrate[1/x^2,{x,-1,2}]
  44.  
  45. Out[3]= Infinity
  46.  
  47. In[4]:= Integrate[1/x^2,{x,1,2}]
  48.  
  49.         1
  50. Out[4]= -
  51.         2
  52.  
  53. In[5]:= Integrate[1/x^2,{x,-2,4}]
  54.  
  55. Out[5]= Infinity
  56.  
  57. In[6]:= Integrate[1/x^6,{x,-2,6}]
  58.  
  59. Out[6]= Infinity
  60.  
  61. This definition is only given for illustration purposes. I'm sure
  62. it has its faults and could be improved. 
  63.  
  64. -- 
  65. Larry Riddle        | riddle@mathcs.emory.edu         PREFERRED
  66. Agnes Scott College | {rutgers,gatech}!emory!riddle   UUCP 
  67. Dept of Math        | riddle@emory.bitnet             NON-DOMAIN BITNET
  68. Decatur, GA 30030   | Phone: Voice 404-371-6222, FAX 404-371-6177
  69.