ABSTRACT

The data set used to illustrate subroutine newton is taken from Example 3.4. The output generated by the Newton method program is presented in Output 3.1.

i

Subroutine newton can be used to solve most of the nonlinear equations presented in this chapter. The values in the data statement must be changed accordingly, and the function subprogram, function funct, must evaluate the desired nonlinear equation. Complex roots can be evaluated simply by declaring all variables to be complex variables. As an additional example, function funct presented below evaluates a real coefficient polynomial up to fourth degree. This function funct is illustrated by solving Example 3.7. Simple roots can be evaluated directly. Multiple roots can be evaluated in three ways: directly (which reduces the order to first order), by including the multiplicity m as a coefficient of f(x) in function funct, or by defining u(x) = f(x)/f' (x) in function funct.