E-Code

Newton's method on a typed function — a TI-89 Titanium program

By E-Code · updated

NEWTON89 is a TI-89 BASIC program for the TI-89 Titanium. Type f(x) as text and a starting guess: every Newton iterate is shown, then the root, f(root) and the number of steps; reports a flat spot or no convergence.

What it asks for and what it shows

It asks for 2 values at its prompts. In the example below it shows ROOT.

Example run

One of its oracle test cases: “x³-2x-5 from 2”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1x^3-2*x-5
Input 22
The screen shows
ROOT=2.094551482

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 12 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium math programs · All TI-89 Titanium programs