solve equation system