function r = polynomial_resultant_sylvester ( p1, p2 )

%*****************************************************************************80
%
%% polynomial_resultant_sylvester() computes the resultant of polynomials p1 and p2.
%
%  Discussion:
%
%    This algorithm computes the resultant by constructing the Sylvester
%    matrix and taking the determinant.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 January 2024
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Michael Pohst, Hans Zassenhaus,
%    Algorithmic Algebraic Number Theory,
%    Cambridge University Press, 1989
%    LC: QA247.P58
%    ISBN: 0-521-33060-2
%
%  Input:
%
%    real p1(np1), p2(np2): two polynomials.
%    On input, the first entry is the highest order coefficient.
%
%  Output:
%
%    real r: the resultant.
%
  A = sylvester_matrix ( p1, p2 );

  r = det ( A );

  return
end

