Discriminant Formulas and Applications