76
8/6/2019 poymath4.0 http://slidepdf.com/reader/full/poymath40 1/76 VERSION 4.1 Provides System Printing from Windows 3.X, 95, 98 and NT USER-FRIENDLY NUMERICAL ANALYSIS PROGRAMS POLYMATH -SIMULTANEOUS DIFFERENTIAL EQUATIONS -SIMULTANEOUS ALGEBRAIC EQUATIONS -SIMULTANEOUS LINEAR EQUATIONS - POLYNOMIAL, MULTIPLE LINEAR AND NONLINEAR REGRESSION for IBM and Compatible Personal Computers Internet: http://www.polymath-software.com Users are encouraged to obtain the latest general informa- tion on POLYMATH and its use from the above Internet site. This will include updates on this version and availability of future versions. Michael B. Cutlip and Mordechai Shacham, the authors of POLYMATH , have published a new book entitled Problem Solving in Chemical Engineering with Numerical Methods . This book is a companion book for students and professional engineers who want to utilize the POLYMATH software to effectively and efficiently obtain solutions to realistic and com- plex problems. Details on this Prentice Hall book, ISBN 0-13- 862566-2, can be found on the preceding POLYMATH www site or at www.prenhall.com. VERSION 4.1 Provides System Printing from Windows 3.X, 95, 98 and NT USER-FRIENDLY NUMERICAL ANALYSIS PROGRAMS POLYMATH -SIMULTANEOUS DIFFERENTIAL EQUATIONS -SIMULTANEOUS ALGEBRAIC EQUATIONS -SIMULTANEOUS LINEAR EQUATIONS - POLYNOMIAL, MULTIPLE LINEAR AND NONLINEAR REGRESSION for IBM and Compatible Personal Computers Internet: http://www.polymath-software.com Users are encouraged to obtain the latest general informa- tion on POLYMATH and its use from the above Internet site. This will include updates on this version and availability of future versions. Michael B. Cutlip and Mordechai Shacham, the authors of POLYMATH , have published a new book entitled Problem Solving in Chemical Engineering with Numerical Methods . This book is a companion book for students and professional engineers who want to utilize the POLYMATH software to effectively and efficiently obtain solutions to realistic and com- plex problems. Details on this Prentice Hall book, ISBN 0-13- 862566-2, can be found on the preceding POLYMATH www site or at www.prenhall.com.

poymath4.0

Embed Size (px)

Citation preview

Page 1: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 1/76

VERSION 4.1Provides System Printing from Windows 3.X, 95, 98 and NT

USER-FRIENDLYNUMERICAL ANALYSIS

PROGRAMS

POLYMATH

- SIMULTANEOUS DIFFERENTIAL EQUATIONS- SIMULTANEOUS ALGEBRAIC EQUATIONS- SIMULTANEOUS LINEAR EQUATIONS- POLYNOMIAL, MULTIPLE LINEAR AND

NONLINEAR REGRESSION

for IBM and Compatible Personal Computers

Internet: http://www.polymath-software.com

Users are encouraged to obtain the latest general informa-tion on POLYMATH and its use from the above Internet site.This will include updates on this version and availability of future versions.

Michael B. Cutlip and Mordechai Shacham, the authors of POLYMATH , have published a new book entitled ProblemSolving in Chemical Engineering with Numerical Methods .This book is a companion book for students and professionalengineers who want to utilize the POLYMATH software toeffectively and efficiently obtain solutions to realistic and com-plex problems. Details on this Prentice Hall book, ISBN 0-13-862566-2, can be found on the preceding POLYMATH wwwsite or at www.prenhall.com.

VERSION 4.1Provides System Printing from Windows 3.X, 95, 98 and NT

USER-FRIENDLYNUMERICAL ANALYSIS

PROGRAMS

POLYMATH

- SIMULTANEOUS DIFFERENTIAL EQUATIONS- SIMULTANEOUS ALGEBRAIC EQUATIONS- SIMULTANEOUS LINEAR EQUATIONS- POLYNOMIAL, MULTIPLE LINEAR AND

NONLINEAR REGRESSION

for IBM and Compatible Personal Computers

Internet: http://www.polymath-software.com

Users are encouraged to obtain the latest general informa-tion on POLYMATH and its use from the above Internet site.This will include updates on this version and availability of future versions.

Michael B. Cutlip and Mordechai Shacham, the authors of POLYMATH , have published a new book entitled ProblemSolving in Chemical Engineering with Numerical Methods .This book is a companion book for students and professionalengineers who want to utilize the POLYMATH software toeffectively and efficiently obtain solutions to realistic and com-plex problems. Details on this Prentice Hall book, ISBN 0-13-862566-2, can be found on the preceding POLYMATH wwwsite or at www.prenhall.com.

Page 2: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 2/76

IBM and PC-DOS are trademark of International Business MachinesMS-DOS and Windows are trademarks of Microsoft Corporation

i -2 PREFACE POLYMATH 4.1 PC

Copyright © 1998 by M. Shacham and M. B. Cutlip

This manual may be reproduced for educational purposes by licensedusers.

IBM and PC-DOS are trademark of International Business MachinesMS-DOS and Windows are trademarks of Microsoft Corporation

i -2 PREFACE POLYMATH 4.1 PC

Copyright © 1998 by M. Shacham and M. B. Cutlip

This manual may be reproduced for educational purposes by licensedusers.

Page 3: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 3/76

Page 4: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 4/76

Page 5: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 5/76

Page 6: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 6/76

Page 7: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 7/76

Page 8: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 8/76

Page 9: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 9/76

An upper part of screen is contained within a partial enclosure:

A lower part of screen is shown by a partial enclosure:

An intermediate part of a screen is given between vertical lines:

The option box is given by:

KEYBOARD INFORMATION

When using POLYMATH , it is not necessary to remember a complexseries of keystrokes to respond to the menus, options, or prompts. Thecommands available to you are clearly labeled for easy use on each display.Normally the keystrokes which are available are given on the display asindicated on the PROBLEM OPTIONS display shown below.

POLYMATH 4.1 PC INTRODUCTION 1-3

DISPLAY PRESENTATION

Throughout this manual, a full screen is indicated by a total enclosure:

An upper part of screen is contained within a partial enclosure:

A lower part of screen is shown by a partial enclosure:

An intermediate part of a screen is given between vertical lines:

The option box is given by:

KEYBOARD INFORMATION

When using POLYMATH , it is not necessary to remember a complexseries of keystrokes to respond to the menus, options, or prompts. Thecommands available to you are clearly labeled for easy use on each display.Normally the keystrokes which are available are given on the display asindicated on the PROBLEM OPTIONS display shown below.

POLYMATH 4.1 PC INTRODUCTION 1-3

DISPLAY PRESENTATION

Throughout this manual, a full screen is indicated by a total enclosure:

Page 10: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 10/76

Page 11: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 11/76

The results of the internal calculations made by POLYMATH have atleast a precision of eight digits of significance. Results are presented withat least four significant digits such as xxx.x or x.xxx . All mathematicaloperations are performed as floating point calculations, so it is not necessaryto enter decimal points for real numbers.

MATHEMATICAL SYMBOLSYou can use familiar notation when indicating standard mathematical

operations.

Operator Meaning Symbol Entry+ addition + +

- subtraction - -x multiplication * * :- division / /

power of 10 x.x10 a x.xeax.xEa

(x.x is numerical with a decimal and a is an integer)exponentiation r s r**s or r^s

MATHEMATICAL FUNCTIONS

Useful functions will be recognized by POLYMATH when entered aspart of an expression. The arguments must be enclosed in parentheses:

ln (base e)abs (absolute value)sinarcsinsinhlog (base 10)

int (integer part)cosarccoscoshexpfrac (fractional part)tanarctantanh

exp2(2^x)round (rounds value)secarcsecarcsinhexp10 (10^x)sign (+1/0/-1)cscarccscarccoshsqrt (square root)cbrt (cube root)cotarccotarctanh

POLYMATH 4.1 PC INTRODUCTION 1-5

The results of the internal calculations made by POLYMATH have atleast a precision of eight digits of significance. Results are presented withat least four significant digits such as xxx.x or x.xxx . All mathematicaloperations are performed as floating point calculations, so it is not necessaryto enter decimal points for real numbers.

MATHEMATICAL SYMBOLSYou can use familiar notation when indicating standard mathematical

operations.

Operator Meaning Symbol Entry+ addition + +

- subtraction - -x multiplication * *

:- division / / power of 10 x.x10 a x.xea

x.xEa(x.x is numerical with a decimal and a is an integer)

exponentiation r s r**s or r^s

MATHEMATICAL FUNCTIONS

Useful functions will be recognized by POLYMATH when entered aspart of an expression. The arguments must be enclosed in parentheses:

ln (base e)abs (absolute value)sinarcsinsinhlog (base 10)

int (integer part)cosarccoscoshexpfrac (fractional part)tanarctantanh

exp2(2^x)round (rounds value)secarcsecarcsinhexp10 (10^x)

sign (+1/0/-1)cscarccscarccoshsqrt (square root)cbrt (cube root)cotarccotarctanh

POLYMATH 4.1 PC INTRODUCTION 1-5

Page 12: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 12/76

Page 13: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 13/76

Page 14: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 14/76

and then press the Return ( ) key.The Program Selection Menu should then appear:

C:\POLYMAT4 > polymath

Execution is started by entering "polymath" at the cursor

C:\POLYMAT4 >

GETTING STARTED 2-2 POLYMATH 4.1 PC

FIRST TIME EXECUTION OF POLYMATH

The execution of POLYMATH is started by first having your currentdirectory set to the subdirectory of the hard disk where POLYMATH

version 4.1 is stored. This is assumed to be C:\POLYMAT4

The desired POLYMATH program is then selected by entering theappropriate letter. You will then taken to the Main Program Menu of thatparticular program. Individual programs are discussed in later chapters of this manual.

and then press the Return ( ) key.The Program Selection Menu should then appear:

C:\POLYMAT4 > polymath

Execution is started by entering "polymath" at the cursor

C:\POLYMAT4 >

GETTING STARTED 2-2 POLYMATH 4.1 PC

FIRST TIME EXECUTION OF POLYMATH

The execution of POLYMATH is started by first having your currentdirectory set to the subdirectory of the hard disk where POLYMATH

version 4.1 is stored. This is assumed to be C:\POLYMAT4

The desired POLYMATH program is then selected by entering theappropriate letter. You will then taken to the Main Program Menu of thatparticular program. Individual programs are discussed in later chapters of this manual.

Page 15: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 15/76

POLYMATH 4.1 PC GETTING STARTED 2-3

EXITING POLYMATH PROGRAMThe best way to exit POLYMATH is to follow the instructions on the

program display. However, a Shift-¡F10 keypress ( ⇑F10) will stop the

execution of POLYMATH at any point in a program and will return the userto the Polymath Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM so be sure to store your problem as anindividual file or in the library before exiting the program in this manner. Aquery is made to determine if the user really wants to end the program in thismanner while losing the current problem.

This ⇑F10 keypress is one of the few POLYMATH commands whichis not always indicated in the various Display Menus. It is worth remember-ing.

POLYMATH 4.1 PC GETTING STARTED 2-3

EXITING POLYMATH PROGRAMThe best way to exit POLYMATH is to follow the instructions on the

program display. However, a Shift-¡F10 keypress ( ⇑F10) will stop the

execution of POLYMATH at any point in a program and will return the userto the Polymath Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM so be sure to store your problem as anindividual file or in the library before exiting the program in this manner. Aquery is made to determine if the user really wants to end the program in thismanner while losing the current problem.

This ⇑F10 keypress is one of the few POLYMATH commands whichis not always indicated in the various Display Menus. It is worth remember-ing.

Page 16: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 16/76

MAIN HELP MENU

Each individual POLYMATH program has a detailed help sectionwhich is available from many points in the program by pressing F6 whenindicated. The Help Menu allows the selection of the topic area for specifichelp as shown below for the Differential Equation Solver:

HELP

3-1 HELP POLYMATH 4.1 PC

For example, pressing "a" gives a discussion on entering the equations.

MAIN HELP MENU

Each individual POLYMATH program has a detailed help sectionwhich is available from many points in the program by pressing F6 whenindicated. The Help Menu allows the selection of the topic area for specifichelp as shown below for the Differential Equation Solver:

HELP

3-1 HELP POLYMATH 4.1 PC

For example, pressing "a" gives a discussion on entering the equations.

Page 17: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 17/76

The ⇑- F8 option to return to the program will take you to the display whereyou originally requested HELP

ACCESSING HELP BEFORE PROBLEM ENTRY

Once the current topic is completed, the Help Options Menu providesfor additional options as shown below:

POLYMATH 4.1 PC HELP 3-2

ACCESSING HELP DURING PROBLEM ENTRY

The Main Help Menu is reached during the startup of your POLY-MATH program from the Main Menu as shown below and from the Problem

Options Menu by pressing F6.

When you are entering a problem, the HELP MENU is available fromthe Problem Options Menu. This will allow you to obtain the necessary helpand return to the same point where the HELP MENU was originallyrequested. As an example, this access point is shown in the Problem OptionsMenu shown on the next page.

The ⇑- F8 option to return to the program will take you to the display whereyou originally requested HELP

ACCESSING HELP BEFORE PROBLEM ENTRY

Once the current topic is completed, the Help Options Menu providesfor additional options as shown below:

POLYMATH 4.1 PC HELP 3-2

ACCESSING HELP DURING PROBLEM ENTRY

The Main Help Menu is reached during the startup of your POLY-MATH program from the Main Menu as shown below and from the Problem

Options Menu by pressing F6.

When you are entering a problem, the HELP MENU is available fromthe Problem Options Menu. This will allow you to obtain the necessary helpand return to the same point where the HELP MENU was originallyrequested. As an example, this access point is shown in the Problem OptionsMenu shown on the next page.

Page 18: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 18/76

An F6 keypress brings up the same page help which provides a brief instruction inside the Calculator window.

3-3 HELP POLYMATH 4.1 PC

CALCULATOR HELPA detailed discussion of the POLYMATH Calculator is given in

Chapter 4 of this manual. The Calculator can be accessed from by pressingF4 from any point in a POLYMATH program.

UNIT CONVERSION HELP

The Unit Conversion Utility is discussed in Chapter 4 of this manual.There is no on-line help for this utility.

An F6 keypress brings up the same page help which provides a brief instruction inside the Calculator window.

3-3 HELP POLYMATH 4.1 PC

CALCULATOR HELPA detailed discussion of the POLYMATH Calculator is given in

Chapter 4 of this manual. The Calculator can be accessed from by pressingF4 from any point in a POLYMATH program.

UNIT CONVERSION HELP

The Unit Conversion Utility is discussed in Chapter 4 of this manual.There is no on-line help for this utility.

Page 19: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 19/76

Page 20: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 20/76

Page 21: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 21/76

Page 22: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 22/76

P=R*400/(0.8-b)-a/(0.8*0.8)CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=37.7148168

The value of a is calculated in the same manner yielding a value of

3.60609951. Finally P can be calculated as shown:

b=R*Tc/(8*Pc)CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=0.0428029012

After that you can type in Tc = 304.2 and R = 0.08206. To calculate b, youmust type in the complete expression as follows:

Pc=72.9CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=72.9.

One way to carry out this calculation is to store the numerical valuesin the named variables. First you can type in Pc = 72.9 and press to storethis value as shown below.

Where a = 2764

R2 Tc2

Pcb = RT c

8 P c

R = 0.08206, T c = 304.2 and P c = 72.9.

Example 2. In this example the pressure of carbon dioxide attemperature of T = 400 K and molal volume of V = 0.8 liter is calculatedusing the following equations:

P = RTV – b

– aV

2

4-4 UTILITIES POLYMATH 4.1 PC

P=R*400/(0.8-b)-a/(0.8*0.8)CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=37.7148168

The value of a is calculated in the same manner yielding a value of 3.60609951. Finally P can be calculated as shown:

b=R*Tc/(8*Pc)CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=0.0428029012

After that you can type in Tc = 304.2 and R = 0.08206. To calculate b, you

must type in the complete expression as follows:

Pc=72.9CALCULATOR: Enter an expression and press <ENTER> to evaluate it.

=72.9.

One way to carry out this calculation is to store the numerical valuesin the named variables. First you can type in Pc = 72.9 and press to storethis value as shown below.

Where a = 2764

R2 Tc2

Pcb = RT c

8 P c

R = 0.08206, T c = 304.2 and P c = 72.9.

Example 2. In this example the pressure of carbon dioxide attemperature of T = 400 K and molal volume of V = 0.8 liter is calculatedusing the following equations:

P = RTV – b

– aV

2

4-4 UTILITIES POLYMATH 4.1 PC

Page 23: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 23/76

Page 24: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 24/76

UNIT CONVERSION EXAMPLE

Suppose you want to convert 100 BTU's to kilo-calories. First youshould access the Unit Conversion Utility by pressing F5. This will bring up

the following optionsType the letter of the physical quantity for conversion.a) Energy b) Force c) Length d) Mass e) Powerf) Pressure g) Volume h) Temperature F8 or ESC to exit

Press "a" to specify an Energy conversion:

Type a "d" to specify Btu:

From units: Type in a letter (F9 to set a prefix first)a. joule b. erg c. cal d. Btu e. hp hr

f. ft lb f g. (liter)(atm) h. kwh

From units : Btu To units: (F9 for a prefix)a. joule b. erg c. cal d. Btu e. hp hrf. ft lb, g. (liter)(atm) h. kwm

Use F9 to indicate a Prefix:

Press the number of the needed prefix or F9 for none.1) deci 10 -1 2) centi 10 -2 3) milli 10 -3 4) micro 10 -6

5) deka 10 6) hecto 10 2 7) kilo 10 3 8) mega 10 6 9) giga 10 9

From units: Btu To units: kilo -a. joule b. erg c. cal d. Btu e. hp hrf. ft lb f g. (liter)(atm) h. kwh

From units: Btu To units: kilo-calNumerical value: 100100.00 Btu = 25.216 kilo-cal

Please indicate kilo by pressing the number 7.

Complete the units by pressing "c" for calories. Indicate the numericalvalue to be 100 and press enter:

4-6 UTILITIES POLYMATH 4.1 PC

UNIT CONVERSION EXAMPLE

Suppose you want to convert 100 BTU's to kilo-calories. First youshould access the Unit Conversion Utility by pressing F5. This will bring up

the following optionsType the letter of the physical quantity for conversion.a) Energy b) Force c) Length d) Mass e) Powerf) Pressure g) Volume h) Temperature F8 or ESC to exit

Press "a" to specify an Energy conversion:

Type a "d" to specify Btu:

From units: Type in a letter (F9 to set a prefix first)a. joule b. erg c. cal d. Btu e. hp hr

f. ft lb f g. (liter)(atm) h. kwh

From units : Btu To units: (F9 for a prefix)a. joule b. erg c. cal d. Btu e. hp hrf. ft lb, g. (liter)(atm) h. kwm

Use F9 to indicate a Prefix:

Press the number of the needed prefix or F9 for none.1) deci 10 -1 2) centi 10 -2 3) milli 10 -3 4) micro 10 -6

5) deka 10 6) hecto 10 2 7) kilo 10 3 8) mega 10 6 9) giga 10 9

From units: Btu To units: kilo -a. joule b. erg c. cal d. Btu e. hp hrf. ft lb f g. (liter)(atm) h. kwh

From units: Btu To units: kilo-calNumerical value: 100100.00 Btu = 25.216 kilo-cal

Please indicate kilo by pressing the number 7.

Complete the units by pressing "c" for calories. Indicate the numericalvalue to be 100 and press enter:

4-6 UTILITIES POLYMATH 4.1 PC

Page 25: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 25/76

Page 26: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 26/76

4-8 UTILITIES POLYMATH 4.1 PC

LIBRARY OPERATIONSThe Library is highly recommended for storing problems as the

titles of the problems are retained and displayed which is a considerableconvenience. Also, only the problems for the particular POLYMATHprogram in current use are displayed. The Library is accessed from the Task Menu by pressing F9 as shown below:

If there is no current Library on the desired subdirectory or floppy disk, thena Library is created.LIBRARY STORAGE

The Library Options menu allows the current POLYMATH problemto be stored by simply entering "S". The title as currently defined in theactive problem will be displayed. The user must choose a file name for thisparticular problem; however, it will then be displayed along with theProblem title as shown above.LIBRARY RETRIEVAL

The Library Options window allows the current POLYMATH prob-lem to be recalled by first using the cursor keys to direct the arrow to theproblem of interest and then entering "L". A window will confirm the libraryretrieval as shown below:

Problems may be deleted from the Library by using the arrow toidentify the problem, and then selecting "D" from the Library Options menu.Users are prompted to verify problem deletion.

4-8 UTILITIES POLYMATH 4.1 PC

LIBRARY OPERATIONSThe Library is highly recommended for storing problems as the

titles of the problems are retained and displayed which is a considerableconvenience. Also, only the problems for the particular POLYMATHprogram in current use are displayed. The Library is accessed from the Task Menu by pressing F9 as shown below:

If there is no current Library on the desired subdirectory or floppy disk, thena Library is created.LIBRARY STORAGE

The Library Options menu allows the current POLYMATH problemto be stored by simply entering "S". The title as currently defined in theactive problem will be displayed. The user must choose a file name for thisparticular problem; however, it will then be displayed along with theProblem title as shown above.LIBRARY RETRIEVAL

The Library Options window allows the current POLYMATH prob-lem to be recalled by first using the cursor keys to direct the arrow to theproblem of interest and then entering "L". A window will confirm the libraryretrieval as shown below:

Problems may be deleted from the Library by using the arrow toidentify the problem, and then selecting "D" from the Library Options menu.Users are prompted to verify problem deletion.

Page 27: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 27/76

PROBLEM OUTPUT AS PRINTED GRAPHICSOne of the most useful features of POLYMATH is the ability to create

graphical plots of the results of the numerical calculations. The commandto print graphical output is F3. The first step in printing graphical output isto display the desired output variables. The POLYMATH programs allowthe user to make plots of up to four variables versus another variable.

An example which will be used to demonstrate plotting is the Quick Tour Problem 1 from the next chapter. Here the POLYMATH DifferentialEquation Solver has produced a numerical solution to three simultaneousordinary differential equations. The calculations are summarized on aPartial Results display which has the following Display Options Menu:

SIMPLE SCREEN PLOTThe selection of "g" from the Display Options Menu allows the user

to select desired variables for plotting. A plot of variables A, B, and C versusthe independent variable t can be obtain by entering "A,B,C" at the cursorand pressing the Return key ( ).

The resulting graph is automatically scaled and presented on the screen.

POLYMATH 4.1 PC UTILITIES 4-9

PROBLEM OUTPUT AS PRINTED GRAPHICSOne of the most useful features of POLYMATH is the ability to create

graphical plots of the results of the numerical calculations. The commandto print graphical output is F3. The first step in printing graphical output isto display the desired output variables. The POLYMATH programs allowthe user to make plots of up to four variables versus another variable.

An example which will be used to demonstrate plotting is the Quick Tour Problem 1 from the next chapter. Here the POLYMATH DifferentialEquation Solver has produced a numerical solution to three simultaneousordinary differential equations. The calculations are summarized on aPartial Results display which has the following Display Options Menu:

SIMPLE SCREEN PLOTThe selection of "g" from the Display Options Menu allows the user

to select desired variables for plotting. A plot of variables A, B, and C versusthe independent variable t can be obtain by entering "A,B,C" at the cursorand pressing the Return key ( ).

The resulting graph is automatically scaled and presented on the screen.

POLYMATH 4.1 PC UTILITIES 4-9

Page 28: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 28/76

4-10 UTILITIES POLYMATH 4.1 PC

OPTIONAL SCREEN PLOTThe selection of "g" from the Display Options Menu with the entry of

"B/A" results in B plotted versus A. This demonstrates that dependentvariables can be plotted against each other.

PRESENTATION PLOTA simple plot can be printed directly or it can be modified before

printing by using options from the Graph Option Menu shown below:

This menu allow the user to modify the plot before printing as desired to

obtain a final presentation graphic with specified scaling and labels.PROBLEM OUTPUT TO SCREEN AND AS PRINTED TABLES

The Display Options Menu also allows the user to select tabularoutput from the Partial Results Display by pressing "t":

This is shown below for the same entry of "A, B, C" for the Quick TourProblem 1 from the next chapter on differential equations.

The output shown above gives variable values for the integration interval atselected intervals. The maximum number of points is determined by thenumerical integration algorithm. Output variable values for a smallernumber of points are determined by interpolation. A Screen Table can beprinted by using F3.

4-10 UTILITIES POLYMATH 4.1 PC

OPTIONAL SCREEN PLOTThe selection of "g" from the Display Options Menu with the entry of

"B/A" results in B plotted versus A. This demonstrates that dependentvariables can be plotted against each other.

PRESENTATION PLOTA simple plot can be printed directly or it can be modified before

printing by using options from the Graph Option Menu shown below:

This menu allow the user to modify the plot before printing as desired to

obtain a final presentation graphic with specified scaling and labels.PROBLEM OUTPUT TO SCREEN AND AS PRINTED TABLES

The Display Options Menu also allows the user to select tabularoutput from the Partial Results Display by pressing "t":

This is shown below for the same entry of "A, B, C" for the Quick TourProblem 1 from the next chapter on differential equations.

The output shown above gives variable values for the integration interval atselected intervals. The maximum number of points is determined by thenumerical integration algorithm. Output variable values for a smallernumber of points are determined by interpolation. A Screen Table can beprinted by using F3.

Page 29: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 29/76

Page 30: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 30/76

4-12 UTILITIES POLYMATH 4.1 PC

PROBLEM OUTPUT AS GRAPHICS FILESThis 4.1 version of POLYMATH creates Windows Meta files (WMFs)

that can be printed or entered into documents. These files are normallyprinted directly by special MetaFile Print programs for Windows 3.X(MFP16) or for Windows 95, 98, and NT (MFP32) . If these special printprograms are not running, the generated WMFs are found in the SPOOLsubdirectory under the POLYMAT4 directory. Thus the user can place thesefile directly into word processors and desktop publishing software. Detailsof this option are found in Chapter 9 of this manual. A typical examplewould be to create the following output in a WMF file for inclusion in awritten reporting using word processing or desktop publishing. Theproblem is again the for Quick Tour Problem 1 from the next chapter. Notethat the figure below has utilized the title and axis definition options.

4-12 UTILITIES POLYMATH 4.1 PC

PROBLEM OUTPUT AS GRAPHICS FILESThis 4.1 version of POLYMATH creates Windows Meta files (WMFs)

that can be printed or entered into documents. These files are normallyprinted directly by special MetaFile Print programs for Windows 3.X(MFP16) or for Windows 95, 98, and NT (MFP32) . If these special printprograms are not running, the generated WMFs are found in the SPOOLsubdirectory under the POLYMAT4 directory. Thus the user can place thesefile directly into word processors and desktop publishing software. Detailsof this option are found in Chapter 9 of this manual. A typical examplewould be to create the following output in a WMF file for inclusion in awritten reporting using word processing or desktop publishing. Theproblem is again the for Quick Tour Problem 1 from the next chapter. Notethat the figure below has utilized the title and axis definition options.

Page 31: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 31/76

DIFFERENTIAL EQUATION SOLVER

then press the Return ( ) key. The Program Selection Menu should thenappear, and you should enter "1" to select the Simultaneous DifferentialEquation Solver. This should bring up the Main Program Menu:

C:\POLYMATH4 > polymath

QUICK TOURThis section is intended to give you a very quick indication of the

operation of the POLYMATH Differential Equation Solver Program.

DIFFERENTIAL EQUATION SOLVERThe program allows the numerical integration of up to 31 simulta-

neous nonlinear ordinary differential equations and explicit algebraic ex-pressions. All equations are checked for syntax upon entry. Equations areeasily modified. Undefined variables are identified. The integration methodand stepsize are automatically selected; however, a stiff algorithm may bespecified if desired. Graphical output of problem variables is easily obtainedwith automatic scaling.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory or floppy drive containing the POLYMATH package. Atthe prompt (assumed C:\POLYMAT4 here), you should enter "polymath"

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5 -1

DIFFERENTIAL EQUATION SOLVER

then press the Return ( ) key. The Program Selection Menu should thenappear, and you should enter "1" to select the Simultaneous DifferentialEquation Solver. This should bring up the Main Program Menu:

C:\POLYMATH4 > polymath

QUICK TOURThis section is intended to give you a very quick indication of the

operation of the POLYMATH Differential Equation Solver Program.

DIFFERENTIAL EQUATION SOLVERThe program allows the numerical integration of up to 31 simulta-

neous nonlinear ordinary differential equations and explicit algebraic ex-pressions. All equations are checked for syntax upon entry. Equations areeasily modified. Undefined variables are identified. The integration methodand stepsize are automatically selected; however, a stiff algorithm may bespecified if desired. Graphical output of problem variables is easily obtainedwith automatic scaling.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory or floppy drive containing the POLYMATH package. Atthe prompt (assumed C:\POLYMAT4 here), you should enter "polymath"

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5 -1

Page 32: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 32/76

Now that POLYMATH is loaded, please press F6 and then the letter "a" toget information on "Entering the equations". The first page of the HelpSection should be on your screen as shown here:

5-2 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

k A = 1.0; k B = 2.0

In these equations, the parameter k A is to be constant at a value of 1.0 and theparameter k B is to be constant at the value of 2.0. The initial condition fordependent variable "A" is to be 1.0 when the initial value of the independentvariable "t" is zero. The initial conditions for dependent variables "B" and"C" are both zero. The solution for the three differential equations is desiredfor the independent variable "t" between zero and 3.0. Thus this problem willbe entered by using the three differential equations as given above along withtwo expressions for the values for k A and k B given by:

d(A) / d(t) = - k A (A)d(B) / d(t) = k A (A) - k B (B)d(C) / d(t) = k B(B)

Please press F8 to return from the Help to the program, and then press theEnter key ( )to continue this Quick Tour example.

SOLVING A SYSTEM OF DIFFERENTIAL EQUATIONSLet us now enter and solve a system of three simultaneous differential

equations:

Now that POLYMATH is loaded, please press F6 and then the letter "a" toget information on "Entering the equations". The first page of the HelpSection should be on your screen as shown here:

5-2 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

k A = 1.0; k B = 2.0

In these equations, the parameter k A is to be constant at a value of 1.0 and theparameter k B is to be constant at the value of 2.0. The initial condition fordependent variable "A" is to be 1.0 when the initial value of the independentvariable "t" is zero. The initial conditions for dependent variables "B" and"C" are both zero. The solution for the three differential equations is desiredfor the independent variable "t" between zero and 3.0. Thus this problem willbe entered by using the three differential equations as given above along withtwo expressions for the values for k A and k B given by:

d(A) / d(t) = - k A (A)d(B) / d(t) = k A (A) - k B (B)d(C) / d(t) = k B(B)

Please press F8 to return from the Help to the program, and then press theEnter key ( )to continue this Quick Tour example.

SOLVING A SYSTEM OF DIFFERENTIAL EQUATIONSLet us now enter and solve a system of three simultaneous differential

equations:

Page 33: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 33/76

Page 34: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 34/76

ALTERING THE EQUATIONSAfter you have entered the equations, please press with no

equation at the arrow to go to the Problem Options display which will allowneeded corrections:

The Problem Options Menu allows you to make a number of alter-ations on the equations which have been entered. Please make sure that yourequations all have been entered as shown above. Remember to first indicatethe equation that needs altering by using the arrow keys. When all equationare correct, press ⇑ F7 (keep pressing shift while pressing F7) to continuewith the problem solution.

ENTERING THE BOUNDARY CONDITIONSAt this point you will be asked to provide the initial values for the

independent variable and each of the dependent variables defined by thedifferential equations.

Enter initial value for t_

Please indicate this value to be the number "0" and press Return.The next initial value request is for variable "A". Please this value as

the value "1."

Enter initial value for A1 _

5-4 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

ALTERING THE EQUATIONSAfter you have entered the equations, please press with no

equation at the arrow to go to the Problem Options display which will allowneeded corrections:

The Problem Options Menu allows you to make a number of alter-ations on the equations which have been entered. Please make sure that yourequations all have been entered as shown above. Remember to first indicatethe equation that needs altering by using the arrow keys. When all equationare correct, press ⇑ F7 (keep pressing shift while pressing F7) to continuewith the problem solution.

ENTERING THE BOUNDARY CONDITIONSAt this point you will be asked to provide the initial values for the

independent variable and each of the dependent variables defined by thedifferential equations.

Enter initial value for t_

Please indicate this value to be the number "0" and press Return.The next initial value request is for variable "A". Please this value as

the value "1."

Enter initial value for A1 _

5-4 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

Page 35: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 35/76

The initial values for B and C will be requested if they have not beenpreviously entered. Please enter the number "0" for each of these variables.

Next the final value for t, the independent variable, will be requested.Set this parameter at "3":

Enter final value for t3 _

As soon as the problem is completely specified, then the solution willbe generated. However, if you corrected some of your entries, then you mayneed to press ⇑ F7 again to request the solution. Note that a title such as"Quick Tour Problem 1" could have been entered from the Problem OptionMenu.

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5-5

SOLVING THE PROBLEMThe numerical solution is usually very fast. For slower computers,

an arrow will indicate the progress in the independent variable during theintegration. Usually the solution will be almost instantaneous. The screendisplay after the solution is given below:

The initial values for B and C will be requested if they have not beenpreviously entered. Please enter the number "0" for each of these variables.

Next the final value for t, the independent variable, will be requested.Set this parameter at "3":

Enter final value for t3 _

As soon as the problem is completely specified, then the solution willbe generated. However, if you corrected some of your entries, then you mayneed to press ⇑ F7 again to request the solution. Note that a title such as"Quick Tour Problem 1" could have been entered from the Problem OptionMenu.

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5-5

SOLVING THE PROBLEMThe numerical solution is usually very fast. For slower computers,

an arrow will indicate the progress in the independent variable during theintegration. Usually the solution will be almost instantaneous. The screendisplay after the solution is given below:

Page 36: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 36/76

Another Return keypress gives the partial Results Table whichsummarizes the variables of the problem as shown below:

The Partial Results Table shown above provides a summary of thenumerical simulation. To display or store the results you can enter "t"(tabular display), "g" (graphical display), or "d" (storing the results on aDOS file). This Table may be printed with the function key F3.

PLOTTING THE RESULTSLet us now plot the variable from this Problem 1 by entering "g" for

a graphical presentation. When asked to type in the variable for plotting,please enter the input indicated below at the arrow:

Type in the names of up to four (4) variables separated by commas (,)

and optionally one 'independent' variable preceded by a slash(/).For example, myvar1, myvar2/timevar

A Return keypress ( ) will indicate the end of the variables and shouldgenerate the graphical plot on the next page of the specified variables A, B,and C versus t, the independent variable, for this example.

A, B, C __

5-6 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

Another Return keypress gives the partial Results Table whichsummarizes the variables of the problem as shown below:

The Partial Results Table shown above provides a summary of thenumerical simulation. To display or store the results you can enter "t"(tabular display), "g" (graphical display), or "d" (storing the results on aDOS file). This Table may be printed with the function key F3.

PLOTTING THE RESULTSLet us now plot the variable from this Problem 1 by entering "g" for

a graphical presentation. When asked to type in the variable for plotting,please enter the input indicated below at the arrow:

Type in the names of up to four (4) variables separated by commas (,)

and optionally one 'independent' variable preceded by a slash(/).For example, myvar1, myvar2/timevar

A Return keypress ( ) will indicate the end of the variables and shouldgenerate the graphical plot on the next page of the specified variables A, B,and C versus t, the independent variable, for this example.

A, B, C __

5-6 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

Page 37: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 37/76

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5-7

Suppose that you want to plot variable B versus variable A. Select theoption "g" from the Display Options Menu and enter B/A when asked forthe variable names.

Type in the names of up to four (4) variables separated by commas (,)and optionally one 'independent' variable preceded by a slash(/).For example, myvar1, myvar2/timevar

B/A

This will results in a scaled plot for variable B versus variable A.

This concludes the Quick Tour problem using the Differential

Equation Solver. If you wish to stop working on POLYMATH , pleasefollow the exiting instructions given below.

EXITING OR RESTARTING POLYMATH

A⇑- F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM. The program can be exited or restarted fromthe Program Selection Menu.

POLYMATH 4.1 PC DIFFERENTIAL EQUATIONS 5-7

Suppose that you want to plot variable B versus variable A. Select theoption "g" from the Display Options Menu and enter B/A when asked forthe variable names.

Type in the names of up to four (4) variables separated by commas (,)and optionally one 'independent' variable preceded by a slash(/).For example, myvar1, myvar2/timevar

B/A

This will results in a scaled plot for variable B versus variable A.

This concludes the Quick Tour problem using the Differential

Equation Solver. If you wish to stop working on POLYMATH , pleasefollow the exiting instructions given below.

EXITING OR RESTARTING POLYMATH

A⇑- F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM. The program can be exited or restarted fromthe Program Selection Menu.

Page 38: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 38/76

Page 39: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 39/76

Page 40: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 40/76

5-10 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

"Solution process halted because it was not going anywhere."This message usually appears when the problem is very stiff, and the

default RKF algorithm is used for integration. The stiff algorithm shouldbe used, or the interval of integration should be reduced. If the error message

persists, there are probably errors in the problem setup or input. Pleasecheck for errors in the basic equation set, the POLYMATH equation entry,and the numerical values and the units of the variables.

.

5-10 DIFFERENTIAL EQUATIONS POLYMATH 4.1 PC

"Solution process halted because it was not going anywhere."This message usually appears when the problem is very stiff, and the

default RKF algorithm is used for integration. The stiff algorithm shouldbe used, or the interval of integration should be reduced. If the error message

persists, there are probably errors in the problem setup or input. Pleasecheck for errors in the basic equation set, the POLYMATH equation entry,and the numerical values and the units of the variables.

.

Page 41: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 41/76

POLYMATH 4.1 PC NONLINEAR ALGEBRAIC EQUATIONS 6-1

QUICK TOURThis chapter is intended to give a very brief discussion of the

operation of the POLYMATH Nonlinear Algebraic Equation Solver.

NONLINEAR ALGEBRAIC EQUATION SOLVERThe user can solve up to a combination of 32 simultaneous nonlinear

equations and explicit algebraic expressions. Only real (non-complex) rootsare found. All equations are checked for correct syntax and other errors uponentry. Equations can be easily be modified, added or deleted. Multiple rootsare given for a single equation.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory or floppy drive containing the POLYMATH package. Atthe prompt (assumed C:\POLYMAT4 here), you should enter "polymath"

C:\ POLYMAT 4>polymaththen press the Return ( ) key. The Main Program Menu should thenappear: The Program Selection Menu should then appear, and you shouldenter "2" to select the Simultaneous Algebraic Equation Solver.

ALGEBRAIC EQUATION SOLVER

POLYMATH 4.1 PC NONLINEAR ALGEBRAIC EQUATIONS 6-1

QUICK TOURThis chapter is intended to give a very brief discussion of the

operation of the POLYMATH Nonlinear Algebraic Equation Solver.

NONLINEAR ALGEBRAIC EQUATION SOLVERThe user can solve up to a combination of 32 simultaneous nonlinear

equations and explicit algebraic expressions. Only real (non-complex) rootsare found. All equations are checked for correct syntax and other errors uponentry. Equations can be easily be modified, added or deleted. Multiple rootsare given for a single equation.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory or floppy drive containing the POLYMATH package. Atthe prompt (assumed C:\POLYMAT4 here), you should enter "polymath"

C:\ POLYMAT 4>polymaththen press the Return ( ) key. The Main Program Menu should thenappear: The Program Selection Menu should then appear, and you shouldenter "2" to select the Simultaneous Algebraic Equation Solver.

ALGEBRAIC EQUATION SOLVER

Page 42: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 42/76

Once that POLYMATH is loaded, please utilize the Help Menu by pressingF6 and then the letter "a" to obtain details on in order to learn how to inputthe equations. The first page of this Help Section is given below:

This Help Section gives detailed information for entering the nonlinear andauxiliary equations. Press F8 to return from the Help Section to the program,and then press the Enter key ( ) to enter an equation for the first Quick Tour example. The Problem Options Menu at the bottom of your displayallows entry of equations with the keypress of "a". Now you are ready forthe first problem.

6-2 NONLINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

Once that POLYMATH is loaded, please utilize the Help Menu by pressingF6 and then the letter "a" to obtain details on in order to learn how to inputthe equations. The first page of this Help Section is given below:

This Help Section gives detailed information for entering the nonlinear andauxiliary equations. Press F8 to return from the Help Section to the program,and then press the Enter key ( ) to enter an equation for the first Quick Tour example. The Problem Options Menu at the bottom of your displayallows entry of equations with the keypress of "a". Now you are ready forthe first problem.

6-2 NONLINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

Page 43: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 43/76

O h h i d l l ⇑F7 O h h i d l l ⇑F7

Page 44: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 44/76

Once you have the equation entered properly, please press ⇑F7 tosolve the problem. You will then be asked to provide the interval over whichyou wish to find solutions for the equation. This interval is only requestedduring the solution of a single nonlinear equation.

Please indicate the x min to be 1 and press ( ). Then indicate x max to be 4and press ( ).

The entire problem is then display above the Problem Options Menu:

For this single equation, the solution is presented graphically over thesearch range which you indicated. The solution is where the function f(x)is equal to zero. POLYMATH has the ability to determine multiple solutionsto a single equation problem, and the first of two solutions is shown below:

6-4 NONLINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

Once you have the equation entered properly, please press ⇑F7 tosolve the problem. You will then be asked to provide the interval over whichyou wish to find solutions for the equation. This interval is only requestedduring the solution of a single nonlinear equation.

Please indicate the x min to be 1 and press ( ). Then indicate x max to be 4and press ( ).

The entire problem is then display above the Problem Options Menu:

For this single equation, the solution is presented graphically over thesearch range which you indicated. The solution is where the function f(x)is equal to zero. POLYMATH has the ability to determine multiple solutionsto a single equation problem, and the first of two solutions is shown below:

6-4 NONLINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

Page 45: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 45/76

Page 46: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 46/76

Page 47: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 47/76

Page 48: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 48/76

Page 49: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 49/76

LINEAR EQUATION SOLVER

POLYMATH 4.1 PC LINEAR ALGEBRAIC EQUATIONS 7-1

QUICK TOURThis chapter is intended to give a very brief discussion of the

operation of the POLYMATH Linear Equation Solver.

LINEAR EQUATION SOLVERThe user can solve up to a combination of 32 simultaneous linear

equations. The equations are entered in matrix form.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory containing the POLYMATH package. At the prompt(assumed C:\POLYMAT4 here), you should enter "polymath"

C:\ POLYMAT 4>polymaththen press the Return ( ) key. The Main Program Menu should thenappear: The Program Selection Menu should then appear, and you shouldenter "3" on the keyboard to select the Linear Equation Solver.

LINEAR EQUATION SOLVER

POLYMATH 4.1 PC LINEAR ALGEBRAIC EQUATIONS 7-1

QUICK TOURThis chapter is intended to give a very brief discussion of the

operation of the POLYMATH Linear Equation Solver.

LINEAR EQUATION SOLVERThe user can solve up to a combination of 32 simultaneous linear

equations. The equations are entered in matrix form.

STARTING POLYMATH

To begin, please have POLYMATH loaded into your computer asdetailed in Chapter 2. Here it is assumed that your computer is set to the harddisk subdirectory containing the POLYMATH package. At the prompt(assumed C:\POLYMAT4 here), you should enter "polymath"

C:\ POLYMAT 4>polymaththen press the Return ( ) key. The Main Program Menu should thenappear: The Program Selection Menu should then appear, and you shouldenter "3" on the keyboard to select the Linear Equation Solver.

Once that POLYMATH is loaded, please utilize the Help Menu by pressing Once that POLYMATH is loaded, please utilize the Help Menu by pressing

Page 50: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 50/76

F6 for information regarding the use of the Linear Equation Solver. ThisHelp Section is given below:

This Help Section gives detailed information for entering a system

of linear equations. Press any key to return from the Help Section to theprogram, and your display should be at the Main Menu for the LinearEquation Solver. (An alternate command to reach the Main Menu is the⇑F10 keypress.)

To begin the first Quick Tour example, please press the Return key( ) from the Main Menu. This will give the Task Menu as shown below:

7-2 LINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

F6 for information regarding the use of the Linear Equation Solver. ThisHelp Section is given below:

This Help Section gives detailed information for entering a system

of linear equations. Press any key to return from the Help Section to theprogram, and your display should be at the Main Menu for the LinearEquation Solver. (An alternate command to reach the Main Menu is the⇑F10 keypress.)

To begin the first Quick Tour example, please press the Return key( ) from the Main Menu. This will give the Task Menu as shown below:

7-2 LINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

SOLVING FIVE SIMULTANEOUS LINEAR EQUATIONS SOLVING FIVE SIMULTANEOUS LINEAR EQUATIONS

Page 51: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 51/76

POLYMATH 4.1 PC LINEAR ALGEBRAIC EQUATIONS 7-3

A typical problem for simultaneous linear equations is given belowfor the variables x1 through x5:

x1 + 0.5 x2 + 0.333333 x3 + 0.25 x4 + 0.2 x5 = 0.00.5 x1 + 0.333333 x2 + 0.25 x3 + 0.2 x4 + 0.166667 x5 = 1.00.333333 x1 + 0.25 x2 + 0.2 x3 + 0.166667 x4 + 0.142857 x5 = 0.00.25 x1 + 0.2 x2 + 0.166667 x3 + 0.142857 x4 + 0.125 x5 = 0.00.2 x1 + 0.166667 x2 + 0.142857 x3 + 0.125 x4 + 0.111111 x5 = 0.0

The above problem in stored as a Sample Problem in POLYMATH.To recall the above problem, press F7 from the Task Menu of the LinearEquation Solver. Then select problem number "2" to obtain the Problem

Options Menu shown below:

Solve this system of equations by pressing F7 which should yieldthe results and the Display Options Menu on the next page. Remember thatthis keypress combination is accomplished by pressing and holding theShift key and then pressing the F7 function key.

POLYMATH 4.1 PC LINEAR ALGEBRAIC EQUATIONS 7-3

A typical problem for simultaneous linear equations is given belowfor the variables x1 through x5:

x1 + 0.5 x2 + 0.333333 x3 + 0.25 x4 + 0.2 x5 = 0.00.5 x1 + 0.333333 x2 + 0.25 x3 + 0.2 x4 + 0.166667 x5 = 1.00.333333 x1 + 0.25 x2 + 0.2 x3 + 0.166667 x4 + 0.142857 x5 = 0.00.25 x1 + 0.2 x2 + 0.166667 x3 + 0.142857 x4 + 0.125 x5 = 0.00.2 x1 + 0.166667 x2 + 0.142857 x3 + 0.125 x4 + 0.111111 x5 = 0.0

The above problem in stored as a Sample Problem in POLYMATH.To recall the above problem, press F7 from the Task Menu of the LinearEquation Solver. Then select problem number "2" to obtain the Problem

Options Menu shown below:

Solve this system of equations by pressing F7 which should yieldthe results and the Display Options Menu on the next page. Remember thatthis keypress combination is accomplished by pressing and holding theShift key and then pressing the F7 function key.

Lets explore making changes to this system of equations. This isaccomplishedbyfirstpressing ⇑ to"makechanges" to theproblem Use

Lets explore making changes to this system of equations. This is⇑

Page 52: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 52/76

Please solve the problem by pressing ⇑F7. The results are shownbelow:

This concludes the Quick Tour Problem for Simultaneous Linear Equations.When you are ready to leave this program and return to the ProgramSelection Menu, use the ⇑F10 keypress which is discussed below.

EXITING OR RESTARTING POLYMATH

A ⇑F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM. The program can be exited or restarted fromthe Program Selection Menu.

7-4 LINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

accomplished by first pressing ⇑ to "make changes" to the problem. Usethe arrow keys to take the highlighted box to the top of the "b" of constantsfor the equation. Please delete the 0 and enter 1.0 in this box whichcorresponds to changing the first linear equation to:

x1 + 0.5 x2 + 0.333333 x3 + 0.25 x4 + 0.2 x5 = 1.0

This involves using the arrow key and pressing the return key ( ) when thehighlighted box is in the desired location as shown.

Then enter the new value at the cursor:

Please solve the problem by pressing ⇑F7. The results are shownbelow:

This concludes the Quick Tour Problem for Simultaneous Linear Equations.

When you are ready to leave this program and return to the ProgramSelection Menu, use the ⇑F10 keypress which is discussed below.

EXITING OR RESTARTING POLYMATH

A ⇑F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM. The program can be exited or restarted fromthe Program Selection Menu.

7-4 LINEAR ALGEBRAIC EQUATIONS POLYMATH 4.1 PC

accomplished by first pressing ⇑ to "make changes" to the problem. Usethe arrow keys to take the highlighted box to the top of the "b" of constantsfor the equation. Please delete the 0 and enter 1.0 in this box which

corresponds to changing the first linear equation to:x1 + 0.5 x2 + 0.333333 x3 + 0.25 x4 + 0.2 x5 = 1.0

This involves using the arrow key and pressing the return key ( ) when thehighlighted box is in the desired location as shown.

Then enter the new value at the cursor:

Page 53: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 53/76

within POLYMATH , the polynomial expression has the form:2 n

within POLYMATH , the polynomial expression has the form:P( ) 2 n

Page 54: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 54/76

P(x) = a 0 + a 1x + a 2x2 +... + a nxn

where y is the dependent variable, x is the independent variable, and theparameters are a 0 ...an. Variable "n" here represents the degree of thepolynomial. In POLYMATH , the maximum degree which is shown is 5.The above polynomial expression gives a relationship between the depen-dent variable and the independent variable which is obtained by determiningthe parameters according to a least squares objective function. Data pointsare usually available which give x and y values from which the parametersa0... a n can be determined.

8 -2 REGRESSION POLYMATH 4.1 PC

RECALLING SAMPLE PROBLEM 3After pressing F7 at the Main Program Menu, the Sample ProblemsMenu should appear on your screen as shown on the next page.. The sampleproblem to be discussed should be retrieved by pressing "3" on the keyboard.This will result in the Problem Options Display which includes 10 datapoints of x and y as shown on the next page.

P(x) = a 0 + a 1x + a 2x2 +... + a nxn

where y is the dependent variable, x is the independent variable, and theparameters are a 0 ...a n. Variable "n" here represents the degree of the

polynomial. In POLYMATH , the maximum degree which is shown is 5.The above polynomial expression gives a relationship between the depen-dent variable and the independent variable which is obtained by determiningthe parameters according to a least squares objective function. Data pointsare usually available which give x and y values from which the parametersa0... a n can be determined.

8 -2 REGRESSION POLYMATH 4.1 PC

RECALLING SAMPLE PROBLEM 3After pressing F7 at the Main Program Menu, the Sample ProblemsMenu should appear on your screen as shown on the next page.. The sampleproblem to be discussed should be retrieved by pressing "3" on the keyboard.This will result in the Problem Options Display which includes 10 datapoints of x and y as shown on the next page.

Page 55: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 55/76

POLYMATH 4.1 PC REGRESSION 8 -3 POLYMATH 4.1 PC REGRESSION 8 -3

FITTING A POLYNOMIALThe Problem Options Menu includes problem editing, library, print-

FITTING A POLYNOMIALThe Problem Options Menu includes problem editing, library, print-

Page 56: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 56/76

After pressing "p" (lower case), you should be asked for the name of theindependent variable's column, as shown below:

You should enter a capital "X" (upper case) as name of the independentvariable and press . The same question regarding the dependent variablewill be presented. Please enter a capital "Y" (upper case) at the arrow. Thefollowing display should appear:

8-4 REGRESSION POLYMATH 4.1 PC

p p g y ping, help and solution options. To fit a polynomial to the data of Y versusX you should select the " ⇑F7 to fit a curve or do regression" option. After

pressing⇑

F7 the following "Solution Options" menu appears:

After pressing "p" (lower case), you should be asked for the name of theindependent variable's column, as shown below:

You should enter a capital "X" (upper case) as name of the independentvariable and press . The same question regarding the dependent variablewill be presented. Please enter a capital "Y" (upper case) at the arrow. Thefollowing display should appear:

8-4 REGRESSION POLYMATH 4.1 PC

ing, help and solution options. To fit a polynomial to the data of Y versusX you should select the " ⇑F7 to fit a curve or do regression" option. After

pressing⇑

F7 the following "Solution Options" menu appears:

On this display the coefficients of the polynomial P(x), up to the fifthorder are shown together with the value of the variance. One of the

On this display the coefficients of the polynomial P(x), up to the fifthorder are shown together with the value of the variance. One of the

Page 57: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 57/76

polynomials is highlighted by having a box around it. This is the lowestorder polynomial, such that higher order polynomial does not give signifi-cantly better fit. The same polynomial is also plotted versus the experimen-tal data. Other polynomials can be highlighted and plotted by pressing anumber between 1 and 5. There are many additional calculations and otheroperations that can be carried out using the selected polynomial. Pleasemake sure the highlighted box is on the 4th degree polynomial. Let us findthe value of X for Y = 10. To do that you should press "y" and enter afterthe prompt regarding the value of Y: "10". The following display results:

POLYMATH 4.1 PC REGRESSION 8-5

The resultant X values are shown both graphically and numerically.For Y = 10 there are two X values, X = 1.36962 and X = 5.83496.

FITTING A CUBIC SPLINEWe will now fit a cubic spline to these data of Sample Problem 3.

Please press F8 two times to return to the Problems Options Menu. Thenpress ⇑F7 to "fit a curve or do regression". The Solutions Options Menushould appear.

gpolynomials is highlighted by having a box around it. This is the lowestorder polynomial, such that higher order polynomial does not give signifi-cantly better fit. The same polynomial is also plotted versus the experimen-tal data. Other polynomials can be highlighted and plotted by pressing anumber between 1 and 5. There are many additional calculations and otheroperations that can be carried out using the selected polynomial. Pleasemake sure the highlighted box is on the 4th degree polynomial. Let us findthe value of X for Y = 10. To do that you should press "y" and enter afterthe prompt regarding the value of Y: "10". The following display results:

POLYMATH 4.1 PC REGRESSION 8-5

The resultant X values are shown both graphically and numerically.For Y = 10 there are two X values, X = 1.36962 and X = 5.83496.

FITTING A CUBIC SPLINEWe will now fit a cubic spline to these data of Sample Problem 3.

Please press F8 two times to return to the Problems Options Menu. Thenpress ⇑F7 to "fit a curve or do regression". The Solutions Options Menushould appear.

Page 58: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 58/76

Enter "s" (lower case) for a cubic spline followed by "X" and then "Y".The following display should present the results:

EVALUATION OF AN INTEGRAL WITH THE CUBIC SPLINE

Press and then enter "6" at the arrow for the find value of theintegration.

Press to have the resulting integration shown on the next dis-play with both graphical and numerical results:

Please take options "i" and request the initial value for the integrationto be "1" at the arrow:

8-6 REGRESSION POLYMATH 4.1 PC

Enter "s" (lower case) for a cubic spline followed by "X" and then "Y".The following display should present the results:

EVALUATION OF AN INTEGRAL WITH THE CUBIC SPLINE

Press and then enter "6" at the arrow for the find value of theintegration.

Press to have the resulting integration shown on the next dis-play with both graphical and numerical results:

Please take options "i" and request the initial value for the integrationto be "1" at the arrow:

8-6 REGRESSION POLYMATH 4.1 PC

Page 59: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 59/76

POLYMATH 4.1 PC REGRESSION 8-7

Please press any key to end this Sample Problem 3.

MULTIPLE LINEAR REGRESSIONIt will often be useful to fit a linear function of the form:

y(x) = a 0 + a 1x1 + a 2 x2 +... + a nxn

where x 1, x 2, ..., x n are n independent variables and y is the dependent

variable, to a set of N tabulated values of x 1,i, x 2,i, ... and y (x i). We willexamine this option using Sample Problem 4.

RECALLING SAMPLE PROBLEM 4First exit to the main title page by pressing ⇑F10. Press F7 to access

the Sample Problems Menu, and select problem number 4 by pressing "4".(The problem display is shown on the next page).

POLYMATH 4.1 PC REGRESSION 8-7

Please press any key to end this Sample Problem 3.

MULTIPLE LINEAR REGRESSIONIt will often be useful to fit a linear function of the form:

y(x) = a 0 + a 1x1 + a 2 x2 +... + a nxn

where x 1, x 2, ..., x n are n independent variables and y is the dependent

variable, to a set of N tabulated values of x 1,i, x 2,i, ... and y (x i). We willexamine this option using Sample Problem 4.

RECALLING SAMPLE PROBLEM 4

First exit to the main title page by pressing ⇑F10. Press F7 to accessthe Sample Problems Menu, and select problem number 4 by pressing "4".(The problem display is shown on the next page).

Page 60: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 60/76

8 -8 REGRESSION POLYMATH 4.1 PC

SOLVING SAMPLE PROBLEM 4After you press ⇑F7 "to fit a curve or do regression", the following

Solution Options Menu should appear:

This time press "l" (lower case letter "l") to do "linear regression". You willbe prompted for the first independent variable (column) name.

Please type in "X1" at the arrow and press . You will be prompted for the2nd independent variable. Enter "X2" as the second independent variablename and press once again. A prompt for the 3rd independent variablewill appear. You should press here without typing in anything else,since there are no additional independent variables.

8 -8 REGRESSION POLYMATH 4.1 PC

SOLVING SAMPLE PROBLEM 4After you press ⇑F7 "to fit a curve or do regression", the following

Solution Options Menu should appear:

This time press "l" (lower case letter "l") to do "linear regression". You willbe prompted for the first independent variable (column) name.

Please type in "X1" at the arrow and press . You will be prompted for the2nd independent variable. Enter "X2" as the second independent variablename and press once again. A prompt for the 3rd independent variablewill appear. You should press here without typing in anything else,since there are no additional independent variables.

At the prompt for the dependent variable (column) name shownbelow you should type "Y" and press .

At the prompt for the dependent variable (column) name shownbelow you should type "Y" and press .

Page 61: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 61/76

POLYMATH 4.1 PC REGRESSION 8-9

Once the calculations are completed, the linear regression (or correla-tion) is presented in numerical and graphical form.

Please note that the correlation the equation for variable "Y" has theform of the linear expression: Y = a 0 + a 1X1 + a 2X2 where a 0 = 9.43974,a1 = -0.1384 and a 2 = 3.67961. This graphical display of Sample Problem

4 presents the regression data versus the calculated values from the linearregression. The numerical value of the variance and the number of thepositive and negative residuals give an indication regarding the validity of the assumption that Y can be represented as linear function of X1 and X2.The results in this case indicate a good fit between the observed data and thecorrelation function.

POLYMATH 4.1 PC REGRESSION 8-9

Once the calculations are completed, the linear regression (or correla-tion) is presented in numerical and graphical form.

Please note that the correlation the equation for variable "Y" has theform of the linear expression: Y = a 0 + a 1X1 + a 2X2 where a 0 = 9.43974,a1 = -0.1384 and a 2 = 3.67961. This graphical display of Sample Problem

4 presents the regression data versus the calculated values from the linearregression. The numerical value of the variance and the number of thepositive and negative residuals give an indication regarding the validity of the assumption that Y can be represented as linear function of X1 and X2.The results in this case indicate a good fit between the observed data and thecorrelation function.

The Display Options Menu allows the user to use an "s" keypress "tosave results in a column". This refers to saving the calculated value of Yfrom the linear regression to the Problems Options Display under a column

The Display Options Menu allows the user to use an "s" keypress "tosave results in a column". This refers to saving the calculated value of Yfrom the linear regression to the Problems Options Display under a column

Page 62: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 62/76

from the linear regression to the Problems Options Display under a columnname provided by the user. The "r" keypress from the Display Options Menugive a statistical residual plot as shown below:

The "F9" keypress from the Display Options Menu give a statisticalsummary:

8-10 REGRESSION POLYMATH 4.1 PC

The confidence intervals given in the statistical summary are very useful ininterpreting the validity of the linear regression of data.

This concludes Sample Problem 4 which illustrated multiple linearregression.

from the linear regression to the Problems Options Display under a columnname provided by the user. The "r" keypress from the Display Options Menugive a statistical residual plot as shown below:

The "F9" keypress from the Display Options Menu give a statisticalsummary:

8-10 REGRESSION POLYMATH 4.1 PC

The confidence intervals given in the statistical summary are very useful ininterpreting the validity of the linear regression of data.

This concludes Sample Problem 4 which illustrated multiple linearregression.

TRANSFORMATION OF VARIABLESA nonlinear correlation equation can be often brought into a linear

form by a transformation of the data. For example, the nonlinear equation:

TRANSFORMATION OF VARIABLESA nonlinear correlation equation can be often brought into a linear

form by a transformation of the data For example the nonlinear equation:

Page 63: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 63/76

Y = a 0 X1a 1 X2

a 2

can be linearized by taking logarithm of both sides of the equation:ln Y = ln a 0 + a 1 ln X 1 + a 2 ln X 2.

To demonstrate this option please recall Sample Problem 5. To dothis, please press ⇑F10 to get to the Main Program Menu, F7 to access theSample Problems Menu and select Sample Problem number 5. This shouldresult in the Problem Option Display below:

form by a transformation of the data. For example, the nonlinear equation:

In this display X1, X2 and Y represent the original data, the variables(columns) lnX1, lnX2 and lnY represent the transformed data. You can seethe definition of ln X1 , for example, by moving the cursor (the highlightedbox), which located in row number 1 of the first column, into the boxcontaining "lnX1" (using the arrow keys) and press .

POLYMATH 4.1 PC REGRESSION 8-11

Y = a 0 X1a 1 X2

a 2

can be linearized by taking logarithm of both sides of the equation:ln Y = ln a 0 + a 1 ln X 1 + a 2 ln X 2.

To demonstrate this option please recall Sample Problem 5. To dothis, please press ⇑F10 to get to the Main Program Menu, F7 to access theSample Problems Menu and select Sample Problem number 5. This shouldresult in the Problem Option Display below:

form by a transformation of the data. For example, the nonlinear equation:

In this display X1, X2 and Y represent the original data, the variables(columns) lnX1, lnX2 and lnY represent the transformed data. You can seethe definition of ln X1 , for example, by moving the cursor (the highlightedbox), which located in row number 1 of the first column, into the boxcontaining "lnX1" (using the arrow keys) and press .

POLYMATH 4.1 PC REGRESSION 8-11

The following window is brought up: The following window is brought up:

Page 64: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 64/76

Note that the expression in the right hand side of the column definitionequation must be a valid algebraic expression, and any function argumentsused in the expression should be enclosed within parentheses.

Since we do not want to change this expression, please press toclose the window. Now press ⇑F7 to do regression, then "l" to do linearregression. Type in "lnX1" as the name of the first independent variable,"lnX2" as the name of the second independent variable and "lnY" as thename of the dependent variable. The results should be displayed as shown

below:

All of the statistical analyses are available for the transformed variable.Please note that the results indicate that the equation for variable "Y"

can be written as: Y = a 0 X1a 1 X2

a 2 where a 0 = exp (-0.666796) = 0.5133,a1 = 0.986683 and a 2 = -1.95438.

This concludes the transformation of variable and the multiplelinear regression for Sample Problem 5.

8-12 REGRESSION POLYMATH 4.1 PC

Note that the expression in the right hand side of the column definitionequation must be a valid algebraic expression, and any function argumentsused in the expression should be enclosed within parentheses.

Since we do not want to change this expression, please press toclose the window. Now press ⇑F7 to do regression, then "l" to do linearregression. Type in "lnX1" as the name of the first independent variable,"lnX2" as the name of the second independent variable and "lnY" as thename of the dependent variable. The results should be displayed as shownbelow:

All of the statistical analyses are available for the transformed variable.Please note that the results indicate that the equation for variable "Y"

can be written as: Y = a 0 X1a 1 X2

a 2 where a 0 = exp (-0.666796) = 0.5133,a1 = 0.986683 and a 2 = -1.95438.

This concludes the transformation of variable and the multiplelinear regression for Sample Problem 5.

8-12 REGRESSION POLYMATH 4.1 PC

Page 65: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 65/76

Page 66: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 66/76

8-14 REGRESSION POLYMATH 4.1 PC

The Regression Options Menu gives several useful options formodel changes and alterations to initial parameter guesses; however, pleasepress ⇑F7 to solve this problem. The program search is shown to the userand the converged solution is indicated below:

There are a number of options from the Display Options Menu (notshown here). Perhaps the most useful is the "statistical analysis" which isgiven on the next page.

8-14 REGRESSION POLYMATH 4.1 PC

The Regression Options Menu gives several useful options formodel changes and alterations to initial parameter guesses; however, pleasepress ⇑F7 to solve this problem. The program search is shown to the userand the converged solution is indicated below:

There are a number of options from the Display Options Menu (notshown here). Perhaps the most useful is the "statistical analysis" which isgiven on the next page.

Page 67: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 67/76

POLYMATH 4.1 PC REGRESSION 8-15

This concludes the Quick Tour section dealing with nonlinear regres-sion and the Chapter on the Polynomial, Multiple Linear and NonlinearRegression Program. Remember, when you wish to stop POLYMATH ,please follow the exiting instructions given below.

EXITING OR RESTARTING POLYMATH

A⇑F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM . The program can be exited or restarted fromthe Program Selection Menu.

P(x) = a 0 + a 1x + a 2x2 +...+a nx

n

SOLUTION METHODS

When fitting a polynomial of the form

to N points of observed data, the minimum sum of square error correlationof the coefficients a 0, a 1, a2...a n can be found by solving the system of linearequation (often called normal equations):

POLYMATH 4.1 PC REGRESSION 8-15

This concludes the Quick Tour section dealing with nonlinear regres-sion and the Chapter on the Polynomial, Multiple Linear and NonlinearRegression Program. Remember, when you wish to stop POLYMATH ,please follow the exiting instructions given below.

EXITING OR RESTARTING POLYMATH

A⇑F10 keypress will always stop the operation of POLYMATH andreturn you to the Program Selection Menu. THIS ACTION WILL DELETE THE EXISTING PROBLEM . The program can be exited or restarted fromthe Program Selection Menu.

P(x) = a 0 + a 1x + a 2x2 +...+a nx

n

SOLUTION METHODS

When fitting a polynomial of the form

to N points of observed data, the minimum sum of square error correlationof the coefficients a 0, a 1, a2...a n can be found by solving the system of linearequation (often called normal equations):

Page 68: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 68/76

Page 69: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 69/76

Page 70: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 70/76

Page 71: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 71/76

Page 72: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 72/76

Page 73: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 73/76

Page 74: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 74/76

Page 75: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 75/76

DOS or Windows 3.11. Open a DOS prompt window.2. Type "SET" at the prompt.3. Look for the line that displays the value of the COMSPEC environment

i bl

DOS or Windows 3.11. Open a DOS prompt window.2. Type "SET" at the prompt.3. Look for the line that displays the value of the COMSPEC environment

i bl

Page 76: poymath4.0

8/6/2019 poymath4.0

http://slidepdf.com/reader/full/poymath40 76/76

variable.

If COMSPEC is set to C:\COMMAND.COM then add the following lineto the CONFIG.SYS file:

SHELL=C:\COMMAND.COM C:\ /E:2048 /P

If COMSPEC is set to C:\DOS\COMMAND.COM then add this line to theCONFIG.SYS file:

SHELL=C:\DOS\COMMAND.COM C:\DOS /E:2048 /P

4. Reboot your computer.5. Adjust the size of E: in Step 3 upwards in increments of 1024 as necessary.

POLYMATH 4.1 PC APPENDIX 9-8

variable.

If COMSPEC is set to C:\COMMAND.COM then add the following lineto the CONFIG.SYS file:

SHELL=C:\COMMAND.COM C:\ /E:2048 /P

If COMSPEC is set to C:\DOS\COMMAND.COM then add this line to theCONFIG.SYS file:

SHELL=C:\DOS\COMMAND.COM C:\DOS /E:2048 /P

4. Reboot your computer.5. Adjust the size of E: in Step 3 upwards in increments of 1024 as necessary.

POLYMATH 4.1 PC APPENDIX 9-8