Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: dimitris <dimmechan@xxxxxxxxx>
- Date: Fri, 06 Jul 2007 13:06:23 -0700
Daniel Lichtblau :
On Jul 6, 2:39 pm, dimitris <dimmec...@xxxxxxxxx> wrote:
[...]
The settings
Integrate[...,Asumptions]
and
Assuming[Integrate[...]]
are equivalent or not?
Not. I believe (perhaps naively) that ideally they would be, but in
practice there seem to be differences in the actual handling. This is
a phenomenon still under investigation.
I am a little confused.
If the answer is no can you show me a simple example?
Which of them is more preferable?
Integrate[...,Assumptions->...] is a bit easier to control in that
there is no issue of "global" assumptions interfering in any way.
I do not have a particularly simple example offhand, but I'll show the
full example of this thread, as done in my development kernel.
In[1]:= InputForm[Integrate[((1 + z^2)/(1 + z^4))^n, {z, 0, Infinity},
Assumptions -> {n > 0, Element[n, Integers]}] ]
Out[1]//InputForm=
If[2*n > 1, (4^(-1 - n)*(4^(1 + n)*Gamma[5/4]*Gamma[1 - n]*Gamma[-1/4
+ n]*
HypergeometricPFQ[{1/4, 1/2 - n/2, -n/2}, {1/2, 5/4 - n}, -1] +
4^n*n*Gamma[3/4]*Gamma[1 - n]*Gamma[-3/4 + n]*
HypergeometricPFQ[{3/4, 1/2 - n/2, 1 - n/2}, {3/2, 7/4 - n}, -1]
-
8*n*Sqrt[Pi]*Gamma[1/2 - 2*n]*Gamma[-1 + 2*n]*
HypergeometricPFQ[{-1/4 + n/2, 1/4 + n/2, n}, {1/4 + n, 3/4 + n},
-1])*
Sin[n*Pi])/Pi, Integrate[((1 + z^2)/(1 + z^4))^n, {z, 0, Infinity},
Assumptions -> Inequality[0, Less, n, LessEqual, 1/2]]]
In[2]:= InputForm[Assuming[n > 0 && Element[n, Integers],
Integrate[((1 + z^2)/(1 + z^4))^n, {z, 0, Infinity}]] ]
Out[2]//InputForm=
If[2*n > 1, (4*Gamma[5/4]*Gamma[-1/4 + n]*HypergeometricPFQ[
{1/4, 1/2 - n/2, -n/2}, {1/2, 5/4 - n}, -1] +
n*Gamma[3/4]*Gamma[-3/4 + n]*HypergeometricPFQ[{3/4, 1/2 - n/2, 1 -
n/2},
{3/2, 7/4 - n}, -1] + (2^(3 - 2*n)*Sqrt[Pi]*Gamma[1/2 - 2*n]*
Gamma[-1 + 2*n]*HypergeometricPFQ[{-1/4 + n/2, 1/4 + n/2, n},
{1/4 + n, 3/4 + n}, -1])/Gamma[-n])/(4*Gamma[n]),
Integrate[((1 + z^2)/(1 + z^4))^n, {z, 0, Infinity},
Assumptions -> Inequality[0, Less, n, LessEqual, 1/2]]]
The results look similar but are in fact a bit different, as pointed
out earlier by David Cantrell.
Thank you in advance for your response
(and in general thank you a lot for your interest
you show participating to this forum, MathGroup
e.t.c. talking about CASs, Mma, symbolic algebra
issues and so many other interesting things without
any sense of elitism of you or Mathematica).
Cheers
Dimitris
Daniel Lichtblau
Wolfram Research
Until now (and working with versions 4 and 5.2) I don't remember
to have encountered a case where the two settings gave different
outputs.
[There was a thread in MathGroup a long time ago talking about
these two settings but I can't found it unfortunately. What I remember
is that the conclusion was that Assuming[...] setting was more
preferable. But I don't remember if the issue of "global" assumptions
was discussed.]
Interesting thread that began from Vladimir's machine!
Thanks a lot again for your quick response.
Dimitris
.
- References:
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: Daniel Lichtblau
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: David W . Cantrell
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: Daniel Lichtblau
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: dimitris
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- From: Daniel Lichtblau
- Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- Prev by Date: Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- Next by Date: Re: An exact 1-D integration challenge - 47 - (yum-yum... go and surpass all CASs)
- Previous by thread: Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
- Next by thread: mathHandbook
- Index(es):
Relevant Pages
|