You are on page 1of 3

Numerical Integration for the TI 89 and TI 92 The programming lines you will be entering appear later in this handout

you will need to look at them as you go through these steps. To enter a program press APPS, program editor, choose new, and in the new menu appears in the variable box give your program a name, say numint. Press enter twice.

Arrow down below the line that says Prgm

Now begin entering the program. ( I will give some detail for a few lines and then leave more of it to you). Type in y1(x) press STO and y. Press enter to get to the next line. The arrow symbol is obtained by using the sto key ClrIO is found under CATALOG and under the cs, move the arrow next to ClrIO and press enter. Press enter again.

The DelVar command is in the CATALOG in the Ds. Move the arrow next to it and press Enter. the letters x and t can be found on a key dedicated to them. To get the other letters, you will need to press alpha and the key with the letter above it. Put them all in and press Enter. [ Notice that they are using a L in The program when you really enter a small l in your program (it is hard to tell an l (L)from a 1 (one)).] Access the input command by pressing F3 and 3 for Input, then use the alpha mode to type in the rest of the line, the quotation marks need to be entered also. Press enter to move to the next line Continue in this way When you get to the line where you have to enter a While EndWhile command, You access this command under F2 and number 5. You will have to press Enter after the While line to add the lines that follow. When you get to the EndWhile line, use your

arrow key to move to the end of the line and press Enter to create a new line after this one. The Pause command can be found under F2, and transfer. Or go to the catalog and find it in the ps. To get out of the program mode you can hit 2nd quit, or go to the home screen. When you are done typing in the program, try running it. You will need to enter your function in the y1(x) position using the y = menu. You can access your program either by typing in the name: So if the name is numint you enter on the command line: numint(), then press enter to begin the program. Or you can go to VAR-LINK and arrow down until you see the program name and press enter. Here is the actual Program and some notes Functions in your catalog are printed in red. The arrow symbol () is in your catalog, but is also the STO button on the keyboard. Similarly, double quotes (") is a catalog symbol, but is also on your keyboard. The TI-89 will convert upper case letters to lower case; The letter "L" is shown as upper case only to distinguish it from the number "1". To run the program, type "newint()" into your home window, then hit the "ENTER" key on the keyboard.

newint() Prgm y1(x)y Clr IO


DelVar a,b,n,x,t,h,m,L,j

Input "lower = ", a Input "upper = ",b Input "number of intervals = ", n (b-a)/(2*n)h 0L 0m 1j ax While j<n+1 L+y1(x)L x+hx m+y1(x)m x+hx j+1j

EndWhile 2*L*hL Disp "Left Sum = ", approx(L) L+2*h*y1(x)t ax t 2*h*y1(x)R Disp "Right Sum = ", approx(R) (L+R)/2t Disp "Trapezoid Sum = ", approx(t) Pause 2*h*mm Disp "Midpoint Sum =", approx(m) (2*m+t)/3s Disp "Simpsons Rule = ", approx(s)
DelVar a,b,n,x,t,h,m,L,j

EndPrgm
Try this integral to check your program.

x dx .
3 2

So enter x3 at the y1 position and start your program, enter the upper and lower limits of integration at the prompts. Let n = 10. After you look at these values, press enter to get past the pause to see the results from Simpsons rule as well.

You can hit escape to return to the home screen. If your program has errors you can go to APPS, Program Editor and choose Current. Then go in and make any necessary changes.

You might also like