Re: A trap: TWO HOWLERS in Mathematica 6 making a dangerous match



I guess this feature of quadrature can be a blessing or a curse

For me, dealing with integrals convergent only in the Hadamard
sense it will be Eulogy!

Dimitris

/ Daniel Lichtblau :
On Jun 16, 7:57 pm, Vladimir Bondarenko <v...@xxxxxxxxxxxxxxx> wrote:
(* A freshman - or a biologist etc - tries to calculate a
divergent integral not realizing that it diverges... *)

Integrate[(1+z) Sin[z]/z, {z, 0, Infinity}]

(* Mathematica 6 returns an invalid answer, - but without
any warning message, the first defect. *)

(2+Pi)/2

%//N

2.5708

(* The customer has heard about some Vladimir and his VM
machine and realizes already that computer algebra systems
tend to have bugs, so he or she tries to verify the above
result via a quadrature... *)

NIntegrate[(1+z) Sin[z]/z,{z,0,Infinity}]

(* ... and encounters yet another Mathematica 6 eerie defect
- not a only a finite number is given - again without any
warning message which is itself a bug... - but this number
coincides identically with the approximation of the exact
answer... nothing to add. *)

2.5708

This is, I think, an interesting phenomenon from the point of view of
both symbolic and numeric calculus. I don't claim to fully understand
it but, having encountered it over the years, I can say a bit. The
first trouble, for both symbolic and numeric integration, is the
failure to detect divergence. But why do such disparate methods then
give numerically equivalent results? This is because some singularity-
crushing quadrature schemes have the effect, in cases of divergent
integrals, of giving a finite result that agrees with the generalized
integral (that is, the result of removing singular parts e.g via
series expansion).

I guess this feature of quadrature can be a blessing or a curse. It
depends on whether you are striving for a numerical evaluation of a
generalized integral, or trying to double-check your symbolic result
and wanting to know if in fact it diverges (or using a symbolic
computation to check your numeric routine).

While I'd not refer to the problems indicated herein as howlers, it is
generally acknowledged that this phenomenon can be a dangerous match.
I hope I'm stating the obvious here.


Best wishes,

Vladimir Bondarenko

VM and GEMM architect
Co-founder, CEO, Mathematical Director

http://www.cybertester.com/ Cyber Tester, LLChttp://maple.bug-list.org/ Maple Bugs Encyclopaediahttp://www.CAS-testing.org/ CAS Testing

P.S.

Hummm... shouldn't I give a call to Wolfram Research
and offer them to rely upon my famous VM machine?

It would be quite redundant. I'm fairly certain (I'll verify when I
have more time) that this is a simple failure of the convergence
testing code. The deficiencies therein are vast, at least where
growing and oscillatory factors coexist. About all I'll say is I think
it has improved over time. I wouldn't even put money on that.

The point is not to further test what we know is held together by spit
and frayed bailing wire; we have testing a-plenty to tell us this. The
point is to figure out the algorithms, or, failing that, better
heuristics, to improve on the current status.


P.P.S.

Guess... how many Mathematica 6 defects the VM machine
has already calculated? :-)

P.P.P.S.

My birthday, Jun 19, is closer and closer...

Daniel Lichtblau
Wolfram Research

.



Relevant Pages

  • Re: Renormalization
    ... >> is with the way the vacuum polarization tensor is handled, ... >> calculated you end up with divergent intergrals similar to equation ... The problem is the photon mass counterterm mentioned in Rohrlich's book ... integrals in 7.79 you get an answer that agrees with experiment. ...
    (sci.physics.research)
  • Re: Connes & Marcolli paper on renormalization
    ... > any especially clever mathematics. ... Most of the loop diagrams are divergent ... Again, by doing QCD on the lattice, the connection between the bare ... terms were convergent integrals, the whole series diverges. ...
    (sci.physics.research)
  • Re: Renormalization
    ... The most general expression for such integrals is given in. ... He takes the integral 11.2.12 which is divergent for values of d->4. ... The equality obviously does not hold for d->4. ... the Gamma function numerically. ...
    (sci.physics.research)
  • Re: Integrating Odd Functions over all x in R
    ... > textbook says: ... > and since the first limit on the right side of the equation does not ... > exist the integral on the left side of the equation is divergent. ... integrals converge you can replace 0 by any real #. ...
    (sci.math)
  • Re: why VB integration challenges are silly.
    ... numeric (quadrature) programs produce an answer faster and perhaps more ... useful that the symbolic expression, (should that even exist in terms ... That is why many people have devised clever algorithms for quadrature ... symbolic solution of definite improper integrals is a search for some ...
    (sci.math.symbolic)