Mathematics 180 Calculus I Newton’s Method Program for the TI 81 and TI 82

This program calculates the solution to f(x) = 0 using Newton’s method.

Enter the function f(x) as Y 1 and graph it to find the

approximate zeros of f, i.e. the initial guesses. Then enter

df/dx as Y 2. Then run the Newton program. It will ask you

for your initial guess and for the number of iterations (N = 10 is usually sufficient). The output of each iteration is then displayed.

Program: NEWTON :Disp ”INITIAL” :Input A :Disp ”N” :Input N :A → X :1 → J :Lbl 1 :Disp X :X − Y 1/Y 2 → X

:IS > (J, N)  (punch PRGM CTRL ALPHA A)

:GoTo 1 :Disp ”AGAIN?”

EXAMPLES:

1) Find the zeros of x^{2} − 3. Here Y 1 = x^{2} − 3 and Y 2 = 2x.

2) Find the zeros of x^{3} − 4x^{2} − 4. Here Y 1 = x^{3} − 4x^{2} − 4 and Y 2 = 3x^{2} − 8x. Your initial guess should be 4. Try this initial guess with

N = 10 and see how fast it converges. Then try it with N = 2, 0, and − 2 and see what happens. Can you give an explanation of why it takes so much longer to converge?

3) Find the critical points of x^{3} − e^{x}. Here we want to find the zeros of the derivative of this function, so Y 1 will be the derivative of x^{3} − e^{x}, that is Y 1 = 3x^{2} − e^{x} and Y 2 = 6x − e^{x}.

4) Try it on some other functions, say some polynomials of degree 4, or find the point x where cos x = x.