Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have trouble rebuilding your problem (on 10.5.beta5). After running your definitions, I note :

sage: %time f(x=xRoot, y=yRoot)
CPU times: user 2.99 ms, sys: 0 ns, total: 2.99 ms
Wall time: 3.01 ms
0.?e-13 + 0.?e-14*I

but

sage: %time f(x=xRoot, y=yRoot).is_zero()
CPU times: user 1min 4s, sys: 15.8 ms, total: 1min 4s
Wall time: 1min 4s
True

Proving an equality in QQbar may be hard.

After this computation :

sage: %time f(x = x + xRoot, y = y + yRoot)
CPU times: user 433 ms, sys: 3.96 ms, total: 437 ms
Wall time: 436 ms
x^6 + (-6.458268171630608? - 3.092321934283960?*I)*x^5 + (13.394488679768032? + 16.64253693718441?*I)*x^4 - x^2*y^2 + y^4 + (-6.786915089516893? - 33.08934171990439?*I)*x^3 + 1.8785962708754?*x^2*y + (1.152756057210203? + 1.030773978094654?*I)*x*y^2 + (-4.7571925417508?)*y^3 + (-10.3655? + 28.1763?*I)*x^2 + (-1.1656? - 1.9364?*I)*x*y + (8.2950? - 0.5941?*I)*y^2 + (10.8963? - 7.4759?*I)*x + (-7.1327? + 0.6007?*I)*y

After reset()ing and rerunning your definitions :

sage: reset()
sage: R.<x, y>=QQbar[]
sage: f = x^6 + y^4 - y^2*x^2 + y^3 - y^2*x - y*x^2 + x^3
sage: yRoot = f.discriminant(x).univariate_polynomial().roots()[0][0] ; yRoot
-1.439298135437689?
sage: xRoot = f(y=yRoot).univariate_polynomial().roots()[1][0] ; xRoot
-1.076378028605102? - 0.5153869890473267?*I
sage: %time foo = f(x = x + xRoot, y = y + yRoot)
CPU times: user 1min 4s, sys: 11.7 ms, total: 1min 4s
Wall time: 1min 4s
sage: foo
x^6 + (-6.458268171630608? - 3.092321934283960?*I)*x^5 + (13.39448867976803? + 16.64253693718441?*I)*x^4 - x^2*y^2 + y^4 + (-6.786915089516893? - 33.08934171990439?*I)*x^3 + 1.8785962708754?*x^2*y + (1.152756057210203? + 1.030773978094654?*I)*x*y^2 + (-4.7571925417508?)*y^3 + (-10.3655289872596? + 28.17627538055642?*I)*x^2 + (-1.1655632303041? - 1.9364081513640?*I)*x*y + (8.2949924463539? - 0.5941154734316342?*I)*y^2 + (10.8962422540875? - 7.47593052592029?*I)*x + (-7.1326778536063? + 0.6007161238107?*I)*y

which does terminates "after a long time".

"L'éternité, c'est long. Surtout vers la fin"... HTH,