7.5 VARIOUS RIEMANN SUMS (implemented for TI83) In order to understand Riemann sums, which are sums, one has to understand how a particular programming language does the summation. So the first example shows one possible way of ADDING the first N whole numbers, that is, computes the sum 1+2+3+...+N. Pay attention to the commands. A. Program to add the sum of first N whole numbers PROGRAM SUM :Prompt N :0->S :For(I,1,N) :S+I->S :End :Disp "SUM UP TO N" :Disp S B. Program computing the Left, Mid, Right, Trapezoid, and Simpson Riemann sums (do not introduce what is after the %sign; I wrote those notes as a reminder of what the variables represent; before running the program RIEMANN introduce the function that you want to integrate as Y1 in the "Y=" menu) PROGRAM RIEMANN :Prompt A,B,N :(B-A)/N->H %(H is the length of each subinterval) :0->L %(L will give the left Riemann sum) :0->R %(R will give the right Riemann sum) :0->M %(M will give the mid Riemann sum) :A->X :For(I,1,N) :L+Y1*H->L :X+H/2->X :M+Y1*H->M :X+H/2->X :R+Y1*H->R :End :(L+R)/2->T :(T+2*M)/3->S :Disp "L,M,R,T,S SUMS ARE" :Disp L :Disp M :Disp R :Disp T :Disp S