Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a quick way of determining where a polynomial is positive/negative without actually plugging values?

Say you have a polynomial

$$1) f(x)=(x+a)(x+b)$$


$$2) f(x)=(x-a)(-x+b)(x-c)$$

How can one quickly know whether function $f(x)$ is positive or negative without plugging in random interval values between the roots?

share|cite|improve this question

Looking at $(x+a)(x+b)$, if $x$ is "large" then the polynomial is positive. Now imagine $x$ decreasing. Provided $a\neq b$, once $x$ crosses the larger of $-a, -b$, $f(x)$ will change sign. Once $x$ crosses the other one, it will change sign again.

This strategy needs to be modified if any of the roots are repeated. For example, $f(x)=(x-2)^5(x-3)^4$. This is positive for "large" $x$. Crossing below $3$ the sign does not change, because $4$ is even, so $f(x)$ is positive in $(2,3)$. Crossing below $2$ the sign does change, because $5$ is odd, so $f(x)$ is negative on $(-\infty, 2)$.

share|cite|improve this answer

Sure. If you have those factorizations, then it's not so bad. You want to look at the sign of each individual term.

In the case of $(1)$, we know that $f(x)$ will be positive when $(x+a)$ and $(x+b)$ are the same sign, and negative when they are different. When is $x + a < 0$? Well, when $x < -a$. When is $x + b < 0$? Similarly, when $x < -b$. Without loss of generality, assume $a > b$.

Then when $x < -a$, we also have $x < -b$. So we would have $f(x) = (x+a)(x+b) = (-)(-) = (+)$.

How about when $-a < x < -b$? Then we have $f(x) = (-)(+) = (-)$.

And when $-a < -b < x$? Then we have $f(x) = (+)(+) = (+)$.

Of course, when you have either $x = -a$ or $x = -b$, then $f(x) = 0$. And if $a = b$, $f(x) = (x+a)^{2}$, so it's always nonnegative, and zero only when $x = -a$.

Using this kind of analysis, can you try your second example?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.