[55] in mathematical software users group

home help back first fref pref prev next nref lref last post

RE: some comparison of Mathematica, Maple and SymbMath

daemon@ATHENA.MIT.EDU (Weiguang Huang)
Tue Sep 15 00:46:28 1992

Date: Tue, 15 Sep 1992 14:43:34 +1000
From: Weiguang Huang <huang@deakin.OZ.AU>
To: allusers@cauchy.stanford.edu, everybody@netserver.stanford.edu,

In article <9417@emory.mathcs.emory.edu> 
riddle@mathcs.emory.edu (Larry Riddle) writes:
>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
>

I had said "SymbMath can do some" (detect some improper points). No one or
system can do every integral.

>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).
>

It should be inte(1/x^(4/3), x from -2 to 3), instead of inte(1/x^(4/5), x
from -2 to 3). This is the typing error. Sorry.

>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
>

SymbMath can do some integral when that point is not 0. For example,
inte(1/(x-1), x from 0 to 3)

integral of 1/(x-1)^(8/3) is different from integral of 1/x^(8/3). They are
different integrals.

>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)
>

Your defined rule can do Integrate[2/x^2, {x,-1,2}], Integrate[2/x^4/3,{x,-1,2}]
Integrate[-2/3*x^(8/3)+2, {x,-1,2}], Integrate[2/x^2-2, {x,-1,2}], etc.? 
Maybe you had to define many rules for
every these integrals, or  rewrite whole integral table.

Every time user must define special rules before he evaulates integrals. If
user had already known the result of the integral or the rule, he need not
any software to evaluate the integral that he had already known the result.

>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
>

Integrate[1/x^3,{x,-2,6}] will give the wrong result.

>This definition is only given for illustration purposes. I'm sure
>it has its faults and could be improved. 
>

Are you sure the whole integral table 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

**********************************************************************
*   Dr. Weiguang HUANG                                               *
*   5/6 Cara Road, Geelong, Vic. 3216, Australia                     *
*   Email: huang@deakin.oz.au,      Phone: (052)443282               *
* ------------------------------------------------------------------ *
*   SymbMath - a symbolic calculator with learning                   *
*   PlotData - a plotter with analysing data                         *
**********************************************************************

home help back first fref pref prev next nref lref last post