投稿者:しばっち
投稿日:2015年10月28日(水)22時06分14秒
|
|
|
http://mathworld.wolfram.com/DurandsRule.html
http://mathworld.wolfram.com/ShoveltonsRule.html
http://mathworld.wolfram.com/WeddlesRule.html
!'求積法
LET A=1
LET B=2
PRINT BOOLES(A,B)
PRINT DURAND(A,B)
PRINT HARDYS(A,B)
!'PRINT WOOLHOUSE(A,B)
PRINT WOOLHOUSE2(A,B)
PRINT WEDDLE(A,B)
PRINT B^3/3-A^3/3
END
EXTERNAL FUNCTION F(X)
LET F=X^2
END FUNCTION
EXTERNAL FUNCTION BOOLES(A,B)
LET X=A
LET H=(B-A)/4
LET BOOLES=2*H/45*(7*F(X)+32*F(X+H)+12*F(X+2*H)+32*F(X+3*H)+7*F(X+4*H))
END FUNCTION
EXTERNAL FUNCTION DURAND(A,B)
LET X=A
LET H=(B-A)/5
LET DURAND=H*(2/5*F(X)+11/10*F(X+H)+F(X+2*H)+F(X+3*H)+11/10*F(X+4*H)+2/5*F(X+5*H))
END FUNCTION
EXTERNAL FUNCTION HARDYS(A,B)
LET X=A
LET H=(B-A)/6
LET HARDYS=H/100*(28*F(X)+162*F(X+H)+220*F(X+3*H)+162*F(X+5*H)+28*F(X+6*H))
END FUNCTION
EXTERNAL FUNCTION SHOVELTON(A,B)
LET H=(B-A)/10
LET X=A
LET SHOVELTON=5*H/126*(8*(F(X)+F(X+10*H))+35*(F(X+H)+F(X+3*H)+F(X+7*H)+F(X+9*H))+15*(F(X+2*H)+F(X+4*H)+F(X+6*H)+F(X+8*H))+36*F(X+5*H))
END FUNCTION
EXTERNAL FUNCTION WOOLHOUSE(A,B)
LET H=(B-A)/10
LET X=A
LET WOOLHOUSE=5*H*(223/3969*(F(X)+F(X+10*H))+5875/18144*(F(X+H)+F(X+9*H))+4625/10584*(F(X+3*H)+F(X+7*H))+41/112*F(X+4*H))
END FUNCTION
EXTERNAL FUNCTION WOOLHOUSE2(A,B)
LET H=(B-A)/28
LET X=A
LET WOOLHOUSE2=14*H*(7/195*(F(X)+F(X+28*H))+16807/66690*(F(X+2*H)+F(X+26*H))+128/285*(F(X+7*H)+F(X+21*H))+71/135*F(X+14*H))
END FUNCTION
EXTERNAL FUNCTION WEDDLE(A,B)
LET X=A
LET H=(B-A)/6
LET WEDDLE=3*H/10*(F(X)+5*F(X+H)+F(X+2*H)+6*F(X+3*H)+F(X+4*H)+5*F(X+5*H)+F(X+6*H))
END FUNCTION
|
|
|