Ask Your Question
1

resultant and gcd over real ?

asked 11 years ago

etienne gravatar image

updated 11 years ago

slelievre gravatar image

The resultant and gcd work well over rational but not over real or complex!

R.<x,y> = PolynomialRing(RR,2)
a = x^2 + y
b = x - y^2
a.resultant(b)
a.gcd(b)

This does not work while with QQ, it works. Anyone has an idea?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 11 years ago

Jeroen Demeyer gravatar image

If you define your polynomial ring as follows, it does work:

sage: P.<y> = PolynomialRing(RR)
sage: R.<x> = PolynomialRing(P)
sage: a = x^2 + y
sage: b = x - y^2
sage: a.resultant(b)
Preview: (hide)
link
1

answered 11 years ago

lftabera gravatar image

The problem is that for these kind of inexact rings the methods are not implemented.

For the resultant, you can compute the resultant with

a.sylvester_matrix(b,x).det()

But I cannot promise performance nor numeric stability.

The gcd is more tricky. For instance, if you take univariate polynomials over an inexact rings and perform Euclides method, you will end with a gcd 1 due to numerical errors. You are asking for an approximate gcd which is not easy to compute.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 11 years ago

Seen: 897 times

Last updated: Feb 16 '14