Bertini.BUHSolve |
Syntax |
Bertini.BUHSolve(P:LIST, SSys:LIST, Gamma:STRING, SSol:LIST, ConfigSet:LIST) |
Description |
Example |
-- We want to solve the system x^2-1=0, y^2-1=0, using default value of Gamma i.e. Gamma=1 and default configurations. -- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0], [1.0, 0.0] ]. -- The start system for the homotopy is x^2=0, y^2=0. Use S ::= QQ[x,y]; P := [x^2-1, y^2-1]; SSys := [x^2, y^2]; Gamma := "1"; SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ],[ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1"]; -- Then we compute the solution with Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); -- And we achieve a list of lists containing real solutions. ---------------------------------------- [ [-250000000000021/250000000000000, -250000000000021/250000000000000], [250000000000021/250000000000000, 250000000000021/250000000000000] ] --For Bertini output files please refer to ApCoCoA directory/Bertini. |
Example |
-- We want to solve the system x^2+y^2-5, xy-2, for Gamma=0.2+1.2*I and for fixed higher precision (user defined configurations). -- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0],[1.0, 0.0] ]. -- The start system for the homotopy is x^2=0, y^2=0. Use S ::= QQ[x,y]; P := [x^2+y^2-5, xy-2]; SSys := [x^2, y^2]; Gamma := "0.2+1.2*I"; SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ], [ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1", "MPTYPE: 1", "PRECISION: 128"]; -- Then we compute the solution with Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); -- And we achieve a list of lists containing real solutions. ---------------------------------------- [ [-249999999999997684505697380148733364799/125000000000000000000000000000000000000, -1000000000000021662026757256894697354703/1000000000000000000000000000000000000000 ], [249999999999997684505697380148733364799/125000000000000000000000000000000000000, 1000000000000021662026757256894697354703/1000000000000000000000000000000000000000 ] ] --For Bertini output files please refer to ApCoCoA directory/Bertini. |
Example |
-- We want to solve the given system for Gamma=0.2+1.2*I and using default configurations. -- The start solution for the homotopy is [ [0.0, 0.0 ], [1.0, 0.0], [0.0, 0.0], [1.0, 0.0] ]. -- The start system for the homotopy is [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]. Use S ::= QQ[x[1..4]]; P := [ 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 18x[1]x[3]x[4] - 48x[2]x[3]x[4] + 9x[1]x[2] - 6x[1]x[3] + 9x[2]x[3] + 15x[2]x[4] + 9x[3]x[4] + 15x[1] + 15x[3] - 15, 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 48x[1]x[3]x[4] - 18x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] - 6x[2]x[3] + 15x[1]x[4] + 9x[3]x[4] + 15x[2] + 15x[3] - 15, 186x[1]x[2]x[3]x[4] - 48x[1]x[2]x[3] - 18x[1]x[2]x[4] - 42x[1]x[3]x[4] - 24x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] + 15x[2]x[3] - 6x[1]x[4] + 9x[3]x[4] + 15x[1] + 15x[4] - 15, 24x[1]x[2]x[3]x[4] - 3x[1]x[3] - 3x[2]x[3] - 3x[1]x[4] - 3x[2]x[4] + 3, x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]; SSys := [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]; Gamma := "0.2+1.2*I"; SSol := [ [ ["0.0", "0.0"], ["1.0", "0.0"], ["0.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1"]; -- Then we compute the solution with Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); -- And we achieve a list of lists containing real solutions. ---------------------------------------- [[0, 1, 0, 1]] --For Bertini output files please refer to ApCoCoA directory/Bertini. |
See Also |