HP71B Integral Questions
|
02-11-2020, 11:57 PM
Post: #29
|
|||
|
|||
RE: HP71B Integral Questions
Amazingly, Aitken's extrapolation trick work even for the troublesome 1/sqrt(1-x^2)
lua> I=require'integ' lua> function f(x) return 1/sqrt(1-x*x) end lua> u = I.u(f,-1,1) lua> a = I.integ(I.simpson(u,-1,1,0),2^10) -- with bad assumption, T1 = 0 4 2.6032971925091086 3.131182235954578 8 2.876452993708263 3.141072676119944 16 3.009535987413591 3.1415792702305954 32 3.075628788308323 3.1415925017013078 64 3.1086187748017564 3.141592652903347 128 3.1251067205395437 3.1415926535886425 256 3.1333498128442754 3.141592653589793 512 3.1374712489390655 3.141592653589794 1024 3.139531953229666 3.141592653589784 Code: Aitken Extrapolation on Trapezoid numbers As expected, with correct T1 value, trapezoid numbers converge better. lua> I.integ(I.simpson(u,-1,1,2*sqrt(3)),2^10) 4 3.1421574437527586 3.131182235954578 8 3.141606450669424 3.141072676119944 16 3.1415928071550314 3.1415792702305954 32 3.141592654278877 3.1415925017013078 64 3.141592653590944 3.141592652903347 128 3.1415926535897936 3.1415926535886425 256 3.1415926535897936 3.141592653589793 512 3.1415926535897944 3.141592653589794 1024 3.1415926535897887 3.141592653589784 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)