Post Reply 
HP 15C and INT(1/√(1-x),0,1)
01-21-2018, 04:46 PM
Post: #53
RE: HP 15C and INT(1/√(1-x),0,1)
(01-21-2018 03:57 PM)TheKaneB Wrote:  I used a C implementation of the Romberg algorithm to find the integral of
f(x) = 1 / sqrt(1 / x) over the interval 0 - 1

It runs for a relatively long time (several seconds on my 3 GHz Intel i5) and it came up with this result:

result = 2.000052194143781214563660
function evaluations = 1073741825 (1 billion of function evaluations!)

I set an accuracy of 0.0001 with max steps = 100. I also used the interval from 0 to 0.99999999999 or else it would evaluate to NAN.

If i set an accuracy of 0.01 I get this:
result = 2.005444550190635499831160
function evaluations = 16777217

(I'm assuming the f(x) = 1 / sqrt(1 / x) is a typo?)

There's room for improvement there. The Romberg implementation in Free42, based on code written by Hugh Steers, reaches those levels of accuracy with 32767 and 255 evaluations, respectively.

I used ACC = 0.000025 and 0.0025, respectively, since Free42 treats ACC as a relative error, and using 0.0001 and 0.01 produce results that are less accurate than your examples.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 15C and INT(1/√(1-x),0,1) - salvomic - 11-26-2017, 07:51 PM
RE: HP 15C and INT(1/√(1-x),0,1) - JimP - 01-12-2018, 04:18 AM
RE: HP 15C and INT(1/√(1-x),0,1) - tgray - 01-09-2018, 03:42 PM
RE: HP 15C and INT(1/√(1-x),0,1) - Thomas Okken - 01-21-2018 04:46 PM



User(s) browsing this thread: 1 Guest(s)