Do numerical solutions depend on lower and upper bounds even when those bounds are not binded?

1 Ansicht (letzte 30 Tage)
I am finding numerical solutions, using lsqnonlin. When using lsqnonlin, I expect that you guys set lower bounds and upper bounds. I also attempt to lower bounds and upper bounds.
One thing I found is that the solution values seem to depend on lower and upper bounds even when both lower and upper bounds are not binded. For illustration, consider two unknowns, x1 and x2. Let us assume that the true value of x1 is 5 and the true value of x2 is 10. Let us assume that we have a system of two nonlinear equations and use lsqnonlin to find the solution. Now set up the lower and the upper bounds of x1 as 0 < x1 < 10. Also, set up the lower and the upper bounds of x2 as 5 < x2 < 15. Under these lower and upper bounds, let us assume that the numerical solutions are (x1, x2) = (4, 9), for example.
Now consider a different set of lower and upper bounds. Now assume 1 < x1 < 9 and 6 < x2< 16. Under this set of lower and upper bounds, now we find that the numerical solutions are obtain as (x1, x2) = (3, 11), for example.
Is there anyone who had similar problems? Is there anyone who knows why this situation occurs? In general, how do you guys set lower and upper bounds when finding numerical solutions from a system of nonlinear equations (that is, no closed form solutions are known)?
Please share your experience and knowledge. Thank you.

Akzeptierte Antwort

Matt J
Matt J am 22 Sep. 2020
Bearbeitet: Matt J am 22 Sep. 2020
Changing the bounds affects where the algorithm can search, which can change the sequence of iterations, which can change which of the many solutions lsqnonlin will find (if there are multiple solutions). If you have multiple solutions, the one you find will also depend on the choice of the intial guess vector x0. A test you should probably do is to initialize the second search (with the modified bounds) with the solution (x1, x2) = (4, 9) from the first search and see if that solution remains stable.
Another possibility is that the iterations are not converging at all, but simply reaching the MaxIteration limit. This, together with changes in the iteration sequence arising from different bounds, could land you at different points. You should always check the exitflag returned by lsqnonlin.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by