MATLAB: Large scale nonlinear system of equations with sparse Jacobian: cannot find the solution

large-scalesparse

We have several large scale nonlinear system of equations H(z)=0. The dimensions are between 877-1045.
I obtained Jacobian and checked whether my Jacobian is true by:
options=optimset('Jacobian', 'on', 'DerivativeCheck', 'on','LargeScale', 'on');
fsolve('H', z, options)
maximum discrepancy between Jacobians is 1e-5
The Jacobian is a sparse matrix (for example it has 9496 nonzero elements for 940×940 dimension)
I tried to solve by:
%try with diagonal preconditioner:
fun=@H;
options = optimset('Display','iter','Algorithm','trust-region reflective','Jacobian','on','PrecondBandWidth',0);
[x,fval,exitflag,output] = fsolve(fun,z,options);
%try with a three diagonal preconditioner 'PrecondBandWidth',1
Cannot find the solutions:
optimality conditions: 0.00672 for 149. iteration and 0.00391 for 192 (in 15 minutes)
Do you have any suggestions for finding solutions to my large scale problems?

Best Answer

The answer is "maybe." This is not a huge relative discrepancy. Maybe you should try central finite differences first to see if that makes the discrepancy go down.
DerivativeCheck only applies near the initial point, usually called x0, as explained here. This link also explaines how to set central finite differences.
Alan Weiss
MATLAB mathematical toolbox documentation