The Nonlinear Systems Program


This program solves up to eight simultaneous equations that can be nonlinear functions. It uses functions you store in program memory.


Introduction

The Nonlinear Systems program approximates the roots of a system of equations using Newton's method. You can etner functions such as higher-order polynomials, trignonometric functions, or linear functions for simultaneous solution. The solution is a point that occurs at the intersection of all the entered functions.

You can enter from two to eight functions to be solved simultaneously. You must enter the functions as subroutines in program memory before running the program. The values of the variables correspond to registers B, C, …, I (001-008).

You must partition the calculator for at least 115 data registers before running the program.

The program prompts you for allowable error, maximum number of iterations, initial values for each variable, and an initial guess for the root of each variable.

IMPORTANT

The program may not arrive at a solution when the initial guess is too inaccurate. If your guesses cause the NO SOLUTION message to appear, repeatedly try the program with different guesses before deciding no solution exists.

For the Beginning Programmer

Before running the Nonlinear Systems program, you must store the functions in program memory as subroutines.

If you are not familiar with keystroke programming, refer to the following chapters in the RPD-95 Programming Guide for instructions.
  • "Working with Programs on the RPD-95"
  • "Using Calculator Keystrokes in a Program"
  • "Controlling the Sequence of Operations"

Rules for Storing the Functions

When you store the functions as a subroutines, follow these rules.
  • The subroutines must be labeled beginning with f1 (lowercase only) and continuing through the last function, up to a maximum of eight (8) functions.
  • The values of the variables must be recalled from the following registers:

    Variable

    Register


    x1 B (001)
    x2 C (002)
    x3 D (003)
    x4 E (004)
    x5 F (005)
    x6 G (006)
    x7 H (007)
    x8 I (008)

  • The subroutine for each function must terminate with a RTN instruction.

Starting the Program

To start the Nonlinear Systems program:
  1. Store the functions needed by the program, following the above listed rules.
  2. If any of the subroutines involve any of the trig functions, select the angle units you want to use.
  3. Select { NON } from the MATHEMATICS menu.
    The program displays:
    D_y9lkW4
  4. Enter the number of functions and press { n }.
  5. Enter the allowable error and press { err }.
  6. Enter the number of iterations you want the program to perform and press { #it }.
  7. Press { EOD } to indicate the data is complete.

Entering the Initial Guesses

When you press { EOD }, the program prompts you to enter an initial guess for each variable.
D_9vXmsh
Enter the value of the guesses, pressing { ENT } after each value.

The Edit Menu

After you enter the initial guesses, the program lets you change any values entered incorrectly.
D_q6uy02
  • If you have no changes, press { NO } and proceed to "Displaying the Solutions" below.
  • If you need to change any values, press { YES } and use the procedure described in the next section below.

Editing the Initial Guesses

When you select { YES } from the EDIT? menu, the program displays the same menu you used to enter the initial guesses.
D_9vXmsh
  • To display the current value, press the [ CE ] key.
  • To accept the current value and proceed to the next, press { ENT }.
  • To edit the current value, enter the correct value and press { ENT }.
When you finish editing the initial guesses, press { NO } from the EDIT? menu.

Displaying the Solutions

If the message NO SOLUTION or #it REACHED is displayed, proceed to the appropriate section below for instructions.

If the program can find solutions within the number of iterations you specified, it displays the value of the first variable.
D_AvZKxDfor example.
  1. Press { NXT } repeatedly to display the solution for each of the remaining variables.
    When all the solutions have been displayed, pressing { NXT } redisplays the value for the first variable.
  2. When you finish viewing the solutions, press { ESC }.
    The program returns to the NONLINEAR SYSTEM menu.

If No Solution Exists

If no solution exists for the system, the program displays the following menu after you press { NO } from the EDIT? menu.
D_uAYihE
Press { ESC } to return to the NONLINEAR SYSTEM menu.

If the Number of Iterations is Reached

If the program fails to find a solution within the number of iterations you specified, it displays:
D_XZNk01
  • To display delta, press { del }.
  • To perform additional iterations, enter the number of additional iterations, press { #it }, and press { EOD }.
    The program continues calculations for the number of iterations you specify.
  • To return to the NONLINEAR SYSTEM menu, press { ESC }.


Back