fix system of equations