Testing a solution to a system of equations