Let $f_1,...,f_n$ be a set of polynomials in $x_1,...,x_n$ with rational coefficients. I need to check whether a system $$f_1=a_1,...,f_n=a_n$$ has a real solution for large enough count of points.
To specify, there is 4 polynomials of degree 2 in 4 variables, and 10^4-10^7 values of $a_1,...,a_n$. I tried
Size = 30 (* really 100-300 *)
f[x1_, x2_, y1_, y2_] := x1 + y1 - 1 (* in fact I need polynomial of degree 2, *)
g[x1_, x2_, y1_, y2_] := x2 + y2 (* but it does not work even for degree 1 *)
Equation[a_, b_] := Reduce[f[x1, x2, y1, y2] == 0 && g[x1, x2, y1, y2] == 0 &&
x1^2 + x2^2 == a && y1^2 + y2^2 == b, {x1, x2, y1, y2}, Reals]
CheckPoint[{a_, b_}] := ! (FindInstance[Equation[a, b], {x1, x2, y1, y2}, Reals] == {})
Points = Select[Tuples[Range[-Size, Size], 2], CheckPoint]
Graphics[Point[#] & /@ Points, Frame -> True,
PlotRange -> {{-Size, Size}, {-Size, Size}}]
but it reduces system each time. Is there efficient enough way to do it almost in no time?
FindRoot
) $\endgroup$