RECTANGLES - TI 83

Introduction
This program plots the graph of a function  f(x), draws left or right hand rectangles, and computes the corresponding approximation for $\int\limits_a^bf(x)dx$.
 
If you have not used one of the programs posted on this website before, you should read through the information in the Intro to Programming section first.


If you have a TI Connectivity Cable, you can download the program RECTS.83p


The Program
:Prompt A,B,N,T  {Prompt is in PRGM under I/O}
:ClrDraw  {ClrDraw is in DRAW under Draw}
:DrawF Y1  {DrawF is in DRAW under Draw} {Y1 is in VARS under Y-VARS}
:Pause  {Pause is in PRGM under CTL}
:(B-A)/N$\to$H {The arrow is in STO}
:0$\to$ {The 0 is a zero} 
:1$\to$ {The 1 is a one} 
:Lbl 1  {Lbl is in PRGM under CTL}
:A+(J-1)*H$\to$ {The * is the times sign}
:U+T*H$\to$ {X is the X,T button}
:Line(U,0,U,Y1 {Line is in DRAW under Draw} {The 0 is a zero}
:Line(U,Y1,U+H,Y1
:Line(U+H,Y1,U+H,0)     
:S+H*Y1$\to$
:IS>(J,N)  {IS> is in PRGM under CTL}
:Goto 1  {Goto is in PRGM under CTL}
:Pause 
:Disp "SUM"  {Disp is in PRGM under I/O} { "   is on the + button}
:Disp S 


Running the Program
 
You will need to enter a function f(x) into Y1 before running the program. Change the graphing WINDOW so that the desired portion of the function fills the screen. The program will first ask for values of A, B, and N (number of subdivisions). The value of T determines the type of rectangle to be viewed. T=0 corresponds to left hand rectangles, T=1 corresponds to right hand rectangles. Any value between 0 and 1 can also be used. After plotting the graph, the program will pause. Hit ENTER. The rectangles will be drawn and the program will pause again. Hit ENTER. The value of the approximation will appear.
 
To test the program try the following:
  f(x)  =  x2+ 3,   WINDOW: 0< x <5,  0< y <25,   A=1,   B=4,   N=6,   T=1.
 
You should see a portion of a parabola and 6 right hand rectangles. The numerical answer will be 33.875