A recent question asked about quadratic inequalities; we’ve touched on that in Domain, Range, and Quadratic Inequalities, but here we’ll introduce three basic approaches. We’ll follow that with old questions about polynomial inequalities (mostly quadratic) and rational inequalities (fractions), expanding on the basic methods.
Three ways to solve a quadratic inequality
Here’s the recent question:
I still do not understand how to solve quadratic inequalities… I get that we have to set it equal to zero at first (the way I learnt it), but what do you do after to evaluate if the solution(s) are going to be less than or greater than (or equal to)?
And also, what would happen if the quadratic in the first place had no solution (complex solution) or infinitely many solutions?
He attached several problems. Doctor Rick answered:
Hi, Chetan, thanks for writing to The Math Doctors.
You’re asking how to solve quadratic inequalities. You know that the first step is to rewrite the inequality so that one side is zero, and then you solve the corresponding equation. Thus, in the first example problem you showed,
we don’t need the first step — we just solve the equation x2 + 2x – 15 = 0, obtaining the solutions x = -5 and x = 3. Two of the four options are consistent with this. But you’re not sure what to do to decide which of those two options is correct!
There are several methods I could suggest. One involves sketching the graph of the parabola; another works best with the inequality in factored form; and a third method involves testing some values. I’ll run through them all briefly, and you can tell me which you’d like to discuss.
1. Graphical thinking
- Graphing: You can look at the quadratic and tell at a glance whether it “opens upward” or “opens downward”. (Hint: Just look at the coefficient of x2.) If it opens upward, then its value is positive outside the two zeros, and negative between the two zeros; if it opens downward, then the reverse is true. (You don’t even need to sketch the graph, but what I just described will help you make the sketch if you wish!)
Since the leading coefficient here is positive, it opens upwards, and the solution (less than) is between the two critical values (points where a sign changes). You only have to imagine the graph, since quadratic functions are well-known:

But we don’t need to be able to actually sketch the graph; one basic graphical idea can be applied to more complicated functions. In this case, for example, without specifically using our knowledge of quadratics, we can just observe that the value will be positive for large x (since the leading term will dominate), and that the sign will change at each zero (because they both have multiplicity 1). So we can just find those zeros and mark the intervals between them on a number line, putting + on the rightmost one, and alternating signs as we work right to left, passing each zero:
+ - +
<-------+-------+------->
-5 3
We can use this number line to determine the solution, where the function is negative:
+ - +
<-------o=======o------->
-5 3
The solution is \((-5,3)\).
2. Number line, factor by factor
- Factoring: I happen to have found the solutions above by factoring the quadratic:
x2 + 2x – 15 = (x + 5)(x – 3)
Thus the solutions are x = -5 and x = 3. Now, I consider the three intervals into which these numbers divide the number line: x < -5, -5 < x < 3, and 3 < x.
If x < -5 then both factors, (x + 5) and (x – 3), are negative. The product of two negative numbers is positive, so (x + 5)(x – 3) > 0 for x < -5.
Do the same for the other two intervals.
We can do this on a number line, marking the intervals with the signs we find, +, -, +, and choosing the middle one as our solution:
(x+5): - 0 + +
(x-3): - - 0 +
quotient: + 0 - 0 +
<-------+-------+------->
-5 3
o=======o
This takes more writing than the graphical approach above, but that means we have more checks on our work, to avoid silly mistakes.
3. Table, using test values
- Testing: You pick one number in each of the three intervals above, and evaluate the polynomial for each number. For instance, I might choose x = 0 as a number between -5 and 3; evaluating x2+ 2x – 15 is easy: it’s -15, which is negative. Thus the polynomial is negative for all values between -5 and 3. Why is this? Because the polynomial cannot change sign without passing through zero. (We say the polynomial is a continuous function.)
Here, we could make a table:
| Interval | Test value | \(f(x)=x^2+2x-15\) | Sign | Include? |
| \((-\infty,-5)\) | -6 | \((-6)^2+2(-6)-15=9\) | + | no |
| \((-5,3)\) | 0 | \(0^2+2(0)-15=-15\) | – | YES |
| \((3,\infty)\) | 4 | \(4^2+2(4)-15=9\) | + | no |
I often point out to students using the last two methods that they can use multiplicity as a way to check their work: If we find that the signs change where they shouldn’t, or don’t change where they should, we would know to check our work. (I say this particularly when the teacher clearly expects them to use test values, so I don’t want them to skip that.)
What if there aren’t two critical values?
Now, what about his specific questions?
There is more I could say about each of these methods, but I want to know which interests you — or which raises questions in your mind! I’ll be happy to discuss all of these things, if you wish.
You also asked about the special cases, when “the quadratic in the first place had no solution (complex solution) or infinitely many solutions”. The quadratic equation can have two solutions (the general case I discussed above), or one solution (if the parabola just touches the x axis), or no solutions (if the parabola does not intersect the x axis at all).
For now, let’s just consider the last case (no solutions). Graphically, if the parabola does not cross the x axis, then it is either all above the axis, or all below the axis. If our inequality said P(x) < 0 (using P(x) to stand for the polynomial), then the solution set is all real numbers if the parabola is entirely below the x axis, and no real numbers if it is entirely above the x axis. (I’m not stating rules to learn; I’m just describing what I can see in my mind. You may need to make a quick sketch to see it.)
That’s a quick summary; I know it doesn’t resolve all your questions, but it gives you things to talk about. You might try applying one of the methods to any of your problems, and let me know what you get, or what difficulties you encounter.
Any of the three methods will still yield a solution in any case, though you may momentarily pause when you have to choose an interval defined by no points! The only interval is the entire number line, and on it the function is either everywhere +. or everywhere -. So we have either everything in the solution set, or nothing in the solution set.
The truly interesting special case is when the equation has one solution. Then the number line will be divided into only two regions. For fun, try solving these four inequalities yourself: $$x^2+2x+1>0$$ $$x^2+2x+1\ge0$$ $$x^2+2x+1<0$$ $$x^2+2x+1\le0$$
This question led me to explore old answers to related questions, where I found similar methods, and variations on them. Let’s look.
Solving a quadratic inequality case by case
In this question from 1996 we’ll see how to construct a solution from separate cases:
Polynomial Inequality Problem Solve: x^2 - 5x - 6 > 0 (x-6)(x+1) > 0 x>6 x<-1 OR x<6 x>-1 How can I tell which one I'm suppose to use? 7y^2 < 63 7y^2 - 63 < 0 What do I need to do next? Can you please explain to me what I need to be doing with these kinds of problems?
The anonymous student came very close to the correct answer to the first problem.
Doctor Elise answered, showing how the solution splits into two cases:
Let's look at the first one. You've done a great job factoring it.
(x - 6)(x + 1) > 0
Okay. So we're multiplying two numbers together, and their
product has to be a positive number. This means we're either
multiplying a positive number by a positive number, or a negative
number by a negative number, right? So EITHER:
(x - 6) > 0 and (x + 1) > 0 (both numbers are positive)
x > 6 and x > -1
which basically boils down to x > 6, since 6 > -1
OR
(x - 6) < 0 and (x + 1) < 0 (both numbers are negative)
x < 6 and x < -1
which boils down to x < -1
So your answer is either:
x > 6, or x < -1
In the first case, any number that is greater than 6 is also greater than -1; and in the second, any number less than -1 is also less than 6.
We can see that this solution is correct by graphing \(y=x^2-5x-6\) and seeing where it is positive:

Both cases are visible.
The second one, 7y^2 - 63 < 0 , needs to be factored. If possible, I try to factor out the constant in front of the y^2. We can do it here, so I'll show you what I mean. Notice that: 7y^2 - 63 = 7(y^2 - 9) That way, now we just have to factor the smaller term y^2 - 9. Remember though, that factoring out a constant isn't always possible. So now we need to factor: y^2 - 9 Because the first term is y^2, we know we at least have: (y )(y ) Since we have a -9, we know our signs must be like this: (y - )(y + ) Finally, since there's no "y" term, we know that the two middle terms will have to cancel out. This means that the constants we are looking for must be equal. In this case, they are both 3. Thus, 7y^2 - 63 factors to: 7(y - 3)(y + 3) So now we have: 7(y - 3)(y + 3) < 0
This could also be seen as a “difference of squares”, and likely looks different than the student expected.
First, we see that we can divide by 7. It doesn't change the problem, and it makes the solution easier:
(y - 3)(y + 3) < 0
In this case, we are multiplying two numbers together and getting a negative number, so one has to be positive and the other negative.
negative * positive
y - 3 < 0 and y + 3 > 0
y < 3 and y > -3
OR
positive * negative
y - 3 > 0 and y + 3 < 0
y > 3 and y < -3
This second solution is obviously impossible, because a number cannot simultaneously be greater than 3 and less than -3, so you just throw this answer out as "impossible" and go with y is between -3 and 3.
Hope this helps!
Here, the first case gave an interval, \(-3<y<3\); the second case gives an empty solution.
Again, we can see that this is correct by graphing \(y=7x^2-63\) and seeing where it is negative:

This time, only one case gives an actual solution.
Solving a quadratic inequality with a number line and factors
Here’s a 2002 question about a version of the number line method:
Sign Diagrams There is a diagram in my text book that looks something like this: x^2 - 1/2x | | + | - | + __________________________________ | | -1/2 1 I have no idea what it's telling me. Can you help me make sense of it?
This is a useful way to organize the same ideas we saw above, making the process more routine.
I answered:
Hi, Jessie.
When you have a polynomial factored, you can find the sign of the product by considering the sign of each factor separately. So let's first factor our expression as
x^2 - 1/2 x = x(x - 1/2)
The first factor, x, will of course be positive when x > 0 and negative when x < 0:
--------------0+++++++++++++ x
<-------------+------------>
0
I made a line of negative and positive signs above the number line, showing that at every point to the left of 0, x is negative, and at every point to the right, x is positive.
The second factor, x - 1/2, will be positive when x > 1/2:
-------------------0++++++++ x - 1/2
<-------------+----+------->
0 1/2
This time, the sign changes at \(x=\frac{1}{2}\), the solution of \(x-\frac{1}{2}=0\).
Each factor has divided the number line into two parts, in different ways. If we put these together, we make a total of three regions of the number line, and can see what the product of the signs will be in each region:
--------------0+++++++++++++ x
-------------------0++++++++ x - 1/2
++++++++++++++0----0++++++++ x(x - 1/2)
<-------------+----+------->
0 1/2
Whenever both factors are positive or both are negative, the product will be positive; when one is positive and the other negative, the product will be negative. That gives us a simple way to find the sign of the expression everywhere.
We weren’t given an actual inequality; we can see from the diagram that:
- The solution of \(x^2-\frac{1}{2}x<0\) is \(0<x<\frac{1}{2}\), or \(\left(0,\frac{1}{2}\right)\).
- The solution of \(x^2-\frac{1}{2}x\le0\) is \(0\le x\le\frac{1}{2}\), or \(\left[0,\frac{1}{2}\right]\).
- The solution of \(x^2-\frac{1}{2}x>0\) is \(x<0\text{ or } x>\frac{1}{2}\), or \(\left(-\infty,0\right)\cup\left(\frac{1}{2},\infty\right)\).
- The solution of \(x^2-\frac{1}{2}x\ge0\) is \(x\le0\text{ or } x\ge\frac{1}{2}\), or \(\left(-\infty,0\right]\cup\left[\frac{1}{2},\infty\right)\).
Again, here is the graph of \(y=x^2-\frac{1}{2}x\):

We’ll see another common way to make these diagrams later.
Using a number line with factors for a rational inequality
A 2004 question takes us to a number line like what we saw before, but for a rational inequality:
Polynomial Inequality I'm trying to solve the inequality (x^2 + x - 12)/(x + 1) >= 0 (>= means greater than or equal to) I think I can factor the trinomial to get (x - 3)(x + 4)/(x + 1) >= 0. Is that correct, and if so, how do I continue solving?
Here we have a fraction more complicated than the last: $$\frac{x^2+x-12}{x+1}\ge0$$ It factors as $$\frac{(x-3)(x+4)}{x+1}\ge0$$
Doctor Ian answered, using the number line as a more efficient way to handle cases:
Hi Lisa,
You've factored the quadratic correctly. The next thing to do is think about what would have to be true in order for
(x - 3)(x + 4)
-------------- ≥ 0
(x + 1)
to be true. There are several common ways that you can approach this step, but I'll show you the one I like the best because it really helps you understand how those three binomial factors all play a part in the final answer.
I, too, like this way; we’ll see another variation later. There’s one new idea here compared to what we did above for a polynomial inequality.
If you think about it, all you really need to pay attention to are the signs of the three factors. Note that (x + 1) is 0 at x = -1, positive whenever x is greater than -1, and negative when it's less than that:
<--|---|---|---|---|---|---|---|---|---|---|---|-->
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
(x + 1) -----------------0+++++++++++++++++++++++++++++++
A critical value can be where any factor is zero (numerator or denominator), so that signs can change.
What about (x - 3)? It's 0 at x = 3, positive when x is greater than 3, and negative when x is less than 3:
<--|---|---|---|---|---|---|---|---|---|---|---|-->
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
(x - 3) ---------------------------------0++++++++++++++
We’ll simplify the problem a little by considering only \(\frac{x-3}{x+1}\) for the moment.
So suppose we were just looking at the quotient of those two terms:
<--|---|---|---|---|---|---|---|---|---|---|---|-->
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
(x - 3) ---------------------------------0++++++++++++++
(x + 1) -----------------0++++++++++++++++++++++++++++++
(x - 3)
------- +++++++++++++++++U---------------0++++++++++++++
(x + 1)
negative negative positive
divided by divided by divided by
negative is positive is positive is
positive negative positive
The 'U' at x = -1 means 'undefined', since dividing by (x + 1) when x is equal to -1 means dividing by zero. The 0 at x = 3 means that the quotient is 0 there since 0 divided by a positive number will be 0. Everywhere else on the number line, the quotient is positive or negative as determined by the signs of the two factors, as shown.
Doctor Ian has nicely avoided giving away the final answer, while demonstrating all of the necessary ideas by doing this partial example.
Can you see how to work the remaining factor, (x + 4), into this? Once you do, remember that since your original inequality was 'greater than or equal to zero,' your final answer should include all parts of the number line where the overall expression is positive or equals zero.
Let’s finish.
Here is how I might actually draw the diagram:

I don’t need to show any numbers on the number line except the critical values, or to be sure they are to scale; I only mark the sign of each factor once in each interval. I also write u rather than 0 where any factor in the divisor is 0, so I don’t miss that at the end! I put an open circle at each u, and a closed circle at each 0 (because equality is included in \(\ge\)).
And here is the graph, showing that our solution is correct: $$y=\frac{(x-3)(x+4)}{x+1}$$

Supplementing with graphical thinking
We can also apply the first idea we looked at (using the multiplicity of critical values to label a number line), consider this much more complicated example: $$\frac{(x-1)^2(x+2)}{(x+1)(x-2)^2}\le0$$
The critical values are 1 (multiplicity 2), -2, -1, and 2 (multiplicity 2); so the sign will change at -1 and -2, but not at 1 and 2:
+ 0 - u + 0 + u +
<-------+-----+---------+-----+------->
-2 -1 1 2
m1 m1 m2 m2
*=====o * o
I started at the right with + (because all factors are positive for large x), and kept the same sign as I passed the zeros with multiplicity 2, and changed sign as I passed the others. I also marked 0 where the numerator is 0 and u where the denominator is 0. Then, since 0 is allowed, I put solid dots at 0’s, open dots at u’s, and a line in the negative intervals. (The isolated open dot at 2 would be erased, as it turns out not to have any effect.) So the function is negative in one interval, and zero at two points, so our solution is \([-2,-1)\cup\{1\}\) as shown.
A graph agrees:

Using test points for a rational inequality
For a variation on the same method, without the number line, consider this question from 1997:
Linear Inequalities How do I solve the problem (x-2)/(x+1) < (x-4)/(x-1) ?
This is perhaps the most complex example yet: $$\frac{x-2}{x+1}<\frac{x-4}{x-1}$$
Doctor Rob answered:
Ahh! Good question! First I would bring both terms over to one side of the equation, and combine them: (x-2)/(x+1) - (x-4)/(x-1) < 0, [(x-2)(x-1)-(x+1)(x-4)]/[(x+1)(x-1)] < 0, [x^2-3x+2-x^2+3x+4]/[(x+1)(x-1)] < 0, 6/[(x+1)(x-1)] < 0
This is a standard first step; getting 0 on one side, so we can focus on signs. I’ll make that a little more readable: $$\frac{x-2}{x+1}-\frac{x-4}{x-1}<0\\\frac{(x-2)(x-1)}{(x+1)(x-1)}-\frac{(x+1)(x-4)}{(x+1)(x-1)}<0\\\frac{x^2-3x+2-x^2+3x+4}{(x+1)(x-1)}<0\\\frac{6}{(x+1)(x-1)}<0$$
Now I would divide both sides by 6 to simplify, and take the reciprocal of both sides (since 1/a < 0 if and only if a < 0): (x+1)(x-1) < 0
This is not at all standard, yet it is a nice way to simplify the problem to a mere polynomial. On the other hand, it does not affect any of the rest we do, and would be risky if we were allowing equality, since we would be dividing by zero.
The roots of the polynomial on the left are -1 and 1, which divide the real number line into three regions: 1. x < -1 2. -1 < x < 1 3. 1 < x The sign of the polynomial will be the same throughout each region, but it may differ from region to region. To figure out the sign in each region, it suffices to pick a representative point in each, such as -1000, 0, and +1000, and figure out the sign at those points. The union of those regions where the sign is negative forms your solution set.
Here he’s suggesting the method my students have commonly been taught in class, where rather than consider each factor separately, we make a table and plug in a value from each interval.
As I explain it to students, a polynomial can only change sign by passing through zero, so in each interval between the critical values where it is zero (here \(1\) and \(-1\)), it will have a fixed sign. We just have to find those signs, which we can do by checking the sign at any point in each interval. I try to choose easy values to work with. Here, the suggestion was -1000, 0, and 1000:
| Interval | Test value | \(f(x)=(x+1)(x-1)\) | Sign | Include? |
| \((-\infty,-1)\) | -1000 | \((-999)(-1001)=999999\) | + | no |
| \((-1,1)\) | 0 | \((1)(-1)=-1\) | – | YES |
| \((1,\infty)\) | 1000 | \((1001)(999)=999999\) | + | no |
The huge numbers he suggested imply that he didn’t really mean to carry out the multiplications, but just note the signs (e.g. a big negative number times another big negative number gives a big positive number) factor by factor. I would typically use small, easy numbers like this:
| Interval | Test value | \(f(x)=(x+1)(x-1)\) | Sign | Include? |
| \((-\infty,-1)\) | -2 | \((-1)(-3)=(-)(+)\) | + | no |
| \((-1,1)\) | 0 | \((1)(-1)=(+)(-)\) | – | YES |
| \((1,\infty)\) | 2 | \((3)(1)=(+)(+)\) | + | no |
Textbooks I’ve seen commonly don’t use the factored form; this is perhaps easier for them to explain, but often makes the work harder, since you have to actually calculate the value term by term. Here, that wouldn’t be as hard as in many other problems:
| Interval | Test value | \(f(x)=x^2-1\) | Sign | Include? |
| \((-\infty,-1)\) | -2 | \((-2)^2-1=3\) | + | no |
| \((-1,1)\) | 0 | \(0^2-1=-1\) | – | YES |
| \((1,\infty)\) | 2 | \(2^2-1=3\) | + | no |
When using this method for rational inequalities, you have to take undefined points (where the denominator is zero) also as critical values, since the sign can change there as well.
Here is the graph for this problem (in its original form): $$\frac{x-2}{x+1}<\frac{x-4}{x-1}$$

The LHS is in red, and the RHS is in green; the solution is where red is below green.

