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
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
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 Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!