MATLAB Examples

Multihomogeneous homotopy

Example 5.3 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

In this example, the structure of the system is such that, by putting x and y in different variable groups, we can reduce the number of paths to track from 4 to 2. This is done by wrapping x and y in a cell array when constructing BertiniLab.

The simple homogeneous homotopy. To avoid truncated infinite paths, we need to set the security level to 1.

polysyms x y
poly_system = BertiniLab('variable_group',[x,y],'function_def',[x*y-1; x^2-1], ...
    'config',struct('SecurityLevel',1));
poly_system = solve(poly_system);

results = poly_system.solve_summary;
istart = strfind(results,'Finite Solution Summary');
disp(results(istart:end))
Finite Solution Summary

NOTE: nonsingular vs singular is based on condition number and identical endpoints

		| Number of real solns	|  Number of non-real solns	|  Total
------------------------------------------------------------------------------------------
Non-singular	|	2		|		0		|   2
Singular	|	0		|		0		|   0
------------------------------------------------------------------------------------------
Total		|	2		|		0		|   2


Finite Multiplicity Summary

  Multiplicity	|  Number of real solns	|  Number of non-real solns
------------------------------------------------------------------------------------------
	1	|	2		|	0


Infinite Solution Summary

NOTE: nonsingular vs singular is based on condition number and identical endpoints

		| Number of real solns	|  Number of non-real solns	|  Total
------------------------------------------------------------------------------------------
Non-singular	|	0		|		0		|   0
Singular	|	0		|		1		|   1
------------------------------------------------------------------------------------------
Total		|	0		|		1		|   1


Infinite Multiplicity Summary

  Multiplicity	|  Number of real solns	|  Number of non-real solns
------------------------------------------------------------------------------------------
	2	|	0		|	1


------------------------------------------------------------------------------------------
The following files may be of interest to you:

main_data:             A human-readable version of the solutions - main output file.
raw_solutions:         A list of the solutions with the corresponding path numbers.
raw_data:              Similar to the previous, but with the points in Bertini's homogeneous
                         coordinates along with more information about the solutions.
real_finite_solutions: A list of all real finite solutions.
finite_solutions:      A list of all finite solutions.
nonsingular_solutions: A list of all nonsingular solutions.
singular_solutions:    A list of all singular solutions.
------------------------------------------------------------------------------------------

Paths Tracked: 4

We can change to a 2-homogeneous homotopy by putting curly brackets around x,y. Now we do not need to set the security level.

polysyms x y
poly_system = BertiniLab('variable_group',{x,y},'function_def',[x*y-1; x^2-1]);
poly_system = solve(poly_system);

results = poly_system.solve_summary;
istart = strfind(results,'Finite Solution Summary');
disp(results(istart:end))
Finite Solution Summary

NOTE: nonsingular vs singular is based on condition number and identical endpoints

		| Number of real solns	|  Number of non-real solns	|  Total
------------------------------------------------------------------------------------------
Non-singular	|	2		|		0		|   2
Singular	|	0		|		0		|   0
------------------------------------------------------------------------------------------
Total		|	2		|		0		|   2


Finite Multiplicity Summary

  Multiplicity	|  Number of real solns	|  Number of non-real solns
------------------------------------------------------------------------------------------
	1	|	2		|	0


------------------------------------------------------------------------------------------
The following files may be of interest to you:

main_data:             A human-readable version of the solutions - main output file.
raw_solutions:         A list of the solutions with the corresponding path numbers.
raw_data:              Similar to the previous, but with the points in Bertini's homogeneous
                         coordinates along with more information about the solutions.
real_finite_solutions: A list of all real finite solutions.
finite_solutions:      A list of all finite solutions.
nonsingular_solutions: A list of all nonsingular solutions.
singular_solutions:    A list of all singular solutions.
------------------------------------------------------------------------------------------

Paths Tracked: 2