Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)




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

.



Relevant Pages

  • Re: Bug in Mathematica 6 - Integrate - 30 - (power, invalid value)
    ... The settings ... practice there seem to be differences in the actual handling. ... out earlier by David Cantrell. ...
    (sci.math.symbolic)
  • Re: 20 since 4.1 failed 70-270
    ... > settings. ... If you rely on practice tests then yeah, you could well have got all the ... I've never read an exam prep book nor seen a practice ...
    (microsoft.public.cert.exam.mcsa)
  • Re: Defining the top and bottom measurement of an inserted image.
    ... This code is changing the user's general settings for how pictures are ... It's not generally good practice to do that (if your code changed ... I want the top and bottom settings to be set to 0.2cm each. ...
    (microsoft.public.word.vba.general)
  • Password storage
    ... My application has settings for specifiying User name and password. ... in config file) ... What is the best practice for secure storing password? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Check Point NG AI R55 - SmartDefense
    ... practice" for the settings in SmartDefense. ... Any pointers/suggestions are ...
    (comp.security.firewalls)