# TITLE: Comparison of Integrating Methods # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 8Nov1995, 9850version:15Nov1996, correction 20Oct2006 # MAKE: CASIO # MODEL: cfx-9850G # # Store function to integrate as a function of x into f-memory 'f6'. # Program prompts for 'a' and 'b' the lower and upper bounds of # integration. Then for S - the number of sections to divide # the interval into. The higher the number the more accurate. # The result of the trapesium method, the simpson method and the inbuilt # integrating will be displayed for comparison. # For the simpson rule to work S must be an even number. # integral |optn|f4|f4| # # Frac |optn|f6|f4|f3| @@ Program "CMPARINT" 0->A~Z "A"?->A:"B":?->B "S"?->S:(B-A)/S->H A->X:f6->T:T->U Lbl 1 X+H->X C=S-1=>Goto 2 1-Frac (C/2)->W T+4Wf6->T U+2f6->U Isz C:Goto 1 Lbl 2 "T":H(U+f6)/2_ "S":H(T+f6)/3_ "I":integral(f6,A,B