Choosing a start system

What start system should I choose?

Choosing a start system for homotopy continuation is an art for itself. We give some basic rules for start systems. They can roughly be subdivided into three classes:

I know nothing about the structure of my polynomial system

In this case, there are two options: choosing a totaldegree start system, or a polyhedral start system (the default).

The first one is suitable for system, which are dense. The second one is suitable for systems, which are sparse. Here is how it works:

using HomotopyContinuation
@var x y;
f = [x^2 + 2y, y^2 - 2]
solve(f; start_system = :total_degree) # using totaldegree
solve(f; start_system = :polyhedral) # using polyhedral

My polynomial system has parameters

In this case, one should first compute an intermediate solution with random complex coefficients. Why complex? The reason is that tracking over the complex numbers one can easily avoid the locus where homotopy continuation fails (and this is not possible tracking only over the real numbers!).

Here is an example with parameters p:

using HomotopyContinuation,
@var x y z p[1:3]
F = System(
        x + 3 + 2y + 2y^2 - p[1],
        (x - 2 + 5y) * z + 4 - p[2] * z,
        (x + 2 + 4y) * z + 5 - p[3] * z,
    parameters = p

Suppose we want to solve the system for p₁ = [1,1,2]. Then, we first solve it for random complex coefficients:

# Generate generic parameters by sampling complex numbers from the normal distribution
p₀ = randn(ComplexF64, 3)
# Compute all solutions for F_p₀
result_p₀ = solve(F, target_parameters = p₀)

Now, we track p₀ to p₁ using a parameter homotopy.

p₁ = [1, 1, 2]
result_p₁ = solve(F, solutions(result_p₀); start_parameters=p₀, target_parameters=p₁)

This approach is particularly useful when one has to solve this system for many different sets of parameters, as we explain in this guide.

I have one solution of my polynomial system already

In this case, one should use the monodromy method.