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

2 views (last 30 days)
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 940x940 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?
  1 Comment
Anna
Anna on 3 Jul 2014
I used DerivativeCheck, 'on' in optimset and get
Maximum relative discrepancy between derivatives = 3.05176e-006
Caution: user-supplied and finite-difference derivatives do not match within 1e-006 relative tolerance
Does this mean that my Jacobian is incorrect and I should check my Jacobian?

Sign in to comment.

Accepted Answer

Alan Weiss
Alan Weiss on 3 Jul 2014
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
  1 Comment
Anna
Anna on 4 Jul 2014
Thank you for your answer. I tried with central finite differences, maximum discrepancy is now 1e-08, which means I can use my Jacobian.
I also give Jacobian sparsity pattern in optimset.
But still can not find the solution. The condition number of my Jacobian is quite high (1e+12) I used preconditioner also.
Do you have any other useful idea?

Sign in to comment.

More Answers (0)

Categories

Find more on Operating on Diagonal Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!