Resultants and discriminants for multivariate polynomials