Fsolve convergence when the variables are changing of the order of 1e-3 or less

3 views (last 30 days)
I am interested in using fsolve to get the initial guess which satisfies a boundary condition in a Boundary Value Problem(BVP). The issue I am currently facing is let u0 = [4.31952;-3.75572;15.99999] be the starting guess in fsolve.
The solution would be something of this kind u1 = [4.31952+1e-5;-3.75572+1e-5;15.99999+1e-5]. Fsolve says no solution found, I tried to change the TolX and TolFun but had no success.
I am looking for a way to solve this issue, I tried scaling u0*1e2 still I don't obtain any convergence. I know should be an easy way to deal with these problems. Looking for some help.
  2 Comments
Matt J
Matt J on 13 Dec 2016
Edited: Matt J on 13 Dec 2016
Do you get the correct solution when you initialize with u1? If not, then your solution isn't near u1 as you expect. Either way, why initialize so far away with u0? u0*1e2 is even farther away, so why do you expect better?
UNK
UNK on 14 Dec 2016
I don't get solution when I start with u1. This is a close guess than starting with some random vector. When I give a random vector I mostly don't get any solution.
I am providing analytical Jacobian still it says
fsolve stopped because the relative size of the current step is less than the
selected value of the step size tolerance, but the vector of function values
is not near zero as measured by the selected value of the function tolerance.
In the later part I meant I am scaling the function which needs to approach zero by 1e2, so that the solver will be able to be more sensitive.

Sign in to comment.

Answers (1)

Matt J
Matt J on 18 Dec 2016
Edited: Matt J on 18 Dec 2016
I don't get solution when I start with u1.
If you cannot get to the solution from u1, which is supposedly very close to the solution, it is likely that there is no solution near u1 as you expect. This might be due to some implementation error that you have made in the objective function, i.e, you are not implementing the equations that you intend to.

Community Treasure Hunt

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

Start Hunting!