Let f= f0 +··· + fmxm and g= g0 +··· + gnxn be two polynomials of degree m and n respectively.
The Sylvester matrix of f and g is the matrix of
f, xf, ..., x
d1-1
f, g, xg, ..., x
d0-1
g
in the monomial basis. It has the following
form:
é ê ê ê ê ê ê ê ê ê ê ë
f0
0
g0
0
·
· · ·
·
· · ·
·
f0
·
g0
fm
·
gn
·
· · ·
·
· · ·
·
0
fm
0
gn
ù ú ú ú ú ú ú ú ú ú ú û
The Bezoutian of f and g
is the bivariate polynomial
Qf,g(x,y)=
f(x) g(y) - f(y) g(x)
x-y
=
S
0
£ i,j£ d-1
qi,jf,gxiyj
and its matrix is
Bf,g =
é ê ê ê ê ê ë
q0,0f,g
···
q0,d-1f,g
· · ·
· · ·
qd-1,0f,g
···
qd-1,d-1f,g
ù ú ú ú ú ú û
where d=max(m,n).
2 Implementation
upoly/UniReslt.H
template < class REP, class R>
VAL< REP*> Bezout(const UPolyDense< R> & P, const UPolyDense< R> & Q)
The Bezout matrix of P and Q.
template < class R>
VAL< MatStruct< hankel< typename R::value_type>> *> Bezout(const R & P)
The Bezout matrix of P and 1. The result is a Hankel matrix.
template < class REP, class R>
VAL< REP*> Sylvester(const UPolyDense< R> & P, const UPolyDense< R> & Q)
The Sylvester matrix of P and Q.
template < class R, class REP>
VAL< REP*> Sylvester(const UPolyDense< R> & P, const UPolyDense< R> & Q, char c)
The Sylvester matrix, with the maximum degree coefficient at the beginning.
template < class REP, class R>
VAL< REP*> Companion(const UPolyDense< R> & P)
The companion matrix of a polynomial P.