Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Re: fsolve - premature and stalled
Replies: 2   Last Post: Apr 10, 2013 7:28 AM

 Messages: [ Previous | Next ]
 Alan Weiss Posts: 1,391 Registered: 11/27/08
Re: fsolve - premature and stalled
Posted: Apr 5, 2013 7:56 AM

On 4/4/2013 8:59 AM, KUNHEE wrote:
> I apologize. I am so sorry. I should have told you the initial problem.
>
> When I first tried, it did not give me a solution and showed:
>
> "No solution found.
>
> fsolve stopped because the relative size of the current step is less
> than the
> selected value of the step size tolerance squared, but the vector of
> function values
> is not near zero as measured by the selected value of the function
> tolerance."
>
> This problem was overcome by reducing the number of meshes, which
> might have caused the inaccurate results.
> Do you have any idea how to solve this problem? or why it does not
> want to give me a solution?
>
> Thank you so much for your help,
> Kunhee Lee

I feel that I came in somewhere in the middle of a conversation. You
talk about incompressible fluids, graphs, meshes, and time steps, none
of which have anything to do with fsolve as far as I know.

So, if you don't mind, I'll restrict my comments to fsolve issues.

There can be many reasons why fsolve does not reach a solution. Some
suggestions are listed here:
http://www.mathworks.com/help/optim/ug/when-the-solver-fails.html#br7o7ou

If your objective function vector is the result of a simulation or
solution to an ODE, then fsolve can have trouble because of difficulties
in estimating derivatives. See
http://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html

It is possible that you are integrating a function whose value is given
by an fsolve solution. In that case, it is usually a good idea to use
the starting point for fsolve at the next time step in the integration
as the previous fsolve solution. Usually, solutions don't change much as
you vary time. But, of course, you can hit a point where this procedure
does not work, and then you have to look all over for a good starting point.

Good luck,

Alan Weiss
MATLAB mathematical toolbox documentation

Date Subject Author
4/4/13 Guest
4/5/13 Alan Weiss
4/10/13 KUNHEE