Deal of the Month: 50% Discount on Windows 7 (Limited Amazon.com offer) Main Page | Report this Page
Science Forum Index  »  Mathematics Forum  »  Symbolic calculations on the web
Page 1 of 1    

Symbolic calculations on the web

Author Message
Stephen J. Herschkorn
Posted: Thu Feb 10, 2005 11:58 am
Guest
In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.

--
Stephen J. Herschkorn sjherschko@netscape.net
 
David W. Cantrell
Posted: Thu Feb 10, 2005 12:51 pm
Guest
"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:
[quote:6517de9420]In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.
[/quote:6517de9420]
Interesting. I suppose it's perfectly legal.

I wonder:
Has something similar been done using Maple?

David
 
Gerry Myerson
Posted: Thu Feb 10, 2005 5:12 pm
Guest
In article <3rMOd.9404$UL4.6236@fe09.lga>,
"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:

[quote:f2ecb2fcb2]In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.
[/quote:f2ecb2fcb2]
Cool. I asked it to integrate x*tan(x) from 0 to pi/4
and got (8C + i(pi)^2 - 4 pi log(1 + i)) / 16.
What does C stand for in this context?
Is that some sort of reserved symbol in Mathematica?

--
Gerry Myerson (gerry@maths.mq.edi.ai) (i -> u for email)
 
David W. Cantrell
Posted: Thu Feb 10, 2005 7:00 pm
Guest
Gerry Myerson <gerry@maths.mq.edi.ai.i2u4email> wrote:
[quote:8185229809]In article <3rMOd.9404$UL4.6236@fe09.lga>,
"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:

In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.

Cool. I asked it to integrate x*tan(x) from 0 to pi/4
and got (8C + i(pi)^2 - 4 pi log(1 + i)) / 16.
What does C stand for in this context?
Is that some sort of reserved symbol in Mathematica?
[/quote:8185229809]
Actually, Mathematica calls it "Catalan".

That result is correct, but version 5.0 of Mathematica gives a nicer form:

(4*Catalan - Pi*Log[2])/8

David
 
Stephen J. Herschkorn
Posted: Thu Feb 10, 2005 10:10 pm
Guest
Gerry Myerson wrote:

[quote:95402595a4]In article <3rMOd.9404$UL4.6236@fe09.lga>,
"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:



In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.



Cool. I asked it to integrate x*tan(x) from 0 to pi/4
and got (8C + i(pi)^2 - 4 pi log(1 + i)) / 16.
What does C stand for in this context?
Is that some sort of reserved symbol in Mathematica?


[/quote:95402595a4]
Unfortunate, isn't it? I tried to integrate r/[pi^2 (1+r^2 cos^2 t) (1
+ r^2 sin^2 t)] for r = 0 to infinity, and it also game me an answewr
in terms of a logarithm of a complex number.


--
Stephen J. Herschkorn sjherschko@netscape.net
 
Dave Seaman
Posted: Fri Feb 11, 2005 9:38 am
Guest
On Fri, 11 Feb 2005 20:23:39 +0100, David Kastrup wrote:
[quote:fc62f37414]"Stephen J. Herschkorn" <sjherschko@netscape.net> writes:

Stephen J. Herschkorn wrote:

In response to my recent request for a Mathematica(R) favor, a
reader sent me e-mail telling me about http://www.quickmath.com/ ,
which will do many symbolic calculations. It is very helpful.


Actually, now I see that the integrator of limited usefulness. For
example, it just told me that
integral(r=0..infty, 4r / (4-r^4)) = i pi/8.

Well, I get nan. So what do you expect? 4r/(4-r^4) happens to be

r / (2 - r^2) + r / (r^2 + 2)

And the first term has a single pole at r=sqrt(2). So the integral
diverges. The best you could hope for was a principal value.
[/quote:fc62f37414]
He was probably hoping for the integrator to tell him that the integral
diverges, which is what Mathematica 5.1 says.



--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
 
Stephen J. Herschkorn
Posted: Fri Feb 11, 2005 12:38 pm
Guest
Stephen J. Herschkorn wrote:

[quote:a7982e79ed]In response to my recent request for a Mathematica(R) favor, a reader
sent me e-mail telling me about http://www.quickmath.com/ , which will
do many symbolic calculations. It is very helpful.
[/quote:a7982e79ed]

Actually, now I see that the integrator of limited usefulness. For
example, it just told me that
integral(r=0..infty, 4r / (4-r^4)) = i pi/8.


--
Stephen J. Herschkorn sjherschko@netscape.net
 
Dave Seaman
Posted: Fri Feb 11, 2005 1:19 pm
Guest
On 11 Feb 2005 21:56:55 GMT, David W Cantrell wrote:

[quote:baeae7f655]As Dave Seaman pointed out, I would hope that QuickMath would tell me
the integral diverges.

I don't think it will _ever_ do that. For example, if you ask it for

integral(x=-1..1, 1/x)

its "result" is the integral itself, unevaluated.
[/quote:baeae7f655]
I wasn't talking about the result. I was talking about the presence of
informative messages. Here's what Mathematica says about those two integrals:

Mathematica 5.1 for Mac OS X
Copyright 1988-2004 Wolfram Research, Inc.
-- Terminal graphics initialized --

In[1]:= Integrate[4r/(4-r^4),{r,0,Infinity}]

r
Integrate::idiv: Integral of ------- does not converge on {0, Infinity}.
4
-4 + r

4 r
Out[1]= Integrate[------, {r, 0, Infinity}]
4
4 - r

In[2]:= Integrate[1/x,{x,-1,1}]

1
Integrate::idiv: Integral of - does not converge on {-1, 1}.
x

1
Out[2]= Integrate[-, {x, -1, 1}]
x


So yes, the "result" is the integral, unevaluated, but that doesn't mean we
don't get useful information.


--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
 
David W. Cantrell
Posted: Fri Feb 11, 2005 2:39 pm
Guest
David Kastrup <dak@gnu.org> wrote:
[quote:9ad0987976]"Stephen J. Herschkorn" <sjherschko@netscape.net> writes:

Stephen J. Herschkorn wrote:

In response to my recent request for a Mathematica(R) favor, a
reader sent me e-mail telling me about http://www.quickmath.com/ ,
which will do many symbolic calculations. It is very helpful.


Actually, now I see that the integrator of limited usefulness. For
example, it just told me that
integral(r=0..infty, 4r / (4-r^4)) = i pi/8.
[/quote:9ad0987976]
Hmm. It just told me that the result is i pi/2. Did you perhaps ask it for

integral(r=0..infty, r / (4-r^4))

instead?

[quote:9ad0987976]Well, I get nan.
[/quote:9ad0987976]
So do I. Version 5.0 of Mathematica claims that the integral does not
converge, and so I don't know what version of Mathematica is being used
by QuickMath.

[quote:9ad0987976]So what do you expect? 4r/(4-r^4) happens to be

r / (2 - r^2) + r / (r^2 + 2)

And the first term has a single pole at r=sqrt(2). So the integral
diverges. The best you could hope for was a principal value.
[/quote:9ad0987976]
And version 5.0 of Mathematica also gets that right:

In[2]:= Integrate[4r/(4 - r^4), {r, 0, Infinity}, PrincipalValue->True]

Out[2]= 0

BTW, in this problem, it's rather easy to see how a CAS might get the
principal value wrong by precisely i pi/2.

David Cantrell
 
Stephen J. Herschkorn
Posted: Fri Feb 11, 2005 3:49 pm
Guest
David W. Cantrell wrote:

[quote:1a36ace822]David Kastrup <dak@gnu.org> wrote:


"Stephen J. Herschkorn" <sjherschko@netscape.net> writes:



Stephen J. Herschkorn wrote:



In response to my recent request for a Mathematica(R) favor, a
reader sent me e-mail telling me about http://www.quickmath.com/ ,
which will do many symbolic calculations. It is very helpful.


Actually, now I see that the integrator of limited usefulness. For
example, it just told me that
integral(r=0..infty, 4r / (4-r^4)) = i pi/8.



Hmm. It just told me that the result is i pi/2. Did you perhaps ask it for

integral(r=0..infty, r / (4-r^4))

instead?


[/quote:1a36ace822]
Oops, you are correct.

[quote:1a36ace822]

Well, I get nan.



So do I. Version 5.0 of Mathematica claims that the integral does not
converge, and so I don't know what version of Mathematica is being used
by QuickMath.



So what do you expect? 4r/(4-r^4) happens to be

r / (2 - r^2) + r / (r^2 + 2)

And the first term has a single pole at r=sqrt(2). So the integral
diverges. The best you could hope for was a principal value.



And version 5.0 of Mathematica also gets that right:

In[2]:= Integrate[4r/(4 - r^4), {r, 0, Infinity}, PrincipalValue->True]

Out[2]= 0

BTW, in this problem, it's rather easy to see how a CAS might get the
principal value wrong by precisely i pi/2.

[/quote:1a36ace822]
As Dave Seaman pointed out, I would hope that QuickMath would tell me
the integral diverges. At the very least, it should not be giving me a
complex value for a real integral.


--
Stephen J. Herschkorn sjherschko@netscape.net
 
Dave Seaman
Posted: Fri Feb 11, 2005 4:09 pm
Guest
On 12 Feb 2005 00:11:15 GMT, David W Cantrell wrote:
[quote:79ed162d2c]Dave Seaman <dseaman@no.such.host> wrote:
On 11 Feb 2005 21:56:55 GMT, David W Cantrell wrote:

As Dave Seaman pointed out, I would hope that QuickMath would tell me
the integral diverges.

I don't think it will _ever_ do that.

My "it" referred to QuickMath. (I thought that was obvious.)
[/quote:79ed162d2c]
Yes, it was obvious. I thought it was obvious that it was obvious.

[quote:79ed162d2c]Of course,
Mathematica itself often gives informative messages. But it doesn't
appear to me that Quickmath is set up to do so.
[/quote:79ed162d2c]
I was merely pointing out that the two responses need not be mutually
exclusive.


--
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>
 
David W. Cantrell
Posted: Fri Feb 11, 2005 4:56 pm
Guest
"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:
[quote:0a34db38e9]David W. Cantrell wrote:
David Kastrup <dak@gnu.org> wrote:
"Stephen J. Herschkorn" <sjherschko@netscape.net> writes:
Stephen J. Herschkorn wrote:
In response to my recent request for a Mathematica(R) favor, a
reader sent me e-mail telling me about http://www.quickmath.com/ ,
which will do many symbolic calculations. It is very helpful.

Actually, now I see that the integrator of limited usefulness. For
example, it just told me that
integral(r=0..infty, 4r / (4-r^4)) = i pi/8.

Hmm. It just told me that the result is i pi/2. Did you perhaps ask it
for

integral(r=0..infty, r / (4-r^4))

instead?

Oops, you are correct.

Well, I get nan.

So do I. Version 5.0 of Mathematica claims that the integral does not
converge, and so I don't know what version of Mathematica is being used
by QuickMath.

So what do you expect? 4r/(4-r^4) happens to be

r / (2 - r^2) + r / (r^2 + 2)

And the first term has a single pole at r=sqrt(2). So the integral
diverges. The best you could hope for was a principal value.

And version 5.0 of Mathematica also gets that right:

In[2]:= Integrate[4r/(4 - r^4), {r, 0, Infinity}, PrincipalValue->True]

Out[2]= 0

BTW, in this problem, it's rather easy to see how a CAS might get the
principal value wrong by precisely i pi/2.

As Dave Seaman pointed out, I would hope that QuickMath would tell me
the integral diverges.
[/quote:0a34db38e9]
I don't think it will _ever_ do that. For example, if you ask it for

integral(x=-1..1, 1/x)

its "result" is the integral itself, unevaluated.

This example also shows us that QuickMath does not, by default, give Cauchy
principal values. If it did so, then the result would have been 0.

[quote:0a34db38e9]At the very least, it should not be giving me a
complex value for a real integral.
[/quote:0a34db38e9]
But, as I said before, it's rather easy to see how such an error can
happen.

Let's look at a simpler example than your original problem:
Find the principal value of integral(x=-1..1, 1/x).

Calculus students can get this right very easily, even without really
knowing what they're doing. They say that an antiderivative of 1/x is
log|x|, and then use the Fundamental Theorem, obtaining

log|1| - log|-1| = 0 - 0 = 0

for their result.

What happens if a CAS tries the same method? Well, both CASs I use give
log(x), rather than log|x|, as an antiderivative of 1/x. And that's
perfectly fine, of course. After all, when x is negative, log(x) and log|x|
differ merely by a constant. (Ah, but that constant happens to be complex:
pi*i.) So if the CAS proceeds naively, as the students did, it will get

log(1) - log(-1) = 0 - pi*i = -pi*i

an incorrect complex result for a real integral.

I suspect that, for your original problem, some old version of Mathematica
used by QuickMath was doing something similar.

David Cantrell
 
David W. Cantrell
Posted: Fri Feb 11, 2005 7:11 pm
Guest
Dave Seaman <dseaman@no.such.host> wrote:
[quote:a85f4e0185]On 11 Feb 2005 21:56:55 GMT, David W Cantrell wrote:

As Dave Seaman pointed out, I would hope that QuickMath would tell me
the integral diverges.

I don't think it will _ever_ do that.
[/quote:a85f4e0185]
My "it" referred to QuickMath. (I thought that was obvious.) Of course,
Mathematica itself often gives informative messages. But it doesn't
appear to me that Quickmath is set up to do so.

David Cantrell

[quote:a85f4e0185]For example, if you ask it for

integral(x=-1..1, 1/x)

its "result" is the integral itself, unevaluated.

I wasn't talking about the result. I was talking about the presence of
informative messages. Here's what Mathematica says about those two
integrals:

Mathematica 5.1 for Mac OS X
Copyright 1988-2004 Wolfram Research, Inc.
-- Terminal graphics initialized --

In[1]:= Integrate[4r/(4-r^4),{r,0,Infinity}]

r
Integrate::idiv: Integral of ------- does not converge on {0, Infinity}.
4
-4 + r

4 r
Out[1]= Integrate[------, {r, 0, Infinity}]
4
4 - r

In[2]:= Integrate[1/x,{x,-1,1}]

1
Integrate::idiv: Integral of - does not converge on {-1, 1}.
x

1
Out[2]= Integrate[-, {x, -1, 1}]
x

So yes, the "result" is the integral, unevaluated, but that doesn't mean
we don't get useful information.[/quote:a85f4e0185]
 
linux
Posted: Sat Feb 12, 2005 8:34 am
Guest
"David W. Cantrell" <DWCantrell@sigmaxi.org> a écrit dans le message de
news: 20050211165655.034$GU@newsreader.com...
[quote:7c1c8b49fa]"Stephen J. Herschkorn" <sjherschko@netscape.net> wrote:
What happens if a CAS tries the same method? Well, both CASs I use give
log(x), rather than log|x|, as an antiderivative of 1/x. And that's
perfectly fine, of course. After all, when x is negative, log(x) and
log|x|
differ merely by a constant. (Ah, but that constant happens to be complex:
pi*i.) So if the CAS proceeds naively, as the students did, it will get

log(1) - log(-1) = 0 - pi*i = -pi*i

an incorrect complex result for a real integral.

I suspect that, for your original problem, some old version of Mathematica
used by QuickMath was doing something similar.

David Cantrell
[/quote:7c1c8b49fa]
I have only Mathematica 2.0 , Mathematica 2.0 gives
Integrate[1/x,{x,-1,1}]=-I*Pi
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Nov 08, 2009 2:41 am