Is the Trust-Region-Reflective algorithm the same for minimizing a scalar function and solving a nonlinear system of equations?

7 次查看(过去 30 天)
I'm tring to solve a system of "blackbox" residual function (F(x)=0) and was wondering if it is better to solve the system or to minimize the sum of the equations as a single scalar function.
It seems the same if the system is solved as a least square problem using lsqnonlin, especially when looking to the available algorithms, like the Trust-Region.
Is the Trust-Region algorithm the same for minimizing a scalar function and solving a nonlinear system of equations?
  5 个评论
Umar
Umar 2024-7-15
That is correct, @Marcus. Both fsolve and lsqnonlin indirectly solve systems and providing accurate solutions for nonlinear problems. However, Francisco suggested some good points as well to take them into consideration.
J. Alex Lee
J. Alex Lee 2024-7-19
编辑:J. Alex Lee 2024-7-19
The meanings of zero-ing ("solving") and minimizing are different, so it depends what you are looking for.
If your number of equations and unknowns match, you might be able to "solve" - if equations are nonlinear (would have to assume if black box), no guarantee.
If you have more unknowns than equations or vice versa, you cannot "solve" in general.
Since you say you have 2 equations and 2 unknowns, you can try solving, but a solution is not guaranteed. Not sure what "nearly linear" means, but maybe you can expect a solution, so I would see if fsolve works.
As for algorithms in general, they are related in that you can pose a minimizing problem as zero-ing the gradient. But not the same when you want to apply them to your particular problem
As for fsolve in particular and trust region - I never really understood exactly how it works either, but I think it should be based on Newton at its core with a lot of frills to make it robust against the general case - in any case I trust that since fsolve purports to solve systems of equations, it will [attempt to] do so whatever its internal algorithm is based on; it won't minimize.
If you have an idea of the neighborhood of values of unknowns to expect a zero, you can maybe visually map out the contour plot of each residual w.r.t. a grid of values of unknowns to find the zero-contour, and see if they appear to coincide anywhere?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by