E-Code

Newton's method for nonlinear systems — a TI-84 Plus CE program

By E-Code · updated

NEWTSYS is a TI-BASIC program for the TI-84 Plus CE. Type F1(X,Y)=0 and F2(X,Y)=0 and a starting point. Each iteration is shown: X, Y, F1, F2 and the correction DX, DY from J*D=-F, with the Jacobian worked out numerically on the first step.

Says so when the Jacobian is singular or it doesn't converge.

What it asks for and what it shows

It asks for 4 values at its prompts. In the example below it shows X, Y, F1, F2, F1X, F1Y, F2X, F2Y, JACOBIAN (NUM), ITERATION 1, J*D, CONVERGED.

Example run

One of its oracle test cases. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1X²+Y²-4
Input 2XY-1
Input 32
Input 40.5
The screen shows
X=1.931851653
Y=0.5176380902
F1=0
F2=0
F1X=4
F1Y=1
F2X=0.5
F2Y=2
TextJACOBIAN (NUM)
TextITERATION 1
J*D=-F,NEW=OLD+D
TextCONVERGED

How it's checked

5 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 52 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE math programs · All TI-84 Plus CE programs