help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"quad partition" .. not an Octave bug!


From: antonio palestrini
Subject: "quad partition" .. not an Octave bug!
Date: Tue, 26 Dec 2006 22:33:51 +0100

Regarding the "quad problem"
It isn't an octave bug, but
prob. a numerical error!
The numerical algorithms of maxima seems to have the
same problem.

For example if we integrate the function

f(x) = max(0,10-x^2)  [that has positive values only
in the interval (-3.16, 3.16) and the integral is 42.16]
using maxima with interval (-10^4, 10^4) we get a
wrong result.

As you know Octave is so powerful that you can even call maxima
from inside it!!!! This is the detail of what we get:

-----------------------
[oct 23]  str = "quad_qags(max(10-x^2,0),x,-10^4,10^4);"
  str = quad_qags(max(10-x^2,0),x,-10^4,10^4);

[oct 24] maxima(str)
Maxima restarted.

OPTIMIZE levels: Safety=2, Space=2, Speed=2
Finished compiling gazonk0.lsp.
(%o1)                          [0.0, 0.0, 63, 0]
------------------------

the result is the first number, "0" ... wrong!
The error code (the fourth number) is zero meaning
"no problem were encountered" according to maxima manual!!!


antonio

--
Prof. Antonio Palestrini
DSGSS - University of Teramo, Italy
e-mail: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]