Enter the coefficients a, b and c of the left side, ax² + bx + c, and the sign that compares it with 0. The inequality below is linked to the input fields, so you can also edit the coefficients directly in it.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and graphs
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Find the solution set of a quadratic inequality such as \(ax^{2}+bx+c>0\) just by entering the coefficients and choosing the sign. All four signs, \(>\), \(\ge\), \(<\) and \(\le\), are supported
- The steps split into cases by the sign of the discriminant \(D=b^{2}-4ac\), line by line, in the same order as a textbook. Besides "outside the two roots" and "between the two roots", it also handles tricky answers such as \(x \neq \alpha\), no solution and all real numbers
- When the coefficient of \(x^{2}\) is negative, the steps also show multiplying both sides by \(-1\) and flipping the inequality sign
- Boundary values are shown as exact values with simplified radicals, such as \(\dfrac{1+\sqrt{5}}{2}\), with decimals added when they are irrational. Coefficients can be decimals, negative numbers or fractions such as 3/4
- A color-coded graph of the parabola and the solution set lets you see that "the solution of \(y>0\) is the range of \(x\) where the graph is above the \(x\)-axis"
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
The height of an object thrown straight up is a quadratic function of the time \(t\) in seconds: \(h = v_{0}t - 16t^{2}\) feet, where \(v_{0}\) is the starting speed in feet per second. Asking "during what time is it at least a certain height?" gives a quadratic inequality directly.
For a ball thrown up at 64 feet per second, the time it is at least 48 feet high comes from \(64t - 16t^{2} \ge 48\), that is, \(t^{2} - 4t + 3 \le 0\), which gives 1 to 3 seconds after the throw, 2 seconds in all. Air resistance is ignored, but it gives a rough idea of how long fireworks stay in view or how long a fly ball is in the air.
A car's stopping distance is the distance traveled while you react and hit the brakes (reaction distance) plus the distance traveled while braking (braking distance). The reaction distance grows in proportion to speed, but the braking distance grows with the square of speed, so the stopping distance is a quadratic function of speed.
With a 1-second reaction time and a road-tire friction coefficient of 0.7, the stopping distance is about \(v + \dfrac{v^{2}}{45.08}\) feet (\(v\) in feet per second). To stop within 200 feet of clear view, solve \(v + \dfrac{v^{2}}{45.08} \le 200\): the speed must be at most about 75 feet per second, or about 51 mph. Speed limits and following-distance guidelines are based on quadratic relationships like this.
Raising the price increases the profit per item, but fewer items sell. When the number sold is a linear function of the price, the profit (profit per item × number sold − fixed costs) is a quadratic function of the price, and "the prices where the profit is 0 or more" come from a quadratic inequality.
Suppose an item costs $3 to make, \(1000 - 200p\) items sell at a price of \(p\) dollars, and fixed costs are $100. Solving \((p-3)(1000-200p) - 100 \ge 0\) shows a profit between about $3.30 and $4.70. The feeling that "too cheap or too expensive both lose money" is confirmed with numbers.
For a rectangle with a fixed perimeter, choosing the length also fixes the width, so the area is a quadratic function of the length. "Which sizes give at least the area I need?" is a quadratic inequality.
Suppose you enclose a rectangular garden with 40 feet of fence and want at least 91 square feet. With a length of \(x\) feet, the width is \(20-x\) feet, so \(x(20-x) \ge 91\), which gives a length from 7 to 13 feet. You can also see that the closer to a square, the larger the area (here the largest is 100 square feet at 10 feet).
The cross section of a parabolic arch bridge or tunnel can be written as a quadratic function. "How far from the center can a tall vehicle pass?" is exactly a quadratic inequality.
Suppose an arch 80 feet wide and 16 feet high at the center is \(y = -0.01x^{2} + 16\) (\(x\) is the distance from the center). The part at least 15 feet high comes from \(-0.01x^{2} + 16 \ge 15\): 10 feet on each side of the center, 20 feet wide in all. Decisions such as keeping large trucks near the center or posting a height limit are based on calculations like this.
Formulas and graphs
Symbols and terms
Symbols
| \(a,\ b,\ c\) | a, b, c | The coefficients of the quadratic inequality \(ax^{2}+bx+c>0\): \(a\) is the coefficient of \(x^{2}\), \(b\) the coefficient of \(x\), and \(c\) the constant term. By custom, letters near the start of the alphabet, \(a,\ b,\ c\), stand for numbers that are given in advance. |
| \(x\) | ex | The unknown number. A quadratic inequality asks "from where to where do the values of \(x\) make it true?", so the answer is a range, not a single number. By custom, letters near the end of the alphabet, \(x,\ y,\ z\), are used for unknowns. |
| \(D\) | dee | The discriminant, \(b^{2}-4ac\). \(D\) is the first letter of "discriminant" (the thing that tells cases apart). Its sign alone decides how the parabola meets the \(x\)-axis (the form of the solution). |
| \(\alpha,\ \beta\) | alpha, beta | Names for the two roots of the quadratic equation \(ax^{2}+bx+c=0\). They are the first and second letters of the Greek alphabet, and by custom \(\alpha < \beta\) (\(\alpha\) is the smaller one). In a quadratic inequality, these two are the boundaries of the solution set. |
| \(>,\ <\) | greater than, less than | Inequality signs. \(A>B\) means "\(A\) is greater than \(B\)", and \(A<B\) means "\(A\) is less than \(B\)"; the open side always faces the larger number. They do not include "equal to", so the boundary values themselves are not solutions. |
| \(\ge,\ \le\) | greater than or equal to, less than or equal to | Inequality signs that include "equal to". \(A \ge B\) means "\(A\) is greater than or equal to \(B\)", and \(A \le B\) means "\(A\) is less than or equal to \(B\)". The boundary values themselves are solutions too. Some countries, such as Japan, write them with a double line under the sign (≧, ≦); the meaning is the same. |
| \(\neq\) | not equal to | The symbol for "is not equal to". \(x \neq 3\) means "\(x\) can be any value except 3". In quadratic inequalities, this form of answer appears when the parabola touches the \(x\)-axis (\(D=0\)). |
| \(\sqrt{\phantom{x}}\) | square root | The symbol for the positive number whose square is the number inside (the square root). \(\sqrt{5}\) is "the positive number whose square is 5", about 2.236. It is said to come from a stylized letter r, for the Latin word radix, "root". It appears when the boundary values do not come out exactly. |
| \(\Longleftrightarrow\) | if and only if (is equivalent to) | A symbol that says the left and right sides mean the same thing. \(P \Longleftrightarrow Q\) means "when \(P\) is true, \(Q\) is true, and the other way around". When you rewrite an inequality, take care to keep this relation (so that the solution does not change). |
| \(y\) | why | The value of the quadratic function \(y=ax^{2}+bx+c\), the "height" of the parabola. Solving \(ax^{2}+bx+c>0\) is the same as finding the range of \(x\) where this height is greater than 0 (where the graph is above the \(x\)-axis). |
Terms
| quadratic inequality | An inequality with an \(x^{2}\) term, such as \(ax^{2}+bx+c>0\). The answer is a range of \(x\), not a single number. Taught in Algebra 1 and Algebra 2. |
| inequality | A statement that compares two amounts with \(>\), \(<\), \(\ge\) or \(\le\). Adding or subtracting the same number on both sides does not change the direction, but multiplying or dividing by a negative number flips it. |
| quadratic function | A function of the form \(y=ax^{2}+bx+c\) (\(a \neq 0\)). Its graph is a parabola. A quadratic inequality can be restated as reading off where this graph is above or below the \(x\)-axis. |
| parabola | The smooth, symmetric curve that is the graph of a quadratic function. A ball thrown at an angle follows this shape. |
| opens upward | A parabola in a valley shape (both ends pointing up). This happens when the \(x^{2}\) coefficient is positive. When the coefficient is negative, it is a hill shape and "opens downward". An upward-opening parabola is also called concave up. |
| discriminant | \(D=b^{2}-4ac\). It tells how many real solutions the quadratic equation has (how many times the parabola meets the \(x\)-axis): 2 if \(D>0\), 1 (a double root) if \(D=0\), and 0 if \(D<0\). |
| real solution | A solution that is an ordinary number on the number line (a real number). When \(D<0\), there are no real solutions, and the parabola does not meet the \(x\)-axis. |
| double root | The solution when \(D=0\). Two equal solutions come together, as in \((x-3)^{2}=0\), and the parabola touches the \(x\)-axis at one point. |
| quadratic formula | \(x=\dfrac{-b \pm \sqrt{b^{2}-4ac}}{2a}\). It solves quadratic equations even when you cannot factor them, and in quadratic inequalities it gives the boundary values. |
| factoring | Rewriting an expression as a product, as in \(x^{2}-3x+2=(x-1)(x-2)\). In a quadratic inequality, if you can factor, you see the boundary values at a glance. |
| boundary value | A value where the solution set begins or ends. In a quadratic inequality, these are the solutions of \(ax^{2}+bx+c=0\), the \(x\)-coordinates where the parabola meets the \(x\)-axis. They are included with \(\ge\) or \(\le\) and left out with \(>\) or \(<\). They are also called critical values. |
| solution set | All the values of \(x\) that make the inequality true. It can be one range, such as \(1<x<2\), or two separate ranges, such as \(x<1\) or \(2<x\). |
| compound inequality | Finding the \(x\) that satisfies several inequalities at once. The range that satisfies both \(1<x\) and \(x<2\) is written as one chain, \(1<x<2\). |
| no solution | There is no \(x\) at all that makes the inequality true. It happens, for example, with \(x^{2}+2x+5<0\), where an upward-opening parabola never dips below the \(x\)-axis. |
| all real numbers | The inequality is true for any \(x\). With a positive \(x^{2}\) coefficient, this is the answer for \(>0\) or \(\ge 0\) when \(D<0\) (the parabola never meets the \(x\)-axis). When \(D=0\), \(\ge 0\) also gives all real numbers, because the touching point counts through "equal to". (With the same \(D<0\), \(<0\) or \(\le 0\) has no solution.) |
| number line | A picture that places numbers on a straight line. To show the solution of a quadratic inequality, draw the range as a thick line, with a closed circle at an included boundary and an open circle at one that is not included. |
| moving a term | Moving a term of an inequality or equation to the other side and changing its sign. If there is an expression on the right side, move it to the left so that the right side is 0 before solving. |
| constant term | A number-only term with no \(x\), such as the 5 in \(x^{2}+3x+5\). It is called constant because it does not change whatever value \(x\) has. |
| coefficient | The number in front of a letter. In \(3x^{2}\), the coefficient is 3. When no number is written, as in \(x^{2}\), the coefficient is 1. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.
| Properties of inequalities (Grade 7 and Algebra 1) |
|
| Factoring (Algebra 1) |
|
| Solving quadratic equations (Algebra 1) |
|
| Graphs of quadratic functions (Algebra 1) |
|
| Square roots (Grade 8) |
|
| The number line and ranges (Grades 6–7) |
|
How to calculate it in Excel
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Smaller root α | =(-B2-SQRT(B4))/(2*B1) |
| Larger root β | =(-B2+SQRT(B4))/(2*B1) |
| Solution set (outside) | ="x < "&B5&" or "&B6&" < x" |
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Smaller root α | =(-B2-SQRT(B4))/(2*B1) |
| Larger root β | =(-B2+SQRT(B4))/(2*B1) |
| Solution set (between) | =B5&" < x < "&B6 |
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Number of x-axis crossings | =IF(B4>0,2,IF(B4=0,1,0)) |
| Coefficient of x², a | -1 |
| Coefficient of x, b | 4 |
| Constant term c | -3 |
| x² coefficient times −1 | =-B1 |
| x coefficient times −1 | =-B2 |
| Constant term times −1 | =-B3 |
| Discriminant after the change (same as before) | =B5^2-4*B4*B6 |
"^" means a power, "SQRT" is the square root, and "&" joins text together.
The first and second tables both use a=1, b=−3, c=2 (that is, x²−3x+2). The discriminant is 1, the boundary values are 1 and 2, and the solutions are "x < 1 or 2 < x" (outside) and "1 < x < 2" (between). If you enter coefficients that make the discriminant negative, SQRT returns an error, so check the number of crossings with the third table first.
The third table finds only the discriminant, and the IF function also decides the number of x-axis crossings (2, 1 or 0).
The fourth table changes every sign when the x² coefficient is negative (a=−1, b=4, c=−3). The new coefficients are 1, −4 and 3, and you can check that the discriminant is 4 both before and after the change.
How to calculate it in Google Sheets
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Smaller root α | =(-B2-SQRT(B4))/(2*B1) |
| Larger root β | =(-B2+SQRT(B4))/(2*B1) |
| Solution set (outside) | ="x < "&B5&" or "&B6&" < x" |
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Smaller root α | =(-B2-SQRT(B4))/(2*B1) |
| Larger root β | =(-B2+SQRT(B4))/(2*B1) |
| Solution set (between) | =B5&" < x < "&B6 |
| Coefficient of x², a | 1 |
| Coefficient of x, b | -3 |
| Constant term c | 2 |
| Discriminant D = b^2-4ac | =B2^2-4*B1*B3 |
| Number of x-axis crossings | =IF(B4>0,2,IF(B4=0,1,0)) |
| Coefficient of x², a | -1 |
| Coefficient of x, b | 4 |
| Constant term c | -3 |
| x² coefficient times −1 | =-B1 |
| x coefficient times −1 | =-B2 |
| Constant term times −1 | =-B3 |
| Discriminant after the change (same as before) | =B5^2-4*B4*B6 |
How to calculate it in Python
from fractions import Fraction
import math
# Coefficients of the quadratic inequality (the left side a*x^2 + b*x + c is compared with 0) and the sign (">", ">=", "<" or "<=")
a = Fraction(1)
b = Fraction(-3)
c = Fraction(2)
sign = ">"
# Make the x^2 coefficient positive (if negative, multiply both sides by -1 and flip the sign)
if a < 0:
a, b, c = -a, -b, -c
sign = {">": "<", ">=": "<=", "<": ">", "<=": ">="}[sign]
discriminant = b * b - 4 * a * c
is_greater = sign in (">", ">=")
has_equal = sign in (">=", "<=")
if discriminant > 0:
root = math.sqrt(discriminant)
alpha = (-b - root) / (2 * a)
beta = (-b + root) / (2 * a)
mark = "<=" if has_equal else "<"
if is_greater:
answer = f"x {mark} {alpha} or {beta} {mark} x" # outside the two roots
else:
answer = f"{alpha} {mark} x {mark} {beta}" # between the two roots
elif discriminant == 0:
alpha = -b / (2 * a)
answer = {">": f"x != {alpha}", ">=": "all real numbers",
"<": "no solution", "<=": f"x = {alpha}"}[sign]
else:
answer = "all real numbers" if is_greater else "no solution"
print(f"Discriminant D = {discriminant}")
print(f"Solution set: {answer}")
How to write it in LaTeX and other math languages (copy and paste)
x < α or β < x
x < \alpha \ \text{or}\ \beta < x
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>x</mi><mo><</mo><mi>α</mi>
<mtext> or </mtext>
<mi>β</mi><mo><</mo><mi>x</mi>
</mrow>
</math>
x < alpha " or " beta < x
Reduce[a x^2 + b x + c > 0 && a > 0, x, Reals]
solve(a*x^2 + b*x + c > 0, x);
solve(a*x^2 + b*x + c > 0, x)
x < α or β < x
α < x < β
\alpha < x < \beta
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>α</mi><mo><</mo><mi>x</mi><mo><</mo><mi>β</mi>
</mrow>
</math>
alpha < x < beta
Reduce[a x^2 + b x + c < 0 && a > 0, x, Reals]
solve(a*x^2 + b*x + c < 0, x);
solve(a*x^2 + b*x + c < 0, x)
α < x < β
D = b² − 4ac
D = b^{2} - 4ac
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>D</mi><mo>=</mo>
<msup><mi>b</mi><mn>2</mn></msup>
<mo>−</mo>
<mn>4</mn><mi>a</mi><mi>c</mi>
</mrow>
</math>
D = b^2 - 4ac
Discriminant[a x^2 + b x + c, x]
discrim(a*x^2 + b*x + c, x);
D = b^2 - 4*a*c;
D = b^2 - 4ac
ax² + bx + c < 0 ⟺ −ax² − bx − c > 0
ax^{2} + bx + c < 0 \Longleftrightarrow -ax^{2} - bx - c > 0
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>a</mi><msup><mi>x</mi><mn>2</mn></msup>
<mo>+</mo><mi>b</mi><mi>x</mi><mo>+</mo><mi>c</mi>
<mo><</mo><mn>0</mn>
<mo>⟺</mo>
<mo>−</mo><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup>
<mo>−</mo><mi>b</mi><mi>x</mi><mo>−</mo><mi>c</mi>
<mo>></mo><mn>0</mn>
</mrow>
</math>
ax^2 + bx + c < 0 hArr -ax^2 - bx - c > 0
Reduce[-a x^2 - b x - c > 0, x, Reals]
solve(-a*x^2 - b*x - c > 0, x);
solve(-a*x^2 - b*x - c > 0, x)
ax^2 + bx + c < 0 ⟺ -ax^2 - bx - c > 0
How to have ChatGPT do the calculation
You are a calculation assistant for algebra. Solve the following problem by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). Solve the quadratic inequality x² − 3x + 2 > 0. Show each of the following: 1. The value of the discriminant D = b² − 4ac 2. The boundary values (the solutions of x² − 3x + 2 = 0) 3. The solution set (also say whether it is "outside the two roots", "between the two roots", "all real numbers" or "no solution") 4. If the x² coefficient were negative, also show the step of multiplying both sides by −1 and flipping the sign In Python, use both sympy's solve_univariate_inequality and an exact discriminant calculation with fractions, and answer only after confirming that the results agree.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
