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.

 Respuesta aceptada

Matt J
Matt J el 5 de Jun. de 2014

0 votos

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 comentarios

bill chu
bill chu el 6 de Jun. de 2014
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 el 6 de Jun. de 2014
Editada: Matt J el 6 de Jun. de 2014
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 el 6 de Jun. de 2014
Great answer! Thank you very much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 5 de Jun. de 2014

Editada:

el 6 de Jun. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by