Generalized Broyden’s method.
Computes an approximation to the inverse Jacobian from the last M interations. Avoids NxN matrix multiplication, it only has MxM matrix multiplication and inversion.
M=0 .... linear mixing M=1 .... Anderson mixing with 2 iterations M=2 .... Anderson mixing with 3 iterations etc. optimal is M=5