How to set solver settings for my non linear equations?

I have a set of non-linear equations that I would like to solve using fsolve, shown below in WandG function. Solver solutions are far away from the ones I would expect, I am expecting something alike x(1) = 10 and x(2)=0.11.

Therefore, I would be glad if someone could give me some better directions of how to set up the options, especially tolerances, of the solver.

So far, I am reading this matlab documentation and I was considering that I may have to rewrite my equations with a better scaling but I am not sure whether or not this will be sufficient.

% configuration of fsolve
options = optimoptions('fsolve','Display','iter-detailed','PlotFcn',@optimplotfirstorderopt);
options.StepTolerance = 1e-14;
%options.OptimalityTolerance = 1e-14
options.FunctionTolerance = 1e-14;
options.MaxIterations = 100000;
options.MaxFunctionEvaluations = 400;
options.Algorithm = 'levenberg-marquardt';%'levenberg-marquardt';%'trust-region'%
fun= @WandG;

x0 = [5.0000e+00;5.5366e-03];

% Solve the function fun
gw =fsolve(fun,x0,options);

% Function to be solved by fsolve
function F = WandG(x)

F(:,1) = ((((x(:,2)./10).*0.1).*(x(:,1)./100)).^2).*(8.9856e+01) +(( 7e-11 .* ( x(:,1)./100 ) ).^2).*( 1.7040e+08.^2.*(8.9856e+01) ) - (((x(:,2)./10).*0.1).*(x(:,1)./100));
F(:,2) = ((((x(:,2)./10).*0.1).*(x(:,1)./100)).^2).*( 8.0640e+00 - 1.7040e+08.*1.1e-7 * (1-x(:,1)./200) ) + (((x(:,1)./100).*7e-11).^2).*( 1.7040e+08.^2*(8.0640e+00 - 1.7040e+08*1.1e-7 .* (1-x(:,1)./200)) ) + 1.7040e+08.*(7e-11.*(x(:,1)./100) );

end

• I am almost certain that your problem doesn't come from one of the options, but as you say "with a better scaling". Everybody working in numerical analysis will say that you should never for example multiply a very very small number $(( 7e-11 .* ( x(:,1)./100 ) ).^2). \approx ? 1. e-22$ by a very very big one like $( 1.7040e+08.^2.*(8.9856e+01) ) \approx 3. e+18$ Commented Sep 3, 2019 at 8:43
• @JeanMarie thanks for replying, then should I down scale the whole function? Commented Sep 3, 2019 at 10:29
• It's hard to say without having a mathematical description of this function. Could you provide one ? Often these very small ou very big numbers come from sticking to International System of Units. Commented Sep 3, 2019 at 10:35
• @JeanMarie do you mean the full mathetamical equations system? Commented Sep 3, 2019 at 11:23
• Not necessarily. Some hints about what the initial minimization problem looks like. Once again, is it a question of units like using Avogadro's constant ? Commented Sep 3, 2019 at 11:33