Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_ZEROSYS

IMSL_ZEROSYS

IMSL_ZEROSYS

The IMSL_ZEROSYS function solves a system of n nonlinear equations, fi (x) = 0, using a modified Powell hybrid algorithm.



Syntax


Result = IMSL_ZEROSYS(f, n [, /DOUBLE] [, ERR_REL=value] [, FNORM=value] [, JACOBIAN=string] [, ITMAX=value] [, XGUESS=array])

Return Value


An array containing a solution of the system of equations.

Arguments


f

Scalar string specifying a user-supplied function to evaluate the system of equations to be solved. The f function accepts one parameter containing the point at which the functions are to be evaluated and returns the computed function values at the given point.

n

Number of equations to be solved and the number of unknowns.

Keywords


DOUBLE

If present and nonzero, double precision is used.

ERR_REL

Stopping criterion. The root is accepted if the relative error between two successive approximations to this root is less than ERR_REL. Default: ERR_REL = SQRT(e), where e is the machine precision.

FNORM

Scalar with the value f 20 + ... + f 2n–1 at the point x.

JACOBIAN

Scalar string specifying a user-supplied function to evaluate the x n Jacobian. The function accepts as parameter the point at which the Jacobian is to be evaluated and returns a two-dimensional matrix defined by result (i, j) = fi/xj.

ITMAX

Maximum allowable number of iterations. Default: ITMAX = 200.

XGUESS

Array with N components containing the initial estimate of the root. Default: XGUESS = 0.

Discussion


The IMSL_ZEROSYS function is based on the MINPACK subroutine HYBRDJ, which uses a modification of the hybrid algorithm due to M.J.D. Powell. This algorithm is a variation of Newton's Method, which takes precautions to avoid undesirable large steps or increasing residuals. For further discussion, see Moré et al. (1980).

Example


The following 2 x 2 system of nonlinear equations is solved:

f(x) = x0 + x1 – 3

f(x) = x02 + x12 – 9

.RUN  
; Define the system through the function f.
FUNCTION f, x
   RETURN, [x(0)+x(1)-3, x(0)^2+x(1)^2-9]
END

PM, IMSL_ZEROSYS(';f', 2), $
Title = ';Solution of the system:', FORMAT = '(f10.5)'
; Compute the solution and output the results.
Solution of the system:
      0.00000
      3.00000

Errors


Warning Errors

MATH_TOO_MANY_FCN_EVALS—Number of function evaluations has exceeded ITMAX. A new initial guess can be tried.

MATH_NO_BETTER_POINT—Keyword ERR_REL is too small. No further improvement in the approximate solution is possible.

MATH_NO_PROGRESS—Iteration has not made good progress. A new initial guess can be tried.

Version History


6.4
Introduced



© 2018 Harris Geospatial Solutions, Inc. |  Privacy Policy
My Account    |    Store    |    Contact Us