Testing a solution for a system of equations