Better computation of the Jacobian matrix for algebraic solver

Alright, let’s give it a try.