TI83 Calculator Programs for Numerical Analysis Problems - Part 1

These programs are copyrighted (1997-2007), but you may copy them for instructional purposes as long as no profit is made from their use. **The author is not responsible for any data loss which may be caused to any calculator or its memory by the use of these programs.**

The following are TI-83 calculator programs for the solution of numerical analysis problems of a type which are usually found in college courses or textbooks in numerical analysis. These programs are also suitable, with minor modifications, for use in other TI calculators, such as the TI82, TI85, TI86, TI89, TI92, etc... . (The easier programs could be used, with minor modifications, in a TI81 calculator.) These TI-83 programs, together with their descriptions, will probably be read more easily by students who are either taking a course in numerical analysis, or who have already taken a course in numerical analysis. (__Click here__ for comments concerning calculators other than the TI83.)

Comments and questions concerning these programs may be addressed to Gerald Roskes, Department of Mathematics, Queens College, Flushing, New York 11367, or send email to __gerald_roskes@qc.edu__.

This web page will be continually expanding as we add more programs to our list. If you have an interest in calculator programs for numerical analysis, you should view our page every few months. (This web page was last updated in December, 2007.)

The following are links to the various TI83 programs:

__Part 1 (Programs 1 - 23)__

__Prog1__ SIMPITER (Simple Iteration)

__Prog2__ BISECT (Bisection Method)

__Prog3__ SECANT (Secant Method)

__Prog4__ STEFFEN (Steffensen's Method)

__Prog5__ AITKEN (Aitken's Delta^{2} Method)

__Prog6__ HORNER (Horner's Method)

__Prog7__ FALSEPOS (False Position Method)

__Prog8__ MULLER (Muller's Method)

__Prog9__ SYSITER2 (Iteration for 2 x 2 Systems)

__Prog10__ SYSNEWT2 (Newton Iteration for 2 x 2 Systems)

__Prog11__ JACOBI (Jacobi Iteration)

__Prog12__ GSEIDEL (Gauss-Seidel Iteration)

__Prog13__ SOR (Successive Over-Relaxation)

__Prog14__ SCLPWR (Scaled Power Method)

__Prog15__ WDEFLATE (Wielandt Deflation)

__Prog16__ INTERPN (N-Point Interpolation)

__Prog17__ INTERP2 (2-Point Interpolation)

__Prog18__ INTERP3 (3-Point Interpolation)

__Prog19__ INTERP4 (4-Point Interpolation)

__Prog20__ INTERP5 (5-Point Interpolation)

__Prog21__ NEVILLE (Neville's Method)

__Prog22__ NEWTDIV (Newton's Divided Difference Method)

__Prog23__ LAGRANGE (Lagrange Interpolation Polynomial)

__Part 2____ (Programs 24 - 42)__

__Prog24__ HERMITEN (N Point Hermite Interpolation)

__Prog25__ HERMITDD (Hermite Divided Difference Method)

__Prog26__ HERMITLA (Hermite-Lagrange Interpolating Polynomial)

__Prog27__ DERIV2PT (Derivative 2-Point Approximation)

__Prog28__ DERIV3PT (Derivative 3-Point Approximation)

__Prog29__ DERIV5PT (Derivative 5-Point Approximation)

__Prog30__ DDER3PT (Double Derivative 3-Point Approximation)

__Prog31__ NEWFORDF (Newton's Forward Difference Method)

__Prog32__ INEWCOTE (Newton-Cotes Integration Method

__Prog33__ ICOMTRAP (Composite Trapezoid Rule)

__Prog34__ ICOMMIDP (Composite Midpoint Rule)

__Prog35__ ICOMSIMP (Composite Simpson Rule)

__Prog36__ IROMBERG (Romberg Integration)

__Prog37__ IGAUSS (Gauss Quadrature Method)

__Prog38__ IGAUSSAB (Gaussian Quadrature Method on [a,b])

__Prog39__ IGAUSAB2 (Gauss 2 Point Quadrature on [a,b])

__Prog40__ IGAUSAB3 (Gauss 3 Point Quadrature on [a,b])

__Prog41__ IGAUSAB4 (Gauss 4 Point Quadrature on [a,b])

__Prog42__ IGAUSAB5 (Gauss 5 Point Quadrature on [a,b])

__Part 3____ (Programs 43 - 52)__

Prog43 DEEULER (Euler's Method)

Prog44 DETAYLR2 (Taylor Method, Order 2)

Prog45 DETAYLR4 (Taylor Method, Order 4)

Prog46 DEMIDPT (DE Midpoint Method)

Prog47 DEMODEUL (DE Modified Euler Method)

Prog48 DEHEUN (DE Heun's Method)

Prog49 DERK4 (DE Runge Kutta 4th Order Method)

Prog50 DEBASH2 (Adams Bashforth 2 Step)

Prog51 DEMOULT2 (Adams Moulton 2 Step)

Prog52 DEPCB2M2 (Bashforth 2 Step Predictor, Moulton 2 Step Corrector)

__Part 4____ (Programs 53 - 70)__

Prog53 DEBASH3 (Adams Bashforth 3 Step)

Prog54 DEMOULT3 (Adams Moulton 3 Step)

Prog55 DEPCB4M3 (Bashforth 4 Step Predictor, Moulton 3 Step Corrector)

Prog56 DERKV6 (DE Runge Kutta Verner 6th Order Method)

Prog57 LSPOLY1D (Least Squares Linear Polynomial (Discrete Data))

Prog58 LSPOLY2D (Least Squares Quadratic Polynomial (Discrete Data))

Prog59 LSPOLY3D (Least Squares Cubic Polynomial (Discrete Data))

Prog60 LSPOLY4D (Least Squares Quartic Polynomial (Discrete Data))

Prog61 LSEXPD (Least Squares Exponential Function (Discrete Data))

Prog62 LSPOLY1C (Least Squares Linear Polynomial (Continuous Data))

Prog63 LSPOLY2C (Least Squares Quadratic Polynomial (Continuous Data))

Prog64 LSPOLY3C (Least Squares Cubic Polynomial (Continuous Data))

Prog65 LSPOLY4C (Least Squares Quartic Polynomial (Continuous Data))

Prog66 LSLEGNDR (Least Squares Legendre Polynomials ( Degrees 0-5, [ -1 , 1 ] ) )

Prog67 LSLGDRAB (Least Squares Legendre Polynomials ( Degrees 0-5, [ a , b ] ) )

Prog68 SYSNEWT3 (Newton Iteration for 3 x 3 Systems)

Prog69 ECONOMIZ (Chebyshev Economization, (Degrees 0-8, [ -1 , 1 ] ) )

Prog70 ECONOMAB (Chebyshev Economization, (Degrees 0-8, [ a , b ] ) )

__Part 5____ (Programs 71 - 86)__

Prog71 OPTINTP2 (Optimal Interolation, 2 Points)

Prog72 OPTINTP3 (Optimal Interolation, 3 Points)

Prog73 OPTINTP4 (Optimal Interolation, 4 Points)

Prog74 OPTINTP5 (Optimal Interolation, 5 Points)

Prog75 LSCHEBYS (Least Squares Chebyshev Polynomials, (Degrees 0-3, [ -1 , 1 ] ) )

Prog76 LSCHEBAB (Least Squares Chebyshev Polynomials, (Degrees 0-3, [ a , b ] ) )

Prog77 NEWTON (Newton Iteration with Test)

Prog78 MODNEWT (Modified Newton Method)

Prog79 UNSCLPWR (Unscaled Power Method)

Prog80 BEZIER (Bezier Curve, 2 Points)

Prog81 LSTRCN2 (LS Trig Curve , Continuous Data , Case N=2)

Prog82 LSTRCN3 (LS Trig Curve , Continuous Data , Case N=3)

Prog83 LSTRDN2 (LS Trig Curve , Discrete Data , Case N=2 , M > 2)

Prog84 LSTRDN3 (LS Trig Curve , Discrete Data , Case N=3 , M > 3)

Prog85 LSTRIN2 (LS Trig Interpolation Curve , Case N=2)

Prog86 LSTRIN2 (LS Trig Interpolation Curve , Case N=3)

Prog87 SYSITER3 (Iteration for 3 x 3 Systems)

Prog88 SYSGS2 (Gauss-Seidel for 2 x 2 Nonlinear Systems)

Prog89 SYSGS3 (Gauss-Seidel for 3 x 3 Nonlinear Systems)

-------------------------------------------------------------------------

**Program #1**** SIMPITER (Simple Iteration)**

This is our shortest and simplest program. It has only one instruction. The iteration is X_{n+1} = f ( X_{n} ) . Before executing the program, the function f(X) is stored in the function variable Y_{1} , and the initial value X_{0} is stored in the variable X. Next, execute the program. After the program is executed, keep pressing ENTER. The iterates will appear on the home screen.

In order to enter the term "Y_{1}" into the program, press [VARS], [right arrow], [ENTER], [ENTER]. Notice that we do not use the "Stop" or "Return" instruction as a second instruction. These instructions would not display any result on the home screen. Also, we do not put any blank lines into the program after instruction#1, as this would cause the calculator to display only the message "Done" on the home screen, and nothing more.

Instruction #1_____Y_{1} -> X..........(Note: We use the symbol "->" to

...............................................................represent the operation "Store".)

The following is a program that displays 5 iterates with each push of the ENTER button. Before executing the program, put f(X) into Y_{1}, and put X_{0} into X. Then execute the program. Keep pressing ENTER.

Instruction#1_____Disp "X ITERATES ARE"

Instruction#2_____For(I,1,4)

Instruction#3_____Y_{1} -> X

Instruction#4_____Disp X

Instruction#5_____End

Instruction#6_____Y_{1} -> X

__Back to Menu__

-------------------------------------------------------------------------

**Program #2**** BISECT (Bisection Method)**

Let f(X) be defined on [a,b]. We require that f(X) be continuous, and that the product f(a)*f(b) is negative. Then f(X) has at least one zero in the interval [a,b]. The bisection method will converge to one of these zeroes. This program will compute and display the iterates in the bisection method. Before executing the program, the numbers a and b are stored in the variables A and B respectively, and the function f(X) is stored in Y_{1}. Next, execute the program. The program computes the midpoint X = (A+B)/2 (instruction #3) and displays A,B,X, f(X). If f(B)*f(X) is positive (so that f(B) and f(X) are of the same sign), then B is replaced by the midpoint X (instruction 8). Otherwise, A is replaced by the midpoint. After executing the program, keep pressing ENTER. The iterates will appear on the home screen.

Instruction #1_____B -> X..........(Note: We use the symbol "->" to

Instruction #2_____Y_{1} -> D.........represent the operation "Store".)

Instruction #3_____(A+B)/2 -> X

Instruction #4_____Y_{1} -> Q

Instruction #5_____Disp A,B,X,Q

Instruction #6_____If D*Q > 0

Instruction #7_____Then

Instruction #8_____X -> B

Instruction #9_____Else

Instruction #10____X -> A

Instruction #11____End

__Back to Menu__

-------------------------------------------------------------------------

**Program #3**** SECANT (Secant Method)**

In the secant method, we start with a function f(X), and two values X_{0}, X_{1} close to a zero of f(X). (The values X_{0} and X_{1} should be different.) The points (X_{0},f(X_{0})) and (X_{1},f(X_{1}))determine a line. In general, this line will intersect the X-axis. The point of intersection with the X-axis determines X_{2}. The values X_{1},X_{2} are then used to update the values X_{0}, X_{1}, and the process is repeated.

Before executing the program, we store X_{0} in the variable A, X_{1} in the variable B, and f(X) in the function variable Y_{1}. Next, execute the program. When the program is executed, the values of f(X_{0}) and f(X_{1}) are stored in the variables C and D (see instructions #2 and #4). The value of X_{2} is computed from X_{2} = X_{1} - f(X_{1})*(X_{1} - X_{0}) / (f(X_{1}) - f(X_{0})) (see instruction #6).

In general, we get rapid convergence to a zero of f(X). In this case, the program will eventually encounter a zero denominator in instruction #6 when, to machine accuracy, f(X_{1}) = f(X_{2}) = 0. We test for the condition that f(X_{1}) = f(X_{2}) in instruction#5. If this condition is satisfied, then X_{2} is left equal to X_{1} (from instruction #3). (In this case, one should further check that f(X_{1}) = 0 to be sure that we have convergence to a zero of f(X).)

When the program is executed, X_{2} is displayed (from instruction #8), and X_{0}, X_{1} are updated (instructions #7,8). After execution, keep pressing ENTER. The iterates appear on the home screen.

_{
}(Our last instruction #8 produces a result (namely, X_{2}) which is also displayed on the home screen. Notice that we do not use the "Stop" or "Return" instruction as our last instruction. These instructions would not display any result on the home screen.)

Instruction #1_____A -> X..........(Note: We use the symbol "->" to

Instruction #2_____Y_{1} -> C.........represent the operation "Store".)

Instruction #3_____B -> X

Instruction #4_____Y_{1} -> D

Instruction #5_____If D - C != 0____________(See note below.)

Instruction #6_____B - D(B - A) / (D - C) -> X

Instruction #7_____B -> A

Instruction #8_____X -> B

Note that in instruction#5, we are using the symbol != to represent "not equal". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

__Back to Menu__

-------------------------------------------------------------------------

**Program #4**** STEFFEN (Steffensen's Method)**

We assume we have an iteration equation X = g(X) and a value X_{0} near a fixed point of g(X). If we set A = X_{0}, B = g(A), C = g(B), then Steffensen's method computes X_{1} from Aitken's equation: X_{1} = A - (B -A)^{2} / (C - 2 B + A). The number X_{1} is used to update X_{0}, and the process is repeated. In general, Steffensen's method will converge quadratically to a solution of X = g(X), even though the equation X = g(X) produces linearly convergent, or even divergent, iterates.

Before executing the program, we store X_{0} in the variable X, and the function g(X) in the function variable Y_{1}. The program is then executed, and will display A, B, C, and X_{1} (see instruction#6). The program also updates X_{0} with X_{1}. Because of convergence, we will eventually obtain values for A, B, C which are all equal to X_{0} (to machine accuracy). This will create a zero denominator in Aitken's equation. If the denominator in Aitken's equation vanishes (see instruction#4), then X_{1} is left equal to X_{0}.

After executing the program, keep pressing ENTER. The Steffensen iterates (for A, B, C, X_{1}) will appear on the home screen.

Instruction #1_____X -> A..........(Note: We use the symbol "->" to

Instruction #2_____Y_{1} -> B.........represent the operation "Store".)

Instruction #3_____Y_{1}(B) -> C

Instruction #4_____If C - 2 B + A != 0____________(See note below.)

Instruction #5_____X - ( B - A )^{2} / ( C - 2 B + A ) -> X

Instruction #6_____Disp A,B,C,X

Note that in instruction#4, we are using the symbol != to represent "not equal". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

__Back to Menu__

-------------------------------------------------------------------------

**Program #5**** AITKEN (Aitken's Delta ^{2} Method)**

We assume {X

Before executing our program, we store X

After executing the program, keep pressing ENTER. The X and Z iterates will be displayed on the home screen.

Since X

Instruction #1_____X -> A..........(Note: We use the symbol "->" to

Instruction #2_____Y

Instruction #3_____Y

Instruction #4_____If C - 2 B + A != 0____________(See note below.)

Instruction #5_____X - ( B - A )

Instruction #6_____B -> X

Instruction #7_____Disp A,Z

Note that in instruction#4, we are using the symbol != to represent "not equal". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

-------------------------------------------------------------------------

In Horner's method, we assume we have a polynomial of degree n given by P(X) = a

Before executing our program, we first put X

Instruction #1_____dim(L

Instruction #2_____N + 1 -> dim(L

Instruction #3_____N + 1 -> dim(L

Instruction #4_____L

Instruction #5_____L

Instruction #6_____For(I,1,N)

Instruction #7_____X L

Instruction #8_____X L

Instruction #9_____End

Instruction #10____X - L

Instruction #11____X -> L

Instruction #12____List>matr(L

Instruction #13____[A]

Note: Use the MATRIX menu to enter the matrix name [A] onto a program line. Do not type the characters "[" , "A" , "]" separately.

-------------------------------------------------------------------------

Let f(X) be defined on [a,b]. We require that f(X) be continuous, and that the product f(a)*f(b) is negative. Then f(X) has at least one zero in the interval [a,b]. The false position method will converge to one of these zeroes. This program will compute and display the iterates in the false position method.

Before executing the program, the numbers a and b are stored in the variables A and B respectively, and the function f(X) is stored in Y

Instruction#1_____A -> X..........(Note: We use the symbol "->" to

Instruction#2_____Y

Instruction#3_____B -> X

Instruction#4_____Y

Instruction#5_____B - D ( B - A ) / ( D - C ) -> X

Instruction#6_____Y

Instruction#7_____Disp A,B,X,Q

Instruction#8_____If D * Q > 0

Instruction#9_____Then

Instruction#10____X -> B

Instruction#11____Else

Instruction#12____X -> A

Instruction#13____End

-------------------------------------------------------------------------

Muller's method is used to determine a zero of a polynomial f(X). The iteration starts with three distinct approximations X0,X1,X2 to a zero of f(X). The three data points (X0,f(X0)), (X1,f(X1)), (X2,f(X2)) are used to determine a parabola P(X). The zero X* of the parabola which is closest to X2 is used as the next approximation to the zero of f(X). The values of X0,X1,X2 are updated with the values of X1,X2,X* respectively, and the process is repeated.

In order to reduce roundoff error, the parabola P(X) is written as P(X) = a(X-X2)^2 + b(X-X2) + c . (That is, we "center" the computation at X2.) The three data points determine three equations for a,b,c :

a(X0-X2)^2 + b(X0-X2) + c = f(X0) ,

a(X1-X2)^2 + b(X1-X2) + c = f(X1) ,

c = f(X2) .

Since the TI83 does not support matrices with complex entries, we solve for a,b,c using Cramer's rule. Thus,

a = [(X1-X2)(f(X0)-f(X2)) - (X0-X2)(f(X1)-f(X2))] / [(X0-X2)(X1-X2)(X0-X1)] ,

b = [((X0-X2)^2)(f(X1)-f(X2)) - ((X1-X2)^2)(f(X0)-f(X2))] / [(X0-X2)(X1-X2)(X0-X1)] ,

c = f(X2) .

The zeroes of P(X) are given by the quadratic formula as

X2 + (-b + (b^2 - 4ac)^.5) / (2a) , and

X2 + (-b - (b^2 - 4ac)^.5) / (2a) .

The one closest to X2 is used as X*.

Before executing the program, the valuse of X0,X1,X2 are placed into the variables D,E,F respectively. The polynomial f(X) is placed into Y1. The program computes f(X0),f(X1),f(X2) and stores these values into the variables G,H,I respectively (see instructions#1,2,3). Instruction#4 replaces (temporarily) the contents of D,E with (X0-X2) and (X1-X2) in order to prepare for Cramer's rule. The values of a,b,c are stored into A,B,C respectively (see instructions#14,15,16). The value of X* is computed (see instructions#17,18,28,29,30,31,32) and placed into the variable X. Finally the variables D,E are restored to their original values (instruction#34), and an output matrix [A] is set up (instructions#35,36,37). The values for X0,X1,X2 are updated (instruction#38), and the matrix [A] is displayed (instruction#39). In the output matrix [A], columns 1 and 2 contain the real and imaginary parts of X0,X1,X2,X*. Columns 3 and 4 contain the real and imaginary parts of the corresponding function values from the polynomial f(X).

The program checks for some unlikely events:

1. If either X0,X1 or X2 is a zero of f(X), a message is displayed (see instructions#5,6,7,8). The data is also displayed.

2. If X0=X1 or X1=X2 or X0=X2, a message is displayed (see instructions# 9,10,11,12). The data is also displayed. In this case, new and distinct values for X0,X1,X2 should be chosen, and the program restarted.

3. If the data points are on a horizontal line, a message is displayed (see instructions#19,20,21,22,23). In this case, the program stops, and new values for X0,X1,X2 should be chosen.

4. If the data is on an oblique line, a message is displayed, and the program continues (see instructions#24,25,26,27). X* is computed as the intersection point of the line with the X-axis.

As mentioned above, the values of X0,X1,X2 are placed into the variables D,E,F before executing the program. Also, MODE should be set to complex (this setting is "a+bi" in the MODE menu.) After executing the program, keep pressing ENTER. The iterates will appear on the home screen. (You may need to scroll through the output matrix [A] on the home screen.) In general, convergence is rapid.

(See also the short version of Muller's program toward the end of this section.)

Instruction#1_____D -> X : Y

Instruction#2_____E -> X : Y

Instruction#3_____F -> X : Y

Instruction#4_____D - F -> D : E - F -> E

Instruction#5_____If abs(GHI) = 0

Instruction#6_____Then : Disp "ZERO APPEARS IN" : Disp "FOLLOWING TABLE"

Instruction#7_____Go to 1

Instruction#8_____End

Instruction#9_____( D - E ) D E -> J

Instruction#10____If abs ( J ) = 0 : Then

Instruction#11____Disp "DOUBLE X VALUES"

Instruction#12____Go to 1

Instruction#13____End

Instruction#14____(D(I-H)+E(G-I)) / J -> A

Instruction#15____(D

Instruction#16____I -> C

Instruction#17____(B

Instruction#18____2A -> T

Instruction#19____If abs(A)=0 and abs(B)=0

Instruction#20____Then

Instruction#21____Disp "HORIZ LINE" : Disp "CHANGE DATA"

Instruction#22____D + F -> D : E + F -> E

Instruction#23____Stop : End

Instruction#24____If abs(A)=0 and abs(B) !=0_________(See note below)

Instruction#25____Then : F - C / B -> X

Instruction#26____Disp "OBLIQUE LINE"

Instruction#27____Go to 1 : End

Instruction#28____( (-) B + S ) / T -> K

Instruction#29____( (-) B - S ) / T -> L

Instruction#30____If abs(K) <= abs(L)_________(See note below)

Instruction#31____Then : F + K -> X

Instruction#32____Else : F + L -> X : End

Instruction#33____Lbl 1

Instruction#34____D + F -> D : E + F -> E

Instruction#35____{ D, E, F, X } -> L

Instruction#36____{ G, H, I, Y

Instruction#37____List>matr ( real (L

Instruction#38____E -> D : F -> E : X -> F

Instruction#39____[A].................................................(See note below.)

Note that in instruction#24, we are using the symbol != to represent "not equal". When entering this program into the TI83, one should use the more standard symbol from the TEST menu. Also, in instruction#30, we are using the symbol <= to represent "less than or equal to". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

For instructions#37,39, use the MATRIX menu to enter the matrix name [A] onto the program lines. Do not type the characters "[" , "A" , "]" separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

After executing the short version, keep pressing ENTER. The iterates will appear on the home screen. The program will stop when it encounters a zero denominator. This usually happens after the iterates have converged to machine accuracy.

Instruction#1_____D -> X : Y

Instruction#2_____E -> X : Y

Instruction#3_____F -> X : Y

Instruction#4_____D - F -> D : E - F -> E

Instruction#5_____( D - E ) D E -> J

Instruction#6_____(D(I-H)+E(G-I)) / J -> A

Instruction#7_____(D

Instruction#8_____I -> C

Instruction#9_____(B

Instruction#10____2A -> T

Instruction#11____( (-) B + S ) / T -> K

Instruction#12____( (-) B - S ) / T -> L

Instruction#13____If abs(K) <= abs(L)_________(See note below)

Instruction#14____Then : F + K -> X

Instruction#15____Else : F + L -> X : End

Instruction#16____E + F -> D : F -> E : X -> F : Y

Instruction#17____List>matr( {real (F) , imag (F) , real (I) , imag (I)} , [A] )

Instruction#18____[A]........................(See note below.)

Note that in instruction#13, we are using the symbol <= to represent "less than or equal to". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

For instructions#17,18, use the MATRIX menu to enter the matrix name [A] onto the program lines. Do not type the characters "[" , "A" , "]" separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

This program solves the system X = f

Before executing the program, the function f

After executing the program, keep pressing ENTER. The iterates will appear on the home screen.

Instruction#1_____Y

Instruction#2_____Y

Instruction#3_____W -> X

Instruction#4_____Disp X,Z

-------------------------------------------------------------------------

This program solves the system f

Before executing the program, we store f

After executing the program, keep pressing ENTER. The iterates will appear on the home screen. In general, convergence is quadratic to machine accuracy.

Instruction#1_____{2,2} -> dim([A])..........(Note: We use the symbol "->" to

Instruction#2_____{2,1} -> dim([B])...........represent the operation "Store".)

Instruction#3_____Y

Instruction#4_____Y

Instruction#5_____Nderiv(Y

Instruction#6_____Nderiv(Y

Instruction#7_____Nderiv(Y

Instruction#8_____Nderiv(Y

Instruction#9_____[A]

Instruction#10____X - [C](1,1) -> X

Instruction#11____Z - [C](2,1) -> Z

Instruction#12____Matr>list([A], L

Instruction#13____Matr>list([A]

Instruction#14____List>matr( {X , Z} , L

Instruction#15____[D]

Note: Use the MATRIX menu to enter the matrix names [A] ,[B], etc... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

(Note: To obtain a display of output which includes the

vectors

the instruction: augment ( augment ( [D] , [B] ) , [C] ) -> [D] . )

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

Jacobi iteration is a method for solving a linear system of equations Ax = b , where A is an n by n matrix. In matrix form, Jacobi iteration may be described as follows:

We "split" the matrix A into D - L - U, where D is a diagonal matrix with D

Before executing the program, we store the matrix A into the matrix vaiable [A]. The vector b is stored into the n by 1 "column matrix" [B], and the initial iterate x

Since we need to compute the matrix T

The program will next compute x

After executing the program, keep pressing [ENTER]. The iterates will appear on the home screen. In general, convergence is linear.

(Note: The above matrix description of Jacobi iteration is, in general, suitable for solving small size textbook problems. For large sparse systems, it is generally more efficient computationally to use the "equation by equation" algorithm for Jacobi iteration, as described in most textbooks on numerical analysis.)

Instruction#1_____If [A](1,1) = 0..........(See note at.end of program.)

Instruction#2_____Go to 1

Instruction#3_____dim([A]) -> L

Instruction#4_____L

Instruction#5_____Fill(0,[D])

Instruction#6_____L

Instruction#7_____For(I,1,N)

Instruction#8_____[A](I,I) -> [D](I,I)

Instruction#9_____End

Instruction#10____[D] - [A] -> [E]

Instruction#11____[D]

Instruction#12____[D]

Instruction#13____[A](1,1) -> S

Instruction#14____0 -> [A](1,1)

Instruction#15____Lbl 1

Instruction#16____[F][C] + [G] -> [H]

Instruction#17____[H] - [C] -> [I]

Instruction#18____[H] -> [C]

Instruction#19____augment([H],[I]) -> [J]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

Gauss-Seidel iteration (Seidel iteration for short) is a method for solving a linear system of equations Ax = b , where A is an n by n matrix. In matrix form, Seidel iteration may be described as follows:

We "split" the matrix A into D - L - U, where D is a diagonal matrix with D

Before executing the program, we store the matrix A into the matrix vaiable [A]. The vector b is stored into the n by 1 "column matrix" [B], and the initial iterate x

Since we need to compute the matrix T

The program will next compute x

After executing the program, keep pressing [ENTER]. The iterates will appear on the home screen. In general, convergence is linear.

(Note: The above matrix description of Seidel iteration is, in general, suitable for solving small size textbook problems. For large sparse systems, it is generally more efficient computationally to use the "equation by equation" algorithm for Seidel iteration, as described in most textbooks on numerical analysis.)

Instruction#1_____If [A](1,1) = 0.............(See note at end of program.)

Instruction#2_____Go to 1

Instruction#3_____dim([A]) -> L

Instruction#4_____L

Instruction#5_____Fill(0,[D])

Instruction#6_____L

Instruction#7_____For(I,1,N)

Instruction#8_____For(J,1,I)

Instruction#9_____[A](I,J) -> [D](I,J)

Instruction#10____End

Instruction#11____End

Instruction#12____[D] - [A] -> [E]

Instruction#13____[D]

Instruction#14____[D]

Instruction#15____[A](1,1) -> S

Instruction#16____0 -> [A](1,1)

Instruction#17____Lbl 1

Instruction#18____[F][C] + [G] -> [H]

Instruction#19____[H] - [C] -> [I]

Instruction#20____[H] -> [C]

Instruction#21____augment([H],[I]) -> [J]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

Successive over-relaxation iteration (SOR iteration for short) is a method for solving a linear system of equations Ax = b , where A is an n by n matrix. In matrix form, SOR iteration may be described as follows:

We "split" the matrix A into D - L - U, where D is a diagonal matrix with D

Before executing the program, we store the matrix A into the matrix vaiable [A]. The vector b is stored into the n by 1 "column matrix" [B], and the initial iterate x

Since we need to compute the matrix T

The program will next compute x

After executing the program, keep pressing [ENTER]. The iterates will appear on the home screen. In general, convergence is linear.

(Note: The above matrix description of SOR iteration is, in general, suitable for solving small size textbook problems. For large sparse systems, it is generally more efficient computationally to use the "equation by equation" algorithm for SOR iteration, as described in most textbooks on numerical analysis.)

Instruction#1_____If [A](1,1) = 0...........(See note at end of program.)

Instruction#2_____Go to 1

Instruction#3_____dim([A]) -> L

Instruction#4_____L

Instruction#5_____Fill(0,[D])

Instruction#6_____[D] -> [E]

Instruction#7_____L

Instruction#8_____For(I,1,N)

Instruction#9_____[A](I,I) -> [D](I,I)

Instruction#10____For(J,1,I)

Instruction#11____[A](I,J) -> [E](I,J)

Instruction#12____End

Instruction#13____End

Instruction#14____[E] - [A] -> [F]

Instruction#15____[D] - [E] -> [E]

Instruction#16____( [D] - W [E] )

Instruction#17____( [J] )( ( 1-W ) [D] + W [F] ) -> [G]

Instruction#18____( W [J] )( [B] ) -> [H]

Instruction#19____[A](1,1) -> S

Instruction#20____0 -> [A](1,1)

Instruction#21____Lbl 1

Instruction#22____[G][C] + [H] -> [I]

Instruction#23____[I] - [C] -> [J]

Instruction#24____[I] -> [C]

Instruction#25____augment([I],[J]) -> [J]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

Let A be an n by n real matrix. We assume there is a unique dominant eigenvalue k

Let x

Now assume that x

Before executing the program, we store the matrix A into the matrix variable [A]. The vector x

The vector x

After executing the program, keep pressing [ENTER]. The iterates for x

Instruction#1_____dim([A]) -> L

Instruction#2_____L

Instruction#3_____abs([B]) -> [C].............represent the operation "Store".)

Instruction#4_____[C](1,1) -> X

Instruction#5_____1 -> P

Instruction#6_____For ( I , 2 , N )

Instruction#7_____If ( [C](I,1) - X ) > 0

Instruction#8_____Then

Instruction#9_____I -> P

Instruction#10____[C](P,1) -> X

Instruction#11____End

Instruction#12____End

Instruction#13____[B](P,1) -> X

Instruction#14____X

Instruction#15____Matr>list([B],L

Instruction#16____[A][B] -> [B]

Instruction#17____Matr>list([B],L

Instruction#18____N -> dim(L

Instruction#19____Fill(0,L

Instruction#20____[B](P,1) -> L

Instruction#21____List>matr(L

Instruction#22____[C]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

We assume A is an n by n matrix with distinct eigenvalues k

We make the simplifying assumption for Wielandt deflation that the n

As a resut of the above, the eigenvalues k

(Thus, if we know k

Before executing our program, we put the matrix A into the matrix variable [A]. We also put the vector v

Instruction#1_____dim([A]) -> L

Instruction#2_____L

Instruction#3_____dim([C]) -> dim([E])..........represent the operation "Store".)

Instruction#4_____For (I,1,N)

Instruction#5_____[A](N,I) -> [E](I,1)

Instruction#6_____End

Instruction#7_____[E]

Instruction#8_____[D](1,1)/[C](N,1) -> K

Instruction#9_____( [D](1,1) )

Instruction#10____[C][E]

Instruction#11____[A] - K [F] -> [B]

Instruction#12____{N-1,N-1} -> dim( [B] )

Instruction#13____[B]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

We assume the n points are ( x

Before executing the program, put the list { x

Instructions #12,13,14 move the last column of [A] into the column matrix [B]. Thus, [B] contains the column vector (a

When the number of data points is n = 2,3,4 or 5, then the TI-83 regression functions make it possible to write programs for interpolation which are very short. See the programs INTERP2, INTERP3, INTERP4, and INTERP5.

Instruction#1_____dim(L

Instruction#2_____{N,N+1} -> dim([A]).......represent the operation "Store".)

Instruction#3_____{N,1} -> dim([B])............(See note below.)

Instruction#4_____For (I,1,N)

Instruction#5_____L

Instruction#6_____1 -> [A](I,1)

Instruction#7_____For (J,2,N)

Instruction#8_____L

Instruction#9_____End

Instruction#10____End

Instruction#11____rref([A]) -> [A]

Instruction#12____For (I,1,N)

Instruction#13____[A](I,N+1) -> [B](I,1)

Instruction#14____End

Instruction#15____[B]

Note: Use the MATRIX menu to enter the matrix names [A] , [B] , ... onto a program line. Do not type the characters "[" , "A" , "]" , "B" , ... separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

For INTERP2, we assume the values for x

Instruction#1_____LinReg(a+bx)L

Instruction#2_____Y

-------------------------------------------------------------------------

The description for INTERP3 is very much the same as the description for INTERP2. Only minor changes occur in the description for INTERP3.

For INTERP3, we assume the values for x

Instruction#1_____QuadReg L

Instruction#2_____Y

-------------------------------------------------------------------------

The description for INTERP4 is very much the same as the description for INTERP3. Only the obvious minor changes need to be made.

The program for INTERP4 is as follows:

Instruction#1_____CubicReg L

Instruction#2_____Y

-------------------------------------------------------------------------

The description for INTERP5 is very much the same as the description for INTERP3. Only the obvious minor changes need to be made.

The program for INTERP5 is as follows:

Instruction#1_____QuartReg L

Instruction#2_____Y

-------------------------------------------------------------------------

In Neville's method, we assume that we have n data points (x

Nevile's method is based on Aitken's Lemma. Aitken's Lemma may be described as follows: Let V be the set of indices {0,1,...,n-1} of the x-coordinates of the data points. Let {i,j,...,k} be a subset of V. Define P

1. S and T have the same number of indices.

2. Every index in S is also in T except for one index. Call this index "i" (in S).

Then it follows that every index in T is also in S except for one index. Call this index "j" (in T). It also follows that "i" is not equal to "j".

The main statement for Aitken's Lemma is the following:

Let U be the union of S and T. Then

P

We call this equation "Aitken's formula". (The denominator in this equation can be simplified to x

Neville's method makes use of Aitken's Lemma a total of n(n-1)/2 times.The computation is organized as follows: Let [A] be an n by n matrix. All entries above the diagonal are set to zero. In the first column, we place the numbers f

In the following program, we assume x

Instructions#9,10,11,12,13 form a double loop which fills columns 2,3,...,n of [A] according to Neville's method as described above. Instuction#11 is the main instruction. This long instruction uses Aitken's formula as follows: Two consecutive numbers are taken from column (j-1) of [A]. These numbers are in rows (i-1) and (i) of [A]. Also, these numbers are P

Instruction#14 displays the entire matrix [A] on the home screen. The (n,n) entry of [A] contains the value of the interpolating polynomial which uses the entire set of data points.

Before executing the program, put {x

Instruction#1_____dim(L

Instruction#2_____{N,N+2} -> dim([A]).......represent the operation "Store".)

Instruction#3_____Fill(0,[A]).........................(See note below.)

Instruction#4_____For (I,1,N)

Instruction#5_____L

Instruction#6_____X-L

Instruction#7_____L

Instruction#8_____End

Instruction#9_____For (J,2,N)

Instruction#10____For (I,J,N)

Instruction#11____( [A](I-1,J-1)*[A](I,N+1) - [A](I,J-1)*[A](I-J+1,N+1) ) /

________________( [A](I,N+1) - [A](I-J+1,N+1) ) -> [A](I,J)

Instruction#12____End

Instruction#13____End

Instruction#14____[A]

Note: Use the MATRIX menu to enter the matrix name [A] onto a program line. Do not type the characters "[" , "A" , "]" separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

(See also Program #31, NEWFORDF .)

In Newton's divided difference method, we assume that we have n data points (x

The Newton divided differences are defined recursively. The order-0 divided differences are defined by f[x

f[ x

Thus, there are n-k such numbers. These will be placed into column# (k+1) of the matrix [A] , on and below the diagonal.

Thus, column#2 will contain the numbers f[x

Column#3 will contain the numbers f[x

Column#n of [A] will contain the single number f [ x

Before executing the program, put the list {x

Instructions#8,9,10,11,12 form a double loop which fills columns 2, 3, ... , n of [A] with divided differences of order 1, 2, ... , (n-1) respectively (on and below the diagonal). Instruction#10 is the main instruction. This long instruction uses two consecutive divided differences in column (j-1) of [A] to form a next-order divided difference to be placed into column (j) of [A]. After the double loop is completed, the numbers a

Instructions#13,14,15,16,17,18 are optional. They compute the value of P(x) at the given value of x using a Horner type nest. Thus, P(x) is written in the form

P(x) = ( ... (( a

The value of the Horner sum is P(x), and this number is accumulated in the variable S (instruction#16) and also placed into the first entry of column (n+2) of [A] (instruction#18).

Instruction#19 displays the entire matrix [A] on the home screen. You will probably need to use the arrow keys to scroll through the matrix. Or, you can go to the matrix editor and read the matrix entries there. (In the matrix editor, you can read extra decimal places at the bottom of the screen.)

Instruction#1_____dim(L

Instruction#2_____{N,N+2} -> dim( [A] ).......represent the operation "Store".)

Instruction#3_____Fill( 0, [A] )......................(See note below.)

Instruction#4_____For(I,1,N)

Instruction#5_____L

Instruction#6_____L

Instruction#7_____End

Instruction#8_____For(J,2,N)

Instruction#9_____For(I,J,N)

Instruction#10____( [A](I,J-1) - [A](I-1,J-1) ) / ( L

Instruction#11____End

Instruction#12____End

Instruction#13____[A](N,N) -> S

Instruction#14____For(I,2,N)

Instruction#15____N-I+1 -> K

Instruction#16____S * ( X - L

Instruction#17____End

Instruction#18____S -> [A](1,N+2)

Instruction#19____[A]

Note: Use the MATRIX menu to enter the matrix name [A] onto a program line. Do not type the characters "[" , "A" , "]" separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------

In Lagrange's method, we assume that we have n data points (x

L

Notice that in the numerator of L

For a given value of x (not equal to any of the x

Before executing the program, put the list {x

Instructions#4,5,6,7,8,9 are optional. They test to see if Q = 0 (instruction#4), which would mean that x = x

In instruction#10, the term (x-L

Instructions#11,12,13,14,15,16,17 form a double loop which computes the denominators of the Lagrange coefficients L

Instruction#18 computes the values of L

Instruction#22 displays the entire matrix [A] on the home screen. You will probably need to use the arrow keys to scroll through the matrix. Or, you can go to the matrix editor and read the matrix entries there. (In the matrix editor, you can read extra decimal places at the bottom of the screen.)

Instruction#1_____dim(L

Instruction#2_____N -> dim(L

Instruction#3_____prod(X-L

Instruction#4_____If Q = 0

Instruction#5_____Then

Instruction#6_____Disp "X=X(I) FOR SOME"

Instruction#7_____Disp "I. CHANGE X"

Instruction#8_____Stop

Instruction#9_____End

Instruction#10____Q/(X-L

Instruction#11____For (I,1,N)

Instruction#12____1 -> L

Instruction#13____For (J,1,N)

Instruction#14____If J != I ________________(See note below)

Instruction#15____L

Instruction#16____End

Instruction#17____End

Instruction#18____L

Instruction#19____L

Instruction#20____sum(L

Instruction#21____List>matr( {P} , L

Instruction#22____[A]

Note that in instruction#14, we are using the symbol != to represent "not equal". When entering this program into the TI83, one should use the more standard symbol from the TEST menu.

For instructions#21,22, use the MATRIX menu to enter the matrix name [A] onto a program line. Do not type the characters "[" , "A" , "]" separately.

This program may be downloaded to your computer for use with the TI-GRAPH LINK application or the equivalent.

Macintosh OS users:

PC Windows users:

-------------------------------------------------------------------------