body main banner  
torso

RIEMANN.8xp

Contributed by: Brendan Chambers '07

Purpose: Estimates definite integrals using Riemann Sums (Left, Middle, and Right)

Download RIEMANN.8xp

Source Code

:ClrHome
:Disp "WHAT IS THE"
:Disp "FUNCTION?"
:Disp "(ENTER WITH"
:Disp "QUOTES)"
:Disp ""
:Input "Y1=",Y1
:Disp ""
:Disp "WHERE DOES THE"
:Disp "FIRST RECTANGLE"
:Disp "START?"
:Prompt S
:Disp ""
:Disp "WHERE DO THE"
:Disp "RECTANGLES END?"
:Prompt E
:Disp ""
:Disp "HOW MANY"
:Disp "RECTANGLES?"
:Prompt N
:((E-S)/N)storeW
:Lbl 0
:Menu("CHOOSE METHOD","LRAM",A,"MRAM",B,"RRAM",C,"END",D)
:Lbl A
:(W)(sum(seq(Y1(WX+S),X,0,(N-1),1)))storeA
:Disp ""
:Output(8,1,"AREA="
:Output(8,6,A)
:Pause
:Goto 0
:Lbl B
:(W)(sum(seq(Y1(WX+S+W/2),X,0,(N-1),1)))storeA
:Disp ""
:Output(8,1,"AREA="
:Output(8,6,A)
:Pause
:Goto 0
:Lbl C
:(W)(sum(seq(Y1(WX+S+W),X,0,(N-1),1)))storeA
:Disp ""
:Output(8,1,"AREA="
:Output(8,6,A)
:Pause
:Goto 0
:Lbl D
:Disp ""
:Disp "BY"
:Disp "BRENDAN CHAMBERS"

Generated by SourceCoder, 2005 Cemetech