[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37896] quadcc(f, -Inf, Inf) incorrectly retur
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #37896] quadcc(f, -Inf, Inf) incorrectly returns 0 (quadgk too) |
Date: |
Thu, 14 Mar 2013 20:40:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 |
Update of bug #37896 (project octave):
Status: Need Info => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #3:
Computers are great aids, but they can't replace humans. Try plotting the
function to get some intuition about it. Because of the Heaviside function,
the value is 0 for all times less than 0. And while it has a peak at early
times, it quickly decays off to zero. When you ask quadcc or quadgk to
integrate a function over an infinite range it will check a couple of points.
In this case the value at -Inf,0,+Inf which are all zero. The integration
routine simply can't find anything to integrate and returns 0.
If I use an integration range that includes the non-zero portions, say t = [0,
5000], I get
octave:15> quadcc (f, 0, 5000)
ans = 1.2703e+09
octave:16> ans - quadcc (f, 0, Inf)
ans = -1.0156
And notice that +Inf is acceptable as an endpoint as long as it can find
something to integrate.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37896>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #37896] quadcc(f, -Inf, Inf) incorrectly returns 0 (quadgk too),
Rik <=