[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate r
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf |
Date: |
Wed, 4 May 2022 11:38:26 -0400 (EDT) |
Follow-up Comment #3, bug #62412 (project octave):
This is always the case with numerical computing, as opposed to pure math.
You need to check assumptions and verify that the algorithm has worked as
expected. In this case, there are additional outputs from quadcc which give a
bound on the absolute error as well as the number of points used for
evaluation. When I call the function requesting this information I get
[q, err, num_pts] = quadcc (f, 1, Inf)
q = -9.7842
err = 2.2304
num_pts = 3101
The absolute error of +/- 2.23 indicates that the algorithm essentially failed
since the default absolute tolerance is 1e-10.
I would note that quadgk also has an ERR output. It might be useful to have
integral.m compare this output with output q and issue a warning if they are
too divergent.
Another possibility is to have integral also map some integrands to quad. I
don't believe quad can handle complex integrands, but it can handle infinite
endpoints. I did some benchmarking and I don't see much difference between
quad and quadcc as they are both compiled functions (the first in Fortran and
the second in C++).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62412>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, anonymous, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Nicholas Jankowski, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Nicholas Jankowski, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf,
Rik <=
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Nicholas Jankowski, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, John W. Eaton, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Rik, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Nicholas Jankowski, 2022/05/04
- [Octave-bug-tracker] [bug #62412] integral gives consistent inaccurate result for improper integral to inf, Rik, 2022/05/04
- [Octave-bug-tracker] [bug #62412] quadcc does not warn when quadrature fails to converge, Rik, 2022/05/04
- [Octave-bug-tracker] [bug #62412] quadcc does not warn when quadrature fails to converge, Nicholas Jankowski, 2022/05/04
- [Octave-bug-tracker] [bug #62412] quadcc does not warn when quadrature fails to converge, Michael Leitner, 2022/05/05
- [Octave-bug-tracker] [bug #62412] quadcc does not warn when quadrature fails to converge, Nicholas Jankowski, 2022/05/05
- [Octave-bug-tracker] [bug #62412] quadcc does not warn when quadrature fails to converge, Michael Leitner, 2022/05/05