Microsoft Z3 https://github.com/Z3Prover/z3/blob/master/examples/c%2B%2B/example.cpp
also consider omnn::math:
https://github.com/ohhmm/openmind/blob/master/omnn/math/test/08_System.cpp
Lets say system of equations is like this:
(x-a1)^2 + (y-b1)^2 = c1
(x-a2)^2 + (y-b2)^2 = c2
Then you have couple options:
Valuable a1, a2, b1, b2; // init with values
System sys;
Variable x,y;
sys << (x-a1)^2 + (y-b1)^2 - c1; // addin an equation as an equality to 0
sys << (x-a2)^2 + (y-b2)^2 - c2;
for(auto& solution : sys.Solve(x))
std::cout << solution;
alternative way is to make single equation (see why):
((x-a1)^2 + (y-b1)^2 - c1)^2 + ((x-a2)^2 + (y-b2)^2 - c2)^2 = 0
Variable x,y;
Valuable a1, a2, b1, b2; // init with values
auto eq = ((x-a1)^2 + (y-b1)^2 - c1)^2 + ((x-a2)^2 + (y-b2)^2 - c2)^2;
eq.SetView(Valuable::View::Equation); // optional: equation optimizations
// get y function:
auto fn = eq(y);
// show
std::cout << fn << std::endl;
// evaluate
auto evaluate = fn;
evaluate.eval(x, 10);
evaluate.optimize(); // calculate
// show calculated value at x=10:
std::cout << evaluate << std::endl;