Solving a polynomial inequality - Problem type 2