An example that FSOLVE doesn't work

I have a two-dimensional non-linear equations, and its non-zero solution is x = [45, 0.1].
given a start point at x0 = [100, 10], let FSOLVE solve the equations but fail, the reason is :
"fsolve stopped because it exceeded the function evaluation limit (the default value)"
However, I write codes applying Newton-Raphson Algorithm, and the running result shows the solution is found within 7 iterations.
So I'm confused why FSOLVE can't work in this case ?
M-files are attached to this post.

 採用された回答

Matt J
Matt J 2014 年 6 月 5 日

0 投票

You're simply not choosing an x0 close enough to the solution, and are getting stuck at a local min somewhere. When I choose x0 = [50 5], fsolve gives me the correct result no problem.

3 件のコメント

bill chu
bill chu 2014 年 6 月 6 日
Thanks for your reply.
Although the start point x0 = [100, 10] is not close enough to the solution, Newton-Raphson Algorithm can still give the right solution within 7 iterations while FSOLVE doesn't perform well in this case.
I'm confused about that.
Matt J
Matt J 2014 年 6 月 6 日
編集済み: Matt J 2014 年 6 月 6 日
Different algorithms generate different sequences of points. If local min are present, which minimum the sequence will be drawn to can be a very algorithm-dependent thing.
Generally, there is a capture region around any local solution point in which you can count on an algorithm to be drawn to that point. However the capture radius depends on the algorithm, the point, and the shape of the graph of the objective function around that point. If the initial point x0 doesn't lie in the capture radius of any solution, it will just bounce around in a very x0-dependent and algorithm-dependent way until it lands in some capture region.
bill chu
bill chu 2014 年 6 月 6 日
Great answer! Thank you very much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2014 年 6 月 5 日

編集済み:

2014 年 6 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by