### Polynomial inequalities

It is worth reviewing some elementary but important points:

First, a person must remember that the *only* way for a product of
numbers to be *zero* is that one or more of the individual numbers
be zero. As silly as this may seem, it is indispensable.

Next, there is the collection of slogans:

- positive times positive is positive
- negative times negative is positive
- negative times positive is negative
- positive times negative is negative.

Or, more cutely: the product of two numbers *of the same sign* is
*positive*, while the product of two numbers *of opposite
signs* is *negative*.

Extending this just a little: for a *product* of real numbers
to be *positive*, the number of *negative* ones must be *even*. If the number of negative ones is *odd* then the product is
*negative*. And, of course, if there are any zeros, then the
product is zero.

#### Solving inequalities

This can be very hard in greatest
generality, but there are some kinds of problems that are very *‘do-able’*. One important class contains problems like

*Solve:*
$$5(x-1)(x+4)(x-2)(x+3)<0$$
That is, we are asking where a *polynomial* is negative (or we
could ask where it's positive, too). One important point is that the
polynomial is *already factored:* to solve this problem we need to
have the polynomial factored, and if it isn't already factored this
can be a lot of additional work. There are many ways to *format*
the solution to such a problem, and we just choose *one*, which
does have the merit of being more efficient than many.

We put the roots of the polynomial $$P(x)=5(x-1)(x+4)(x-2)(x+3)=5\,(x-1)\,(x-(-4))\,(x-2)\,(x-(-3))$$ in order: in this case, the roots are $1,-4,2,-3$, which we put in order (from left to right) $$ \ldots < -4 < -3 < 1 < 2 < \ldots$$ The roots of the polynomial $P$ break the number line into the intervals $$(-\infty,-4),\; (-4,-3),\; (-3,1) ,\; (1,2) ,\; (2,+\infty)$$

On each of these intervals the polynomial is either positive all the time, or negative all the time, since if it were positive at one point and negative at another then it would have to be zero at some intermediate point!

For input $x$ to the right (larger than) all the roots, all
the factors $x+4$, $x+3$, $x-1$, $x-2$ are positive, and the number
$5$ in front also happens to be positive. Therefore, on the interval
$(2,+\infty)$ the polynomial $P(x)$ is *positive*.

Next, moving *across* the root $2$ to the interval
$(1,2)$, we see that the factor $x-2$ changes sign from positive to
negative, while all the other factors $x-1$, $x+3$, and $x+4$ do *not* change sign. (After all, if they would have done so, then they
would have had to be $0$ at some intermediate point, but they *weren't*, since we know where they *are* zero...). Of course the
$5$ in front stays the same sign. Therefore, since the function was
*positive* on $(2,+\infty)$ and just one factor changed sign in
crossing over the point $2$, the function is *negative* on
$(1,2)$.

Similarly, moving *across* the root $1$ to the interval
$(-3,1)$, we see that the factor $x-1$ changes sign from positive to
negative, while all the other factors $x-2$, $x+3$, and $x+4$ do *not* change sign. (After all, if they would have done so, then they
would have had to be $0$ at some intermediate point). The $5$ in front
stays the same sign. Therefore, since the function was *negative*
on $(1,2)$ and just one factor changed sign in crossing over the point
$1$, the function is *positive* on $(-3,1)$.

Similarly, moving *across* the root $-3$ to the interval
$(-4,-3)$, we see that the factor $x+3=x-(-3)$ changes sign from positive to
negative, while all the other factors $x-2$, $x-1$, and $x+4$ do *not* change sign. (If they would have done so, then they
would have had to be $0$ at some intermediate point). The
$5$ in front stays the same sign. Therefore, since the function was
*positive* on $(-3,1)$ and just one factor changed sign in
crossing over the point $-3$, the function is *negative* on
$(-4,-3)$.

Last, moving *across* the root $-4$ to the interval
$(-\infty,-4)$, we see that the factor $x+4=x-(-4)$ changes sign from
positive to negative, while all the other factors $x-2$, $x-1$, and
$x+3$ do *not* change sign. (If they would have done so, then they
would have had to be $0$ at some intermediate point). The $5$ in front
stays the same sign. Therefore, since the function was *negative*
on $(-4,-3)$ and just one factor changed sign in crossing over the
point $-4$, the function is *positive* on $(-\infty,-4)$.

In summary, we have
$$P(x)=5(x-1)(x+4)(x-2)(x+3) > 0 \hbox{ on } (2,+\infty)$$
$$P(x)=5(x-1)(x+4)(x-2)(x+3) < 0 \hbox{ on } (1,2)$$
$$P(x)=5(x-1)(x+4)(x-2)(x+3) > 0 \hbox{ on } (-3,1)$$
$$P(x)=5(x-1)(x+4)(x-2)(x+3) < 0 \hbox{ on } (-4,-3)$$
$$P(x)=5(x-1)(x+4)(x-2)(x+3) > 0 \hbox{ on } (-\infty,-4)$$
In particular, $P(x)<0$ on the *union*
$$ (1,2) \cup (-4,-3)$$
of the intervals $(1,2)$ and $(-4,-3)$. That's it.

As another example, let's see on which intervals
$$P(x)=-3(1+x^2)(x^2-4)(x^2-2x+1)$$ is positive and and on which it's
negative. We have to factor it a bit more: recall that we have nice
facts
$$x^2-a^2=(x-a)\;(x+a)= (x-a)\;(x-(-a))$$
$$x^2-2ax+a^2=(x-a)\;(x-a)$$
so that we get
$$P(x)=-3(1+x^2)(x-2)(x+2)(x-1)(x-1)$$
It is important to note that the equation $x^2+1=0$ has no *real*
roots, since the square of any real number is non-negative. Thus, we
can't factor any further than this over the real numbers.
That is, the roots of $P$, in order, are
$$-2< < 1 \hbox{ (twice!) }\;< 2 $$
These numbers break the real line up into the intervals
$$(-\infty,-2),\;(-2,1),\;(1,2),\;(2,+\infty)$$

For $x$ larger than all the roots (meaning $x>2$) all the
factors $x+2$, $x-1$, $x-1$, $x-2$ are *positive*, while the
factor of $-3$ in front is *negative*. Thus, on the interval
$(2,+\infty)$ $P(x)$ is *negative*.

Next, moving *across* the root $2$ to the interval
$(1,2)$, we see that the factor $x-2$ changes sign from positive to
negative, while all the other factors $1+x^2$, $(x-1)^2$, and $x+2$ do
*not* change sign. (After all, if they would have done so, then
they would have be $0$ at some intermediate point, but they *aren't*). The $-3$ in front stays the same sign. Therefore, since the
function was *negative* on $(2,+\infty)$ and just one factor
changed sign in crossing over the point $2$, the function is *positive* on $(1,2)$.

A *new feature* in this example is that the root $1$ occurs *twice* in the factorization, so that crossing over the root $1$ from
the interval $(1,2)$ to the interval $(-2,1)$ really
means crossing over *two* roots. That is, *two* changes of
sign means *no* changes of sign, in effect. And the other factors
$(1+x^2)$, $x+2$, $x-2$ do not change sign, and the $-3$ does not
change sign, so since $P(x)$ was *positive* on $(1,2)$ it is *still* positive on $(-2,1)$. (The rest of this example is the same as
the first example).

Again, the point is that each time a root of the polynomial
is *crossed over*, the polynomial changes sign. So if *two*
are crossed at once (if there is a double root) then there is really
*no* change in sign. If *three* roots are crossed at once,
then the effect is to *change* sign.

Generally, if an *even* number of roots are crossed-over, then
there is *no* change in sign, while if an *odd* number of
roots are crossed-over then there *is* a change in sign.

#### Exercises

- Find the intervals on which $f(x)=x(x-1)(x+1)$ is positive, and the intervals on which it is negative.
- Find the intervals on which $f(x)=(3x-2)(x-1)(x+1)$ is positive, and the intervals on which it is negative.
- Find the intervals on which $f(x)=(3x-2)(3-x)(x+1)$ is positive, and the intervals on which it is negative.

#### Thread navigation

##### Calculus Refresher

- Previous: Introduction to Calculus Refresher
- Next: Domain of functions