Solving inequalities with a single variable