## Solver, Minimization, 2 Variables

## Solver, Minimization, 2 Variables

(OP)

Hey there,

following problem:

A set of non linear equations, that can be solved by determining two variables.

So far i have some experience using the NEQNF Solver, that minimizes an objective function (or several functions) by varying one variable.

Now i have 7 objective functions (non linear) and i need to vary and determine two variables to solve minimize the functions. Is there an solver that you can suggest me to use for this problem?

I`m using fortrann 77.

Thanks for your help,

ikkebins

following problem:

A set of non linear equations, that can be solved by determining two variables.

So far i have some experience using the NEQNF Solver, that minimizes an objective function (or several functions) by varying one variable.

Now i have 7 objective functions (non linear) and i need to vary and determine two variables to solve minimize the functions. Is there an solver that you can suggest me to use for this problem?

I`m using fortrann 77.

Thanks for your help,

ikkebins

## RE: Solver, Minimization, 2 Variables

## RE: Solver, Minimization, 2 Variables

## RE: Solver, Minimization, 2 Variables

For solving the nonlinear equation system of this form

f(x) = 0we can use Newton method:

x_{1}= x_{0}- J^{-1}(f, x_{0}) * f(x_{0})That means:

1) For the given starting point

xwe need to do:_{0}1.a) Compute the Jacobian matrix

J(f, xof the vector function_{0})f(x)in the pointx_{0}1.b) Solve the linear equation system

J(f, x_{0}) * d = - f(x_{0})For this step we can use a linear equation solver from Lapack.

2) finaly compute the next approximation point

x_{1}= x_{0}+ dAll steps should be repeated until the desired accuracy is reached, it means for given eps -> 0 or delta -> 0 until

||x< delta or_{n}- x_{n-1}||||f(x< eps_{n})||IMO it doesn't seem very complicated...

## RE: Solver, Minimization, 2 Variables

http://faculty.ksu.edu.sa/Almutaz/Documents/Summer...

I took as example the 3x3 system of nonlinear equations from the document above and tried to solve it with simple Newton method.

For solving of linear equation systems I first used self written GEM method, but then - to make the code shorter for this posting - I took a method from LAPACk:

nlsolve.f95## CODE

Here are the results:

## CODE