TI83 Calculator Programs for Numerical Analysis Problems - Part 2



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 Delta2 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 #24 HERMITEN (N Point Hermite Interpolation)

We assume we have n data points (x0,f0), ... , (xn-1,fn-1), and also the derivative values Dxf0, ... , Dxfn-1 at these points. Then, there is a unique Hermite interpolating polynomial H(x) = a0 + a1x + ... + a2n-1x2n-1 which passes through the n data points and which satisfies the n derivative conditions H'(xi) = Dxfi , i = 0, ... , n-1. This program computes the values of a0, ... , a2n-1 .

Before executing the program, put the list { x0 , x1 , ... , xn-1 } into the list variable L1, { f0 , f1 , ... , fn-1 } into the list variable L2, and {Dxf0, ... , Dxfn-1} into the list variable L3. Thus, L1, L2, L3 should each contain only n numbers. Instructions #1,2,3 set up matrices [A] and [C] to be used by the program. Instructions#4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15 set up an augmented "Vandermonde" matrix in [A]. The first n rows of [A] correspond to the equations H(xi) = fi. The rows (n+1) to (2n) correspond to the equations H'(xi) = Dxfi. Thus, Aij = xi-1^(j-1) when i = 1, ... , n, and j = 1, ... , 2n. Also, Aij = (j-1)xi-1^(j-2) if i = n+1, ... , 2n and j = 1, ... , 2n. (Note: If xk = 0 for some k, we set Ak,1 = 1 , An+k,1 = 0 and An+k,2 = 1 . ) The last column of [A] (column 2n+1, which is the augmented column) contains the entries f0, ... , fn-1, Dxf0, ... , Dxfn-1 .

Instruction#16 reduces [A] to its row reduced echelon form, and thus solves our system for a0, ... , a2n-1 . (Since H(x) exists and is unique, [A] must be invertible.) The solution is left in the last column of [A]. Instructions #17,18,19 move the last column of [A] into the column matrix [C]. Thus, [C] contains the column vector (a0 , ... , a2n-1 )T . Instruction#26 displays [C].

Instructions#20, 21, 22, 23, 24, 25 are optional instructions and may be deleted. For small size problems (where n = 2, 3, or 4), these instructions put the Hermite polynomial H(x) into the function variable Y1 as an expression which uses the numbers in the matrix [C]. The expression for H(x) also uses Horner's method to increase the speed of the evaluation of H(x). Thus, for n = 2, 3, or 4, Y1 can be used to evaluate H(x).


Instruction#1_____dim(L1) -> N...............................(Note: We use the symbol "->" to
Instruction#2_____{2N,2N+1} -> dim([A])...................represent the operation "Store".)
Instruction#3_____{2N,1} -> dim([C])..................(See note below.)
Instruction#4_____For (I,1,N)
Instruction#5_____L2(I) -> [A](I,2N+1)
Instruction#6_____L3(I) -> [A](N+I,2N+1)
Instruction#7_____1 -> [A](I,1)
Instruction#8_____L1(I) -> [A](I,2)
Instruction#9_____0 -> [A](N+I,1)
Instruction#10____1 -> [A](N+I,2)
Instruction#11____For (J,3,2N)
Instruction#12____L1(I)^(J-1) -> [A](I,J)
Instruction#13____(J-1)(L1(I)^(J-2)) -> [A](N+I,J)
Instruction#14____End
Instruction#15____End
Instruction#16____rref([A]) -> [A]
Instruction#17____For (I,1,2N)
Instruction#18____[A](I,2N+1) -> [C](I,1)
Instruction#19____End
Instruction#20____If N=2
Instruction#21____"( ( ( [C](4,1) )X + [C](3,1) )X + [C](2,1) )X + [C](1,1)" -> Y1
Instruction#22____If N=3
Instruction#23____"( ( ( ( ( [C](6,1) )X + [C](5,1) )X + [C](4,1) )X + [C](3,1) )X +
__________________[C](2,1) )X + [C](1,1)" -> Y1
Instruction#24____If N=4
Instruction#25____"( ( ( ( ( ( ( [C](8,1) )X + [C](7,1) )X + [C](6,1) )X + [C](5,1) )X +
__________________[C](4,1) )X + [C](3,1) )X + [C](2,1) )X + [C](1,1)" -> Y1
Instruction#26____[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: Click here for HERMITEN download in binhex format.

PC Windows users: Click here for HERMITEN download in zip format.


Back to Menu


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


Program #25 HERMITDD (Hermite Divided Difference Method)

In the Hermite divided difference method, we assume we have n data points (x0,f0), ... , (xn-1,fn-1), and also the derivative values Dxf0, ... , Dxfn-1 at these points. Then, there is a unique Hermite interpolating polynomial H(x) of degree 2n-1 which passes through the n data points and which satisfies the n derivative conditions H'(xi) = Dxfi , i = 0, ... , n-1.

The polynomial H(x) may be expressed in the form H(x) = a0 + a1(x-x0) + a2(x-x0)2 + a3(x-x0)2(x-x1) + a4(x-x0)2(x-x1)2 + a5(x-x0)2(x-x1)2(x-x2) + ... + a2n-1[(x-x0)2 ... (x-xn-2)2(x-xn-1)]. The constants a0, ... , a2n-1 may be computed from a modified divided difference table. This program sets up the divided difference table for a0, ... , a2n-1. In addition, for n=2 or 3, this program will leave an expression for H(x) in the function variable Y1.

Before executing the program, put the list { x0 , x1 , ... , xn-1 } into the list variable L1, { f0 , f1 , ... , fn-1 } into the list variable L2, and {Dxf0, ... , Dxfn-1} into the list variable L3. Thus, L1, L2, L3 should each contain only n numbers. Instructions#1,2,3 set up a matrix [A] which will contain the divided differences. Instructions#4, 5, 6, 7, 8, 9 put the list {f0, f0, f1, f1, ... , fn-1, fn-1} into the first column of [A] (instructions#7,8). These instructions also put the list {x0, x0, x1, x1, ... , xn-1, xn-1} into the last column of [A] (column#2n+1). (See instructions#5,6. Also, note that [A] is a 2n by (2n+1) matrix.)

Instructions#10, 11, 12, 13, 14 fill in the second column of [A]. In this column, the first entry was set to zero by instruction#3. The entries (2i,2), i = 1, ... , n are set equal to Dxfi-1 respectively (see instructions#11 and 14). The entries (2i+1,2), i = 1, ... , (n-1) are set equal to the first order divided differences (fi - fi-1) / (xi - xi-1), i = 1, ... , (n-1) respectively (see instruction#12).

Instructions#15, 16, 17, 18, 19 fill in columns#3, 4, ... , 2n with divided differences in the usual algorithmic manner. The denominators of the divided differences (see instruction#17) are a difference of values of x. These values of x are obtained from column#(2n+1) of the matrix [A], (the last column of [A], previously created at instructions#5,6). Thus, in instruction#17, these denominators will never be zero (because of the structure of column#(2n+1) of [A]), as long as the values of xi, i = 0, ... , (n-1) are distinct. After the matrix [A] is computed, the values for a0, ... , a2n-1 will appear on the main diagonal of [A]. (Thus, ai = Ai+1,i+1 , i = 0, 1, ... , 2n-1 .) Instruction#24 displays the matrix [A] on the home screen. (You will probably need the arrow keys to scroll through the matrix.)

When n = 2 or 3, instructions#20, 21, 22, 23 will put an expression for the Hermite polynomial H(x) into the function variable Y1. This expression uses the numbers on the diagonal of [A] (the ai) and also the numbers in the list variable L1 (the xi). Also, the expression for H(x) is set up to use a Horner-like method to increase the speed of the evaluation of H(x). Thus, for n = 2 or 3, Y1 can be used to evaluate H(x).



Instruction#1_____dim(L1) -> N...............................(Note: We use the symbol "->" to
Instruction#2_____{2N,2N+1} -> dim([A])...................represent the operation "Store".)
Instruction#3_____Fill( 0, [A] )............................(See note below.)
Instruction#4_____For(I,1,N)
Instruction#5_____L1(I) -> [A](2I-1,2N+1)
Instruction#6_____L1(I) -> [A](2I,2N+1)
Instruction#7_____L2(I) -> [A](2I-1,1)
Instruction#8_____L2(I) -> [A](2I,1)
Instruction#9_____End
Instruction#10____For(I,1,N)
Instruction#11____L3(I) -> [A](2I,2)
Instruction#12____([A](2I+1,1) - [A](2I,1)) / (L1(I+1) - L1(I)) -> [A](2I+1,2)
Instruction#13____End
Instruction#14____L3(N) -> [A](2N,2)
Instruction#15____For(J,3,N)
Instruction#16____For(I,J,N)
Instruction#17____([A](I,J-1) - [A](I-1,J-1)) / ([A](I,2N+1) - [A](I-J+1)) -> [A](I,J)
Instruction#18____End
Instruction#19____End
Instruction#20____If N=2
Instruction#21____"( ( ([A](4,4) )(X - L1(2) ) + [A](3,3) )(X - L1(1) ) +
________________________[A](2,2) )(X - L1(1) ) + [A](1,1)" -> Y1
Instruction#22____If N=3
Instruction#23____"( ( ( ( ( [A](6,6) )(X - L1(3) ) + [A](5,5) )(X - L1(2) ) +
___________________[A](4,4) )(X - L1(2) ) + [A](3,3) )(X - L1(1) ) +
________________________[A](2,2) )(X - L1(1) ) + [A](1,1)" -> Y1
Instruction#24____[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: Click here for HERMITDD download in binhex format.

PC Windows users: Click here for HERMITDD download in zip format.


Back to Menu


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


Program #26 HERMITLA (Hermite-Lagrange Interpolating Polynomial)

In the Hermite-Lagrange method, we assume we have n data points (x0,f0), ... , (xn-1,fn-1), and also the derivative values Dxf0, ... , Dxfn-1 at these points. Then, there is a unique Hermite interpolating polynomial H(x) of degree 2n-1 which passes through the n data points and which satisfies the n derivative conditions H'(xi) = Dxfi , i = 0, ... , n-1.

The polynomial H(x) may be expressed in the Hermite-Lagrange form

H(x) = [ f0J0(x) + f1J1(x) + ... + fn-1Jn-1(x) ] + [ (Dxf0)K0(x) + (Dxf1)K1(x) + ... + (Dxfn-1)Kn-1(x) ] ,

where Ji(x) = [ 1 - 2 ( x - xi ) DxLi(xi) ] [ Li(x) ]2 , Ki(x) = ( x - xi ) [ Li(x) ]2 ,

and Li(x) = [ (x-x0) (x-x1)...(x-xi-1) (x-xi+1)...(x-xn-1) ] / [ (xi-x0) (xi-x1)...(xi-xi-1) (xi-xi+1)...(xi-xn-1) ] .

Li(x) is the ith Lagrange polynomial of degree (n-1) using the set {x0, x1, ... , xn-1 } (see program#23 above). Ji(x) has the property that Ji(xj) = 0 if j is not equal to i, Ji(xi) = 1 , and DxJi(xj) = 0 for J = 0, 1, ... , n-1 . Ki(x) has the property that Ki(xj) = 0 for j = 0, 1, ... , n-1 , DxKi(xj) = 0 if j is not equal to i, and DxKi(xi) = 1.

For a given value of x (not equal to any of the xi values), this program will produce a list of the values of Ji(x), a list of the values of Ki(x), and a value for H(x).

Before entering this program into the TI-83 calculator, one must first create the list names L7, L8, L9, and L10. This may be done in the Stat_List_Editor, or by using the SetUpEditor command on the home screen.

Before executing the program, put the list { x0 , x1 , ... , xn-1 } into the list variable L1, { f0 , f1 , ... , fn-1 } into the list variable L2, and {Dxf0, ... , Dxfn-1} into the list variable L3. Thus, L1, L2, L3 should each contain only n numbers. Also, store a value for x (not equal to any of the xi values) into the variable X. Instructions#1,2,3 set up lists L4, L5 which will be used by the program. In particular, L4 will be used to store the values of the denominators of Li(x). L5 will be used to store the values of DxLi(xi) . Instructions#4,5 form the product (x-x0)(x-x1)...(x-xn-1) and put the result in Q. Q will be used to help form the numerators of Li(x).

Instructions#6,7,8,9,10,11 are optional. They test to see if Q = 0 (instruction#6), which would mean that x = xi for some i. Since this would cause a division by zero in instruction#12, a message is displayed to change the value of x (instructions#68.9). Instructions #6,7,8,9,10,11 could be deleted. Then, if x = xi for some i, the program would stop at instruction#12 because of a division by zero.

In instruction#12, the list L6 (which was created in instruction#4) contains the list of numbers { x-x0 , x-x1 , ... , x-xn-1 } . Division of Q by L6 creates another list LL7 = { Q/(x-x0) , Q/(x-x1) , ... , Q/(x-xn-1) } . Since Q is the product (x-x0) (x-x1) ... (x-xn-1) , the list LL7 contains the numerators of the Lagrange polynomials Li(x).

Instructions#13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 form a double loop which computes the denominators of the Lagrange polynomials Li(x), and also computes DxLi(xi). In the inner loop (instructions#16, 17, 18, 19, 20, 21, 22), the products in the denominators of Li(x) are formed at instruction#20 and stored in the list variable L4. Also, it is not hard to show, using logarithmic differentiation, that

DxLi(xi) = (xi-x0)-1 + (xi-x1)-1 + ... + [(xi-xi-1)-1 + (xi-xi+1)-1] + ... +(xi-xn-1)-1 .

These sums of reciprocals are formed at instruction#21 and stored in the list variable L5. (Note that a product and a sum is computed for each i, i = 0, ... , n-1 .)

Instruction#25 completes the formation of the list of values of Li(x), i = 0, ... , n-1 . This list is stored in LL8. Instruction#26 completes the formation of the list of values of Ki(x), i = 0, ... , n-1 . Instruction#27 completes the list of values of Ji(x), i= 0, ... , n-1 . Instruction#28 computes the value of H(x) using the Hermite-Lagrange formula above. Instruction#29 forms an output matrix [A] of three columns. Column#1 of [A] has the value of H(x) in the first entry. Column#2 has the list of values of Ki(x). Column#3 has the list of values of Ji(x).

Instruction#30 displays the output matrix [A]. You will probably need to use the arrow keys to scroll through the matrix.


Instruction#1_____dim(L1) -> N...................(Note: We use the symbol "->" to
Instruction#2_____N -> dim(L4)...................represent the operation "Store".)
Instruction#3_____N -> dim(L5)
Instruction#4_____X - L1 -> L6
Instruction#5_____prod(L6) -> Q
Instruction#6_____If Q = 0
Instruction#7_____Then
Instruction#8_____Disp "X=X(I) FOR SOME"
Instruction#9_____Disp "I. CHANGE X"
Instruction#10____Stop
Instruction#11____End
Instruction#12____Q/L6 -> LL7
Instruction#13____For (I,1,N)
Instruction#14____1 -> L4(I)
Instruction#15____0 -> L5(I)
Instruction#16____For (J,1,N)
Instruction#17____If J != I......................................(See note below)
Instruction#18____Then
Instruction#19____L1(I) - L1(J) -> T
Instruction#20____L4(I) * T -> L4(I)
Instruction#21____L5(I) + T^(-1) -> L5(I)
Instruction#22____End
Instruction#23____End
Instruction#24____End
Instruction#25____LL7/L4 -> LL8
Instruction#26____(L6)(LL8)^2 -> LL9
Instruction#27____( 1 - 2 L5 L6 ) (LL8)^2 -> LL10
Instruction#28____sum ( ( L2 ) (LL10) ) + sum ( ( L3 ) (LL9) ) -> H
Instruction#29____List>matr ( {H}, LL9, LL10, [A] )............(See note below.)
Instruction#30____[A]


Note that in instruction#17, 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#29,30, 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: Click here for HERMITLA download in binhex format.

PC Windows users: Click here for HERMITLA download in zip format.


Back to Menu


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


Program #27 DERIV2PT (Derivative 2-Point Approximation)

There are two commonly used 2-point methods for the approximation of a derivative f '(xi). The first method is the forward difference method, and the second method is the backward difference method. (We consider the centered difference method to be a 3-point method and will be considered in the next section.)

The forward difference method approximates f '(xi) using ( f(xi+h) - f(xi) ) / h , where h is the spacing distance between the points xi and xi+h . The backward difference method approximates f '(xi) using ( f(xi) - f(xi-h) ) / h .

We assume we have a list of equally spaced points { x1, x2, ... , xn } and the corresponding function values { f1, f2, ... , fn } . (The number of points n must be 2 or more.) This program will compute the approximations to f '(xi) , i = 1, 2, ... , n-1 using the forward difference method with two consecutive data points at xi and xi+1 . This program will also compute the approximations to f '(xi) , i = 2, 3, ... , n using the backward difference method with two consecutive data points xi-1 and xi .

Before executing the program, we put the list { x1, x2, ... , xn } into the list variable L1 , and { f1, f2, ... , fn } into the list variable L2 . Instructions#1,2,3,4,5 set up lists L3, L4 which will be used by the program. In particular, L3 will be used to store the forward difference approximations and L4 will be used to store the backward difference approximations to f '(xi) .

Instruction#6 computes the spacing h as x2 - x1 . Instructions#7,8,9,10 form a loop which computes the difference approximations. Instruction#8 computes the forward difference approximation to f '(xi) and stores the result in L3(I) . This value is also the backward difference approximation for f '(xi+h) . Thus, this result is also stored in L4(I+1) (instruction#9) .

Instruction#11 sets up the output matrix [A] . Column#1 of [A] has the xi values, column#2 has the f(xi) values, column#3 has the forward difference approximations to f '(xi) , and column#4 has the backward difference approximations to f '(xi) . (Note that although the computation does not require the use of all the xi points (only x1 and x2 were used), we store them in L1 anyway for use in the output matrix.)

Instruction#12 displays the output matrix [A] . You will probably need the arrow keys to scroll through the matrix.

Instruction#1_____dim(L1) -> N..........(Note: We use the symbol "->" to
Instruction#2_____N -> dim(L3)...........represent the operation "Store".)
Instruction#3_____N -> dim(L4)
Instruction#4_____Fill(0,L3)
Instruction#5_____Fill(0,L4)
Instruction#6_____L1(2) - L1(1) -> H
Instruction#7_____For(I,1,N-1)
Instruction#8_____( L2(I+1) - L2(I) ) / H -> L3(I)
Instruction#9_____L3(I) -> L4(I+1)
Instruction#10____End
Instruction#11____List>matr( L1, L2, L3, L4, [A] )..........(See note below.)
Instruction#12____[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: Click here for DERIV2PT download in binhex format.

PC Windows users: Click here for DERIV2PT download in zip format.


Back to Menu


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


Program #28 DERIV3PT (Derivative 3-Point Approximation)

There are three commonly used 3-point methods for the approximation of a derivative f '(xi). The first method is the left endpoint formula, the second is the centered difference formula, and the third is the right endpoint formula. (Of these three formulas, the centered difference formula is probably the most used in practice.)

The left endpoint formula approximates f '(xi) using (- 3 f(xi) + 4 f(xi+h) - f(xi+2h) ) / (2h) , where h is the spacing distance between the equally spaced points xi , xi+h , and xi+2h . The centered difference method approximates f '(xi) using ( f(xi+h) - f(xi-h) ) / (2h) . The right endpoint method approximates f '(xi) using ( 3 f(xi) - 4 f(xi-h) + f(xi-2h) ) / (2h)

We assume we have a list of equally spaced points { x1, x2, ... , xn } and the corresponding function values { f1, f2, ... , fn } . (The number of points n must be 3 or more.) This program will compute the approximations to f '(xi) , i = 1, 2, ... , n-2 using the left endpoint formula with the three consecutive data points at xi , xi+1 and xi+2 . Also, this program will compute the approximations to f '(xi) , i = 2, 3, ... , n-1 using the centered difference formula at the two data points xi-1 and xi+1 . Also,this program will compute the approximations to f '(xi) , i = 3, 4, ... , n using the right endpoint formula with the three consecutive data points at xi-2 , xi-1 and xi .

Before executing the program, we put the list { x1, x2, ... , xn } into the list variable L1 , and { f1, f2, ... , fn } into the list variable L2 . Instructions#1,2,3,4,5,6,7 set up lists L3, L4, L5 which will be used by the program. In particular, L3 will be used to store the left endpoint approximations to f '(xi) , L4 will be used to store the centered difference approximations, and L5 will be used to store the right endpoint approximations.

Instruction#8 computes the spacing h as x2 - x1 . Instructions#9,10,11,12,13 form a loop which computes the approximations. Instruction#10 computes the left endpoint approximation to f '(xi) and stores the result in L3(I) . Instruction#11 computes the centered difference approximation to f '(xi+h) and stores the result in L4(I+1) . Instruction#12 computes the right endpoint approximation to f '(xi+2h) and stores the result in L5(I+2) .

Instruction#14 sets up the output matrix [A] . Column#1 of [A] has the xi values, column#2 has the f(xi) values, column#3 has the left endpoint approximations to f '(xi) , column#4 has the centered difference approximations to f '(xi) , and column#5 has the right endpoint approximations to f '(xi) . (Note that although the computation does not require the use of all the xi points (only x1 and x2 were used), we store them in L1 anyway for use in the output matrix.)

Instruction#15 displays the output matrix [A] . You will probably need the arrow keys to scroll through the matrix.

Instruction#1_____dim(L1) -> N..........(Note: We use the symbol "->" to
Instruction#2_____N -> dim(L3)...........represent the operation "Store".)
Instruction#3_____N -> dim(L4)
Instruction#4_____N -> dim(L5)
Instruction#5_____Fill(0,L3)
Instruction#6_____Fill(0,L4)
Instruction#7_____Fill(0,L5)
Instruction#8_____L1(2) - L1(1) -> H
Instruction#9_____For(I,1,N-2)
Instruction#10____( -3L2(I) + 4L2(I+1) - L2(I+2) ) / (2H) -> L3(I)
Instruction#11____( L2(I+2) - L2(I) ) / (2H) -> L4(I+1)
Instruction#12____( L2(I) - 4L2(I+1) + 3L2(I+2) ) / (2H) -> L5(I+2)
Instruction#13____End
Instruction#14____List>matr(L1, L2, L3, L4, L5, [A] )........ .(See note below.)
Instruction#15____[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: Click here for DERIV3PT download in binhex format.

PC Windows users: Click here for DERIV3PT download in zip format.


Back to Menu


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


Program #29 DERIV5PT (Derivative 5-Point Approximation)

We consider three commonly used 5-point methods for the approximation of a derivative f '(xi). The first method is the left endpoint formula, the second is the centered formula, and the third is the right endpoint formula.

The left endpoint formula approximates f '(xi) using (- 25 f(xi) + 48 f(xi+h) - 36 f(xi+2h) + 16 f(xi+3h) - 3 f(xi+4h) ) / (12h) , where h is the spacing distance between the equally spaced points xi+kh , k = 0,1,2,3,4 . The centered formula approximates f '(xi) using ( f(xi-2h) - 8 f(xi-h) + 8 f(xi+h) - f(xi+2h) ) / (12h) . The right endpoint method approximates f '(xi) using ( 25 f(xi) - 48 f(xi-h) + 36 f(xi-2h) - 16 f(xi-3h) + 3 f(xi-4h) ) / (12h)

We assume we have a list of equally spaced points { x1, x2, ... , xn } and the corresponding function values { f1, f2, ... , fn } . (The number of points n must be 5 or more.) This program will compute the approximations to f '(xi) , i = 1, 2, ... , n-4 using the left endpoint formula with the five consecutive data points at xi+k , k = 0,1,2,3,4 . Also, this program will compute the approximations to f '(xi) , i = 3, 4, ... , n-2 using the centered formula at the five data points xi-2+k , k = 0,1,2,3,4 . . Also,this program will compute the approximations to f '(xi) , i = 5, 6, ... , n using the right endpoint formula with the five consecutive data points at xi-4+k , k = 0,1,2,3,4 .

Before executing the program, we put the list { x1, x2, ... , xn } into the list variable L1 , and { f1, f2, ... , fn } into the list variable L2 . Instructions#1,2,3,4,5,6,7 set up lists L3, L4, L5 which will be used by the program. In particular, L3 will be used to store the left endpoint approximations to f '(xi) , L4 will be used to store the centered approximations, and L5 will be used to store the right endpoint approximations.

Instruction#8 computes the spacing h as x2 - x1 . Instructions#9,10,11,12,13 form a loop which computes the approximations. Instruction#10 computes the left endpoint approximation to f '(xi) and stores the result in L3(I) . Instruction#11 computes the centered approximation to f '(xi+2h) and stores the result in L4(I+2) . Instruction#12 computes the right endpoint approximation to f '(xi+4h) and stores the result in L5(I+4) .

Instruction#14 sets up the output matrix [A] . Column#1 of [A] has the xi values, column#2 has the f(xi) values, column#3 has the left endpoint approximations to f '(xi) , column#4 has the centered approximations to f '(xi) , and column#5 has the right endpoint approximations to f '(xi) . (Note that although the computation does not require the use of all the xi points (only x1 and x2 were used), we store them in L1 anyway for use in the output matrix.)

Instruction#15 displays the output matrix [A] . You will probably need the arrow keys to scroll through the matrix.

Instruction#1_____dim(L1) -> N..........(Note: We use the symbol "->" to
Instruction#2_____N -> dim(L3)...........represent the operation "Store".)
Instruction#3_____N -> dim(L4)
Instruction#4_____N -> dim(L5)
Instruction#5_____Fill(0,L3)
Instruction#6_____Fill(0,L4)
Instruction#7_____Fill(0,L5)
Instruction#8_____L1(2) - L1(1) -> H
Instruction#9_____For(I,1,N-4)
Instruction#10____( -25L2(I) + 48L2(I+1) - 36L2(I+2) + 16L2(I+3) - 3L2(I+4) ) / (12H) -> L3(I)
Instruction#11____( L2(I) - 8L2(I+1) + 8L2(I+3) - L2(I+4) ) / (12H) -> L4(I+2)
Instruction#12____( 3L2(I) - 16L2(I+1) + 36L2(I+2) - 48L2(I+3) + 25L2(I+4) ) / (12H) -> L5(I+4)
Instruction#13____End
Instruction#14____List>matr( L1, L2, L3, L4, L5, [A] )........ .(See note below.)
Instruction#15____[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: Click here for DERIV5PT download in binhex format.

PC Windows users: Click here for DERIV5PT download in zip format.


Back to Menu


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


Program #30 DDER3PT (Double Derivative 3-Point Approximation)

The most commonly used 3-point method for the approximation of a double derivative f ''(xi) is the centered double difference formula. This formula is given by ( f(xi-h) - 2 f(xi) + f(xi+h) ) / ( h2 ) , where h is the spacing distance between the three equally spaced points xi-h , xi , xi+h .

We assume that we have a list of equally spaced points { x1, x2, ... , xn } and the corresponding function values { f1, f2, ... , fn } . (The number of points n must be 3 or more.) This program will compute the approximations to f ''(xi) , i = 2, 3, ... , n-1 using the centered double difference formula.

Before executing the program, we put the list { x1, x2, ... , xn } into the list variable L1 , and { f1, f2, ... , fn } into the list variable L2 . Instructions#1,2,3, set up a list L3 which will be used by the program. In particular, L3 will be used to store the double difference approximations to f ''(xi).

Instruction#4 computes the spacing h as x2 - x1 . Instructions#5,6,7 form a loop which computes the double difference approximations. Instruction#6 computes the approximation to f ''(xi+h) and stores the result in L3(I+1) .

Instruction#8 sets up the output matrix [A] . Column#1 of [A] has the xi values, column#2 has the f(xi) values, and column#3 has the double difference approximations to f ''(xi). (Note that although the computation does not require the use of all the xi points (only x1 and x2 were used), we store them in L1 anyway for use in the output matrix.)

Instruction#9 displays the output matrix [A] . You will probably need the arrow keys to scroll through the matrix.

Instruction#1_____dim(L1) -> N..........(Note: We use the symbol "->" to
Instruction#2_____N -> dim(L3)...........represent the operation "Store".)
Instruction#3_____Fill(0,L3)
Instruction#4_____L1(2) - L1(1) -> H
Instruction#5_____For(I,1,N-2)
Instruction#6_____( L2(I+2) - 2L2(I+1) + L2(I) ) / (H2) -> L3(I+1)
Instruction#7_____End
Instruction#8_____List>matr( L1, L2, L3, [A] )...........(See note below.)
Instruction#9_____[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: Click here for DDER3PT download in binhex format.

PC Windows users: Click here for DDER3PT download in zip format.


Back to Menu


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


Program #31 NEWFORDF (Newton's Forward Difference Method)

(See also Program #22, NEWTDIV.)

In Newton's forward difference method, we assume that the n data points (x0,f0), ... , (xn-1,fn-1) have {xi} as equally spaced values which are also increasing with i . Thus, if h is the spacing distance, then xi = x0 + ih , i = 0, 1, 2, ... , n-1 .Then, Newton's divided difference formula a0 + a1*(x-x0) + a2*(x-x0)*(x-x1) + ... + an-1*(x-x0)*(x-x1)* ... *(x-xn-2) (for the interpolating polynomial P(x) ) may be rewritten as follows: We define s using the equation x = x0 + sh . Then, ak = f [ x0, x1, ... , xk-1 ] (Newton's divided difference of order ( k - 1 ) ) becomes ak = [ 1 / [ hk-1 (k-1)! ] Dk-1f(x0) , where D is the forward difference operator defined by Df(xi) = f(xi+h) - f(xi) . Also, the factors ( x - xi ) become h ( s - i ) .

Thus, Newton's divided difference formula for P(x) can be rewritten as Newton's forward difference formula f(x0) + s Df(x0) + s ( s - 1 ) D2f(x0) / 2! + s ( s - 1 ) ( s - 2 ) D3f(x0) / 3! + ... + [ s ( s - 1 ) ... ( s - n + 2 ) ] Dn-1f(x0) / (n-1)! . The only place where h appears is in the equation x = x0 + sh .

The structure of this program is similar to the structure of the program NEWTDIV . Before executing the program, put the list {x0, ... , xn-1} of equally spaced and increasing xi values into the list variable L1 . Also, put the list {f0, ... , fn-1} into the list variable L2, and put a value for x into the variable X. Instruction#1 finds the number of data points n and puts the result into N. Instruction#2 sets up an (n) by (n+2) matrix [A] which will be used as an output matrix. Instruction#3 sets the initial values of the entries of [A] to zero. Instructions#4,5,6,7 form a loop which puts the numbers {xi} into the (n+1)st column of [A], and puts {fi} into the 1st column of [A].

Instructions#8,9,10,11,12 form a double loop which fills columns 2, 3, ... , n of [A] with forward differences of order 1, 2, ... , (n-1) respectively (on and below the diagonal). Instruction#10 is the main instruction. This instruction uses two consecutive forward differences in column (j-1) of [A] to form a next-order forward difference to be placed into column (j) of [A]. In particular, column 2 will contain the forward differences Df0, Df1, ... , Dfn-2 . Column 3 will contain the second order forward forward differences D2f0, D2f1, ... , D2fn-3 . Etc ... . After the double loop is completed, the forward difference numbers f(x0), Df(x0), D2f(x0), ... , Dn-1f(x0) will appear on the main diagonal of [A].

Instructions#13,14,15,16,17,18, 19, 20 are optional. They compute the value of P(x) using the variable s and a Horner type nest. Instruction#13 computes the spacing distance h as x1 - x0 . Instruction#14 computes the value of s using the equation s = (x-x0) / h . P(x) is computed in the form

P(x) = ( ... ( ( (Dn-1f0)*(s-n+2) / (n-1) + Dn-2f0 )*( s-n+3) / (n-2) + Dn-3f0 )*(s-n+4) / (n-3) + ... )*s + f0 .

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

Instruction#21 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(L1) -> N....................(Note: We use the symbol "->" to
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_____L1(I) -> [A](I,N+1)
Instruction#6_____L2(I) -> [A](I,1)
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) ) -> [A](I,J)
Instruction#11____End
Instruction#12____End
Instruction#13____L1(2) - L1(1) -> H
Instruction#14____( X - L1(1) ) / H -> S
Instruction#15____[A](N,N) -> T
Instruction#16____For(I,2,N)
Instruction#17____N-I+1 -> K
Instruction#18____T * ( S - K + 1 ) / K + [A](K,K) -> T
Instruction#19____End
Instruction#20____T -> [A](1,N+2) : S -> [A](2,N+2)
Instruction#21____[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: Click here for NEWFORDF download in binhex format.

PC Windows users: Click here forNEWFORDF download in zip format.


Back to Menu


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


Program #32 INEWCOTE (Newton-Cotes Integration Method)

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1 contains the results from the Trapezoid Rule.
Column 2 contains the results from the Midpoint Rule.
Column 3 contains the results from Simpson's Rule.
Column 4 contains the results from the Simpson 3/8 Rule (4 points).
Column 5 contains the results from the 2-Point Open Cotes' Rule.
Column 6 contains the results from the 5-Point Closed Cotes' Rule.
Column 7 contains the results from the 3-Point Open Cotes' Rule.
Column 8 contains the results from the 4-Point Open Cotes' Rule.

Row 1 has the value of "a".
Row 2 has the value of "b".
Row 3 has the values of "n", the number of intervals in the partition of [a,b].
Row 4 has the exact value of the integral.
Row 5 has the approximate values of the integral.
Row 6 has the errors.




Instruction#1_____{6,8} -> dim( [A] )..................(Note: We use the symbol "->" to
Instruction#2_____fnInt ( Y1,X,A,B ) -> S...........represent the operation "Store".)
Instruction#3_____For(J,1,8)
Instruction#4_____A -> [A](1,J)........................(See note below.)
Instruction#5_____B -> [A](2,J)
Instruction#6_____S -> [A](4,J)
Instruction#7_____End
Instruction#7a____"TRAPEZOID RULE"
Instruction#8_____1 -> N
Instruction#9_____N -> [A](3,1)
Instruction#10____(B-A) / N -> H
Instruction#11____(H/2)( Y1(A) + Y1(B) ) -> [A](5,1)
Instruction#11a___"MIDPOINT RULE"
Instruction#11b___"SIMPSONS RULE"
Instruction#12____2 -> N
Instruction#13____N -> [A](3,2)
Instruction#14____N -> [A](3,3)
Instruction#15____(B-A) / N -> H
Instruction#16____(2H) (Y1(A+H)) -> [A](5,2)
Instruction#17____(H/3) (Y1(A) + 4 Y1(A+H) + Y1(B)) -> [A](5,3)
Instruction#17a___"SIMPSON 3/8 "
Instruction#17b___"OPEN COTES 2PTS"
Instruction#18____3 -> N
Instruction#19____N -> [A](3,4)
Instruction#20____N -> [A](3,5)
Instruction#21____(B-A)/N -> H
Instruction#22____(3H/8) (Y1(A) + 3Y1(A+H) + 3Y1(A+2H) + Y1(B)) -> [A](5,4)
Instruction#23____(3H/2) (Y1(A+H) + Y1(A+2H)) -> [A](5,5)
Instruction#23a___"CLOSED COTES 5PTS"
Instruction#23b___"OPEN COTES 3PTS"
Instruction#24____4 -> N
Instruction#25____N -> [A](3,6)
Instruction#26____N -> [A](3,7)
Instruction#27____(B-A)/N -> H
Instruction#28____(2H/45) (7Y1(A) + 32Y1(A+H) + 12Y1(A+2H) +
______________________32Y1(A+3H) + 7Y1(B)) -> [A](5,6)
Instruction#29____(4H/3) (2Y1(A+H) - Y1(A+2H) + 2Y1(A+3H)) -> [A](5,7)
Instruction#29a___"OPEN COTES 4PTS"
Instruction#30____5 -> N
Instruction#31____N -> [A](3,8)
Instruction#32____(B-A)/N -> H
Instruction#33____(5H/24) (11Y1(A+H) + Y1(A+2H) + Y1(A+3H) +
___________________11Y1(A+4H)) -> [A](5,8)
Instruction#33a___"ERROR VALUES"
Instruction#34____For (J,1,8)
Instruction#35____[A](4,J) - [A](5,J) -> [A](6,J)
Instruction#36____End
Instruction#37____[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: Click here for INEWCOTE download in binhex format.

PC Windows users: Click here for INEWCOTE download in zip format.


Back to Menu


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


Program #33 ICOMTRAP (Composite Trapezoid Rule)

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B, and "n" in N.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the partition points xi.
Column 3 contains the values of f(xi).
Column 4 contains the trapezoid areas on each subinterval.




Instruction#1_____( B - A ) / N -> H.......................(Note: We use the symbol "->" to
Instruction#2_____seq( A + IH , I , 0 , N ) -> L1.....represent the operation "Store".)
Instruction#3_____Y1(L1) -> L2
Instruction#4_____seq( ( H / 2 ) ( L2(I) + L2(I+1) ) , I , 1 , N ) -> L3
Instruction#5_____sum( L3 ) -> T
Instruction#6_____fnInt( Y1 , X , A , B ) -> S
Instruction#7_____List > matr( {S,T,S-T } , L1 , L2 , L3 , [A] ).....(See note below.)
Instruction#8_____[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: Click here for ICOMTRAP download in binhex format.

PC Windows users: Click here for ICOMTRAP download in zip format.


Back to Menu


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


Program #34 ICOMMIDP (Composite Midpoint Rule)

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B, and "n" in N (with n even).

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the partition points xi.
Column 3 contains the values of f(xi).
Column 4 contains the midpoint-rectangle area values on each
subinterval [ x2i , x2i+2 ].




Instruction#1_____( B - A ) / N -> H.........................(Note: We use the symbol "->" to
Instruction#2_____seq( A + IH , I , 0 , N ) -> L1.....represent the operation "Store".)
Instruction#3_____Y1(L1) -> L2
Instruction#4_____seq( 2H L2(I) , I , 2 , N , 2 ) -> L3
Instruction#5_____sum( L3 ) -> T
Instruction#6_____fnInt( Y1 , X , A , B ) -> S
Instruction#7_____List > matr( {S,T,S-T } , L1 , L2 , L3 , [A] )........ .(See note below.)
Instruction#8_____[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: Click here for ICOMMIDP download in binhex format.

PC Windows users: Click here for ICOMMIDP download in zip format.


Back to Menu


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


Program #35 ICOMSIMP (Composite Simpson Rule)

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B, and "n" in N (with n even).

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the partition points xi.
Column 3 contains the values of f(xi).
Column 4 contains the parabola area values on each
subinterval [ x2i , x2i+2 ].




Instruction#1_____( B - A ) / N -> H.........................(Note: We use the symbol "->" to
Instruction#2_____seq( A + IH , I , 0 , N ) -> L1.....represent the operation "Store".)
Instruction#3_____Y1(L1) -> L2
Instruction#4_____seq( (H/3) ( L2(I) + 4L2(I+1) + L2(I+2) ) , I , 1 , N-1 , 2 ) -> L3
Instruction#5_____sum( L3 ) -> T
Instruction#6_____fnInt( Y1 , X , A , B ) -> S
Instruction#7_____List > matr( {S,T,S-T } , L1 , L2 , L3 , [A] )... .(See note below.)
Instruction#8_____[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: Click here for ICOMSIMP download in binhex format.

PC Windows users: Click here for ICOMSIMP download in zip format.


Back to Menu


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


Program #36 IROMBERG (Romberg Integration)

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B, and "n" in N (n = the number of rows in the Romberg table).




Instruction#1_____N -> dim( L2)...................(Note: We use the symbol "->" to
Instruction#2_____2^(N-1) -> M.....................represent the operation "Store".)
Instruction#3_____(B-A) / M -> H
Instruction#4_____seq( A+IH , I , 0 , M ) -> L3
Instruction#5_____Y1(L3) -> L4
Instruction#6_____For (I , 1 , N)
Instruction#7_____2^(N-I) -> J
Instruction#8_____sum( seq(L4(K) , K , 1 , M+1 , J ) ) - (L4(1)+L4(M+1)) / 2 -> T
Instruction#9_____JHT -> L2(I)
Instruction#10____End
Instruction#11____seq( (1/4)^(K-1) , K , 1 , N ) -> L1
Instruction#12____0 -> X
Instruction#13____prgm NEVILLE
Instruction#14____fnInt( Y1 , X , A , B ) -> S
Instruction#15____{ N , N+4 } -> dim( [A] )........ .(See note below.)
Instruction#16____For( I , 1 , N )
Instruction#17____S -> [A](I,N+3)
Instruction#18____S - [A](I,I) -> [A](I,N+4)
Instruction#19____End
Instruction#20____[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: Click here for IROMBERG download in binhex format.

PC Windows users: Click here for IROMBERG download in zip format.


Back to Menu


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


Program #37 IGAUSS (Gauss Quadrature Method)

(Description to appear.)

Before executing the program, put f(x) into Y1.

The output matrix is structured as follows: For the integral of f(x) from -1 to +1 :

Column 1 contains the integers 2,3,4,5.
Column 2 contains the Gaussian Integration results on the
interval [ -1 , +1 ] for the cases 2,3,4,5.
Column 3 contains the exact value of the integral of f(x) on [ -1 , +1 ].
Column 4 contains the errors.




Instruction#1_____{4,4} -> dim( [A] )....................(See note below.)
Instruction#2_____fnInt( Y1 , X , -1 , 1 ) -> S......(Note: We use the symbol "->" to
Instruction#3_____(1/3)^.5 -> C..........................represent the operation "Store".)
Instruction#4_____{ C , -C } -> L1
Instruction#5_____{ 1 , 1 } -> L2
Instruction#6_____sum( L2Y1(L1) ) -> [A](1,2)
Instruction#7_____(3/5)^.5 -> C
Instruction#8_____{ C , 0 , -C } -> L1
Instruction#9_____{ 5/9 , 8/9 , 5/9 } -> L2
Instruction#10____sum( L2Y1(L1) ) -> [A](2,2)
Instruction#11____.86113631159405 -> C
Instruction#12____.33998104358487 -> D
Instruction#13____{ C , D , -D , -C } -> L1
Instruction#14____.34785484513744 -> C
Instruction#15____.65214515486256 -> D
Instruction#16____{ C , D , D , C } -> L2
Instruction#17____sum( L2Y1(L1) ) -> [A](3,2)
Instruction#18____.90617984593867 -> C
Instruction#19____.53846931010567 -> D
Instruction#20____{ C , D , 0 , -D , -C } -> L1
Instruction#21____.23692688505619 -> C
Instruction#22____.47862867049937 -> D
Instruction#23____{ C , D , 128/225 , D , C , } -> L2
Instruction#24____sum( L2Y1(L1) ) -> [A](4,2)
Instruction#25____For( I , 1 , 4 )
Instruction#26____1+I -> [A](I,1)
Instruction#27____S -> [A](I,3)
Instruction#28____S - [A](I,2) -> [A](I,4)
Instruction#29____End
Instruction#30____[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: Click here for IGAUSS download in binhex format.

PC Windows users: Click here for IGAUSS download in zip format.


Back to Menu


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


Program #38 IGAUSSAB (Gaussian Quadrature Method on [a,b])

(Description to appear.)

Before executing the program, put f(x) into Y2, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1 contains the integers 2,3,4,5.
Column 2 contains the Gaussian Integration results on the
interval [ a , b ] for the cases 2,3,4,5.
Column 3 contains the exact value of the integral of f(x) on [ a , b ].
Column 4 contains the errors.




Instruction#1_____"( (B - A) X + (B + A) ) " -> Y3.....(Note: We use the symbol "->" to
Instruction#2_____"( (B - A) / 2 ) Y2(Y3) " -> Y1.......represent the operation "Store".)
Instruction#3_____prgm IGAUSS

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

Macintosh OS users: Click here for IGAUSSAB download in binhex format.

PC Windows users: Click here for IGAUSSAB download in zip format.


Back to Menu


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


Program #39 IGAUSAB2 (Gauss 2 Point Quadrature on [a,b])

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the Gauss points xi , i = 1,2.
Column 3 contains the values of f(xi).




Instruction#1_____fnInt(Y1,X,A,B) -> S....................(Note: We use the symbol "->" to
Instruction#2_____"( (B-A) X + (B+A) ) / 2" -> Y2.....represent the operation "Store".)
Instruction#3_____( 1/3 )^.5 -> C
Instruction#4_____{ C , -C } -> L1
Instruction#5_____Y2(L1) -> L2
Instruction#6_____Y1(L2) -> L3
Instruction#7_____{ 1 , 1 } -> L4
Instruction#8_____( (B-A) / 2 ) sum(L3L4) -> T
Instruction#9_____List>matr( { S, T, S-T } , L2 , L3 , [A] )........(See note below.)
Instruction#10____[A]

Note: Use the MATRIX menu to enter the matrix name [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: Click here for IGAUSAB2 download in binhex format.

PC Windows users: Click here for IGAUSAB2 download in zip format.


Back to Menu


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


Program #40 IGAUSAB3 (Gauss 3 Point Quadrature on [a,b])

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the Gauss points xi , i = 1,2,3.
Column 3 contains the values of f(xi).




Instruction#1_____fnInt(Y1,X,A,B) -> S....................(Note: We use the symbol "->" to
Instruction#2_____"( (B-A) X + (B+A) ) / 2" -> Y2.....represent the operation "Store".)
Instruction#3_____( 3/5 )^.5 -> C
Instruction#4_____{ C , 0 , -C } -> L1
Instruction#5_____Y2(L1) -> L2
Instruction#6_____Y1(L2) -> L3
Instruction#7_____{ 5/9 , 8/9 , 5/9 } -> L4
Instruction#8_____( (B-A) / 2 ) sum(L3L4) -> T
Instruction#9_____List>matr( { S, T, S-T } , L2 , L3 , [A] )........(See note below.)
Instruction#10____[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: Click here for IGAUSAB3 download in binhex format.

PC Windows users: Click here for IGAUSAB3 download in zip format.


Back to Menu


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


Program #41 IGAUSAB4 (Gauss 4 Point Quadrature on [a,b])

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the Gauss points xi , i = 1,2,3,4.
Column 3 contains the values of f(xi).




Instruction#1_____fnInt(Y1,X,A,B) -> S....................(Note: We use the symbol "->" to
Instruction#2_____"( (B-A) X + (B+A) ) / 2" -> Y2.....represent the operation "Store".)
Instruction#3_____.86113631159405 -> C
Instruction#4_____.33998104358487 -> D
Instruction#5_____{ C , D , -D , -C } -> L1
Instruction#6_____Y2(L1) -> L2
Instruction#7_____Y1(L2) -> L3
Instruction#8_____.34785484513744 -> C
Instruction#9_____.65214515486256 -> D
Instruction#10____{ C , D , D , C } -> L4
Instruction#11____( (B-A) / 2 ) sum(L3L4) -> T
Instruction#12____List>matr( { S, T, S-T } , L2 , L3 , [A] )........(See note below.)
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.

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

Macintosh OS users: Click here for IGAUSAB4 download in binhex format.

PC Windows users: Click here for IGAUSAB4 download in zip format.


Back to Menu


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


Program #42 IGAUSAB5 (Gauss 5 Point Quadrature on [a,b])

(Description to appear.)

Before executing the program, put f(x) into Y1, "a" in A, and "b" in B.

The output matrix is structured as follows: For the integral of f(x) from "a" to "b" :

Column 1, Row 1 contains the exact value of the integral.
Column 1, Row 2 contains the approximate value of the integral.
Column 1, Row 3 contains the error.

Column 2 contains the Gauss points xi , i = 1,2,3,4,5.
Column 3 contains the values of f(xi).




Instruction#1_____fnInt(Y1,X,A,B) -> S....................(Note: We use the symbol "->" to
Instruction#2_____"( (B-A) X + (B+A) ) / 2" -> Y2.....represent the operation "Store".)
Instruction#3_____.90617984593867 -> C
Instruction#4_____.53846931010567 -> D
Instruction#5_____{ C , D , 0 , -D , -C } -> L1
Instruction#6_____Y2(L1) -> L2
Instruction#7_____Y1(L2) -> L3
Instruction#8_____.23692688505619 -> C
Instruction#9_____.47862867049937 -> D
Instruction#10____{ C , D , 128/225 , D , C } -> L4
Instruction#11____( (B-A) / 2 ) sum(L3L4) -> T
Instruction#12____List>matr( { S, T, S-T } , L2 , L3 , [A] )........(See note below.)
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.

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

Macintosh OS users: Click here for IGAUSAB5 download in binhex format.

PC Windows users: Click here for IGAUSAB5 download in zip format.


Back to Menu


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