You are given a polynomial of degree two in , . A convenient way of writing it is in the form where and are its roots, this is, the numbers such that the polynomial is zero.

Now the reasoning: Because the polynomial is a continuous function, these two numbers set a change of sign in the expression . So you should check whether is positive or negative if is greater or smaller than and .

Also for the absolute value condiction this means