Newton's Method Implemented on the TI-84 Calculator


We want to solve the equation f(x) = 0. This means that we need to find a value of x for which the function f returns the value 0.

We make a guess, x0. Is f(x0) = 0? We compute f(x0) to check it.
If f(x0) = 0, we have a solution; and if f(x0) ≠ 0, we adjust the original guess as follows:

x1 = x0 - f(x0)/f'(x0)

 

 

 

(f'(x) is the derivative of the function f(x).)

Now we check whether f(x1) = 0; and if it is not, we adjust x1 again.
x2 = x1 - f(x1)/f'(x1)
We continue this process, getting the values ... x3, x4 ... until f(xi) is "close enough" to 0, or until we become convinced that the sequence of x's doesn't converge at all.

Implementation

Y1 holds a function f(x), which is the left hand side of the equation f(x) = 0.
Examples
\Y
1 = sin(X) - .5, or \Y1 = X3 - 8.
The function Y
2 computes the next xi, which is held in variable Ans whose value is shown on the home screen.
\Y
2 = Ans - Y1(Ans)/
nDeriv(Y
1, X, Ans)

How to run this program from the home screen
Enter your initial guess x0.

x0

 

 

 

ENTER

Get Y2 from the menu VARS, Y-VARS, and repeat pressing ENTER

Y2

 

 

 

ENTER ENTER ENTER ...

You will see consecutive values x1, x2, ...

Remark 1.
If you want to see the current value of f(xi), do the following,

Ans→X

 

 

 

ENTER

 

 

 

 

Y1

 

 

 

ENTER

 

 

 

now you see f(xi)

X

 

 

 

ENTER

 

 

 

you restore xi

And now resume

Y2

 

 

 

ENTER ENTER ENTER ...

Remark 2.
When the values Ans that you see on the home screen stop changing, it shows that you cannot get any better approximation of the solution to the equation on this calculator.


Webpage Maintained by Owen Ramsey
Calculus Index