## 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
(lowercase only) and continuing through the last function, up to a maximum of eight (8) functions.*f1*

- The values of the variables must be recalled from the following
registers:

#### Variable

#### Register

x _{1}B (001) x _{2}C (002) x _{3}D (003) x _{4}E (004) x _{5}F (005) x _{6}G (006) x _{7}H (007) x _{8}I (008) - The subroutine for each function must terminate with a
**RTN**instruction.

### Starting the Program

To start the Nonlinear Systems program:- Store the functions needed by the program, following the above listed rules.
- If any of the subroutines involve any of the trig functions, select the angle units you want to use.
- Select
**{ NON }**from the**MATHEMATICS**menu.

The program displays:

- Enter the number of functions and press
**{ n }**. - Enter the allowable error and press
**{ err }**. - Enter the number of iterations you want the program to perform
and press
**{ #it }**. - 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.

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.- 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.

- 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 }**.

**{ 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.

for example.

- 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. - 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.

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:- 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