Solving Polynomial and Rational Inequalities