 ## Programas de calculadora gráfica para Cálculo Aplicado al Mundo RealIntegración númerica: Aproximaciones Trapezoide y Simpson

Texto en Integración Númerica
Índice de Temas en Línea
Página Principal
Everything for Calculus Graphing Calculator Program to Compute Left- and Right-Hand Riemann Sums and Trapezoid Rule (TI-83)

 PROGRAM: TRAP :Input ("N? ",N) Prompts for the number of rectangles :Input ("LEFT ENDPOINT? ",A) Prompts for the left end-point a :Input ("RIGHT ENDPOINT? ",B) Prompts for the right end-point b :(B-A)/N D D is x = (b-a)/n : 0 R Set R to 0 (zero); it will eventually be the right-hand sum : 0 L Set L to 0 (zero); it will eventually be the left-hand sum :A X X is the current x-coordinate :For (I,1,N) Start of a loop-recall the sigma notation :L+Y1 L Increment L by the by f(xi-1) :A+I*D X Corresponds to our formula xi = a + i x :R+Y1 R Increment R by f(xi) :End End of loop :L*D L Left sum :R*D R Right sum :(L+R)/2 T Trapezoidal sum :Disp "LEFT SUM IS ",L :Disp "RIGHT SUM IS ",R :Disp "TRAP SUM IS ",T :Stop

Graphing Calculator Program for Simpson's Rule (TI-83)

 PROGRAM: SIMP :Input ("EVEN NUMBER Nģ2? ",N) Make sure that N is even and at least 2 :Input ("LEFT ENDPOINT? ",A) :Input ("RIGHT ENDPOINT? ",B) :(B-A)/N D :0 S Set S to 0 (zero) :A X :For (I,1,N-1,2) The loop increments I in by 2 each time :S+Y1 S The next four steps compute the sum :A+I*D X f(xi-1) + 4f(xi) + f(xi+1) :S+4* Y1 S :X+D X :S+Y1 S :End :S*D/3 S Multiply by x/3 :Disp "SIMPSON SUM IS ",S :Stop

Using the Programs

First enter the function f(x) whose sums you wish to compute as Y1 in the "Y=" window. Then run the program. It will first ask for N, which is the number of partitions you wish to use. Enter the number (which must be at least 1) and then press ENTER. (If you are running SIMP, make sure that the number you enter is even.) Next, it will ask for the values of A and B in that order, so you enter them in the same way. Then wait a while (the larger N is, the longer the wait), and the answers will appear.