Adaptive Simpson and Romberg integration methods
|
03-26-2021, 04:30 PM
Post: #19
|
|||
|
|||
RE: Adaptive Simpson and Romberg integration methods
(03-25-2021 11:57 PM)Valentin Albillo Wrote: Now, as announced above, a few examples from my own suite, I1 to I7, for you to try ... All integrals is hitting the assumption that end-points does not matter. After u-transformation, integrand end-points mean (t1) is still not zero. First 5 can be fixed with *another* round of u-transfomation. ∫(f(x), x=0..1) = ∫(6*u*(1-u)*f(u*u*(3-2*u)), u=0..1) > 10 DEF FNU(U) @ N=N+1 @ FNU=6*U*(1-U)*FNF(U*U*(3-2*U)) @ ENDDEF > 20 N=0 @ DISP INTEGRAL(0,1,P,FNU(IVAR)),N > 1 DEF FNF(X)=COS(X)*LN(X) @ REM I1 = -Si(1) > RADIANS @ P=1E-8 @ RUN -.946083070248 511 > 1 DEF FNF(X)=1/SQRT(X) @ REM I2 = 1/0.5 = 2 > P=1E-10 @ RUN 2 127 > 1 DEF FNF(X)=LN(GAMMA(X)) @ REM I3 = ln(2*pi)/2 >P=1E-9 @ RUN .918938533197 1023 >1 DEF FNF(X)=1/SQRT(-LN(X)) @ REM I4 = sqrt(pi) >P=1E-6 @ RUN 1.77245405564 31 >1 DEF FNF(X)=LN(SIN(X)) @ REM I5 = re(1j/2*Li2(exp(2j)))-ln(2) >P=1E-9 @ RUN -1.05672020598 1023 Last 2 still failed with extra round of u-transformation ... >1 DEF FNF(X)=X^(-0.8) @ REM I6 = 1/0.2 = 5 >P=1E-8 @ RUN 4.99943927847 65535 >1 DEF FNF(X)=X^(-0.99) @ REM I7 = 1/0.01 = 100 >P=1E-7 @ RUN 35.9675524685 65535 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)