home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!europa.asd.contel.com!emory!riddle
- From: riddle@mathcs.emory.edu (Larry Riddle)
- Newsgroups: sci.math.symbolic
- Subject: Re: Some comparison of Mma, Maple and SymbMath (REBUTTAL)
- Message-ID: <9417@emory.mathcs.emory.edu>
- Date: 31 Aug 92 02:21:39 GMT
- References: <3936@sol.deakin.OZ.AU> <BtJp3I.DHx@mentor.cc.purdue.edu> <3991@sol.deakin.OZ.AU>
- Organization: Emory University, Dept of Math and CS
- Lines: 58
-
- In article <3991@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang Huang) writes:
- >For some examples of improper integrals (such as inte(1/x^2, x from -1 to
- >2), inte(1/x^2, x from -2 to 4), inte(1/x^(4/5), x from -2 to 3),
- >inte(1/x^6, x from -2 to 6), etc.), Mma gives the wrong results while
- >SymbMath gives inf. Mma cannot detect any improper point for the single
- >inteval while SymbMath can do some.
- >
-
- But, for the following equivalent improper integrals, SymbMath gives
-
- inte(1/(x-1)^2, x from 0 to 3) = -3/2
- inte(1/(x-1)^2, x from -1 to 5) = -3/4
- inte(1/(x-1)^6, x from -2 to 6) = -3368/3796875
-
- which are all wrong. (Also, I don't think you really meant to say
- inte(1/x^(4/5), x from -2 to 3) = inf).
-
- My guess is that SymbMath has built-in rules for how to handle
- inte(1/x^n, x from a to b) when n > 1 and a < 0 < b, which is fine,
- but "cannot detect any improper point for the single interval" when
- that point is anything other than 0. For example
-
- inte(1/x^(8/3), x from -1 to 2) = inf, but
- inte(1/(x-1)^(8/3), x from 0 to 3) = -3/5 - 2^(-5/3)*3/5
-
- Mathematica can be given the same capability with a single line:
- In[1]:= Unprotect[Integrate]
-
- Out[1]= {Integrate}
-
- In[2]:= Integrate[Power[x_,n_],{x_,a_,b_}] := Infinity /; (n < -1 && a < 0 && 0 < b)
-
- In[3]:= Integrate[1/x^2,{x,-1,2}]
-
- Out[3]= Infinity
-
- In[4]:= Integrate[1/x^2,{x,1,2}]
-
- 1
- Out[4]= -
- 2
-
- In[5]:= Integrate[1/x^2,{x,-2,4}]
-
- Out[5]= Infinity
-
- In[6]:= Integrate[1/x^6,{x,-2,6}]
-
- Out[6]= Infinity
-
- This definition is only given for illustration purposes. I'm sure
- it has its faults and could be improved.
-
- --
- Larry Riddle | riddle@mathcs.emory.edu PREFERRED
- Agnes Scott College | {rutgers,gatech}!emory!riddle UUCP
- Dept of Math | riddle@emory.bitnet NON-DOMAIN BITNET
- Decatur, GA 30030 | Phone: Voice 404-371-6222, FAX 404-371-6177
-