Info
This question is closed. Reopen it to edit or answer.
nonlinear system of equations--------I have a problem ,HeeeeLP...
1 view (last 30 days)
Show older comments
Hi... I have a set of nonlinear equations with two variables how ever I know what its answer is when I use --Newton-Raphson-- method to solve the set with initial conditions so close to the roots or even the roots themselves , there is divergence and the answers could not be found
can any body help me and tell what the problem is should I change the method?which method I can use?
0 Comments
Answers (1)
Walter Roberson
on 17 Apr 2011
With non-linear equations (especially) Newton-Raphson cannot always find the answer on real machines, and cannot always find a particular answer even if one starts right at the answer. The problem can occur with linear equations as well.
The difficulty has to do with floating point round-off error. {I believe that} It can be shown that for any fixed precision and any fixed round-off scheme, that when you calculate one variable in terms of another, or project new values for variables linearly based upon the old values and the evaluated value of the function, that there will be functions where it is not possible to simultaneously find the best representable values for all of the variables.
It can be the case that if (x0,y0) are the closest representable values to the root, that the calculations dance between (x0,y0*(1+eps)) and (x0*(1+eps),y0) . In other cases, the difference between what can be calculated and a theoretical root can be such that even if you start at the closest representation to the theoretical root, the routine will move off towards a different root that has a lower calculation error.
You can sometimes find the root you want by raising the tolerance away from 0 that is accepted as being 0, but there is no absolute tolerance that will work for every problem.
N-R finds answers in theory, but in practice with finite arithmetic is a different matter. :(
Re-writing the expression can help a lot. For example, Hornering a polynomial can lead to much better precision.
2 Comments
Walter Roberson
on 25 Apr 2011
There are several different methods for handling multivariate equations, with different methods having different time requirements or different guarantees depending on the characteristics of the equations they are being applied to.
I suggest you examine the documentation for the Global Optimization Toolbox.
In some cases, the Symbolic Toolbox can provide closed-form solutions for multivariate polynomials. Unfortunately, it doesn't take very much in the way of non-linearity before you are forced into situations with no known closed form symbolic solution (or situations where it can be proven that no closed form symbolic solution is possible.)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!