Algebra Constraint Solver
Solve for x or another single-letter variable in linear, polynomial and rational inequalities or equations. Enter up to six constraints, join them with AND or OR, and read the exact solution in interval and inequality notation, with a sign table and a number-line graph. Denominator exclusions stay visible even when a factor cancels.
Your constraints
Example input
Read as 1, with x as the variable.
Use numbers, one letter, + - * / ^ and brackets, then a comparison: < <= > >= = or !=. Chain two in one row, as in -1 < 2x + 1 <= 5. AND is applied before OR, and blank rows are skipped. Up to 6 rows; after moving everything to one side, each numerator and denominator can reach degree 8 with coefficients up to 100 digits.
Solution set
(-∞, -2) ∪ [1, ∞)
x < -2 or x ≥ 1
Text equivalent: Critical points in order, evenly spaced and not to scale: -2 open (not included); 1 filled (included). Shaded: (-∞, -2) ∪ [1, ∞).
The example below is already solved. Edit it or type your own constraints.
- Domain restriction
- x ≠ -2
- Critical points
- -2, 1
- Solution
- (-∞, -2) ∪ [1, ∞)
- Certification
- 2 exact rational
Sign table
Each f is the left side minus the right side of one comparison. A test point inside every interval fixes each sign exactly; at a critical point the sign is 0, undefined or the same as on both sides.
- f1(x) = (x - 1)/(x + 2), from constraint 1, needs f1 ≥ 0
| Region | Test point | f1 sign | Constraint 1 | In the set |
|---|---|---|---|---|
| x < -2 | -3 | + | holds | yes |
| x = -2 | boundary | undefined | fails | no |
| -2 < x < 1 | 0 | − | fails | no |
| x = 1 | boundary | 0 | holds | yes |
| x > 1 | 2 | + | holds | yes |
Critical points
| Point | Approximation | Certificate | Role | In the set |
|---|---|---|---|---|
| -2 | -2 | exact rational | outside the domain of constraint 1; pole of f1 | no |
| 1 | 1 | exact rational | zero of f1 | yes |
Worked examples
Common questions
- How do I type an inequality?
- Use numbers, a single letter as the variable, + - * / ^ and brackets, then one of < <= > >= = or !=. Pasted symbols such as ≤, ≥, ≠, x² and the typographic minus sign are read too. 2x means 2 times x and x^-1 means 1/x. Implied multiplication has the same precedence as * and /, read left to right, so 1/2x is read as (1/2)x; write 1/(2x) for the other meaning. One row can chain two comparisons, as in -1 < 2x + 1 <= 5, and both must hold.
- Can it solve linear, quadratic and compound inequalities?
- Yes, in one real variable. -2x + 4 < 0 gives x > 2, and x^2 > 1 gives x < -1 or x > 1. For a compound inequality, type a chain such as -1 < 2x + 1 <= 5 in one row, which gives -1 < x <= 2. Separate conditions can go in separate rows: use AND for their intersection or OR for their union. One-step, two-step and longer rational expressions use the same solver.
- What working does the sign table show?
- Each comparison is written as f(x), its left side minus its right side. Critical points list the zeros and excluded values; the Sign table then gives an exact test point and each function's sign in every interval, plus whether each constraint holds and whether that region is in the solution. This is sign-chart working, rather than a line-by-line sequence of arithmetic operations to isolate x.
- What does the inequality graph show?
- It shows the solution on a number line. Filled circles include a boundary, open circles exclude it, and shaded segments contain the solutions. Critical points are ordered but evenly spaced, so the drawing is not to scale. The Text equivalent states the same endpoints and intervals. This page does not draw two-variable coordinate regions or read an uploaded graph to find its inequality.
- How do I read the interval notation?
- A square bracket includes an endpoint and a round bracket leaves it out; infinity always has a round bracket. The union sign ∪ joins separate pieces. For x^2 > 1, (-∞, -1) ∪ (1, ∞) means x < -1 or x > 1. An isolated answer such as x = 3/2 is written {3/2}, and ∅ means no real solution. The inequality form appears beside the interval answer; interval strings and set-builder notation are not accepted as input.
- Can I solve a fraction equation or find a missing numerator or denominator?
- Use = for an equation and a letter for the missing value. x/5 = 3/10 gives x = 3/2; 2/x = 3/4 gives x = 8/3 and keeps x = 0 out of the domain. Inequalities with fractions work too: x/3 <= 1/2 gives x <= 3/2. Put a multi-term numerator or denominator in brackets, such as (x + 1)/(x - 2). The answers are real values, so a missing numerator is not assumed to be a whole number.
- Can I check whether an inequality is true at a value?
- Substitute that value for the letter before typing the comparison. To check x/3 <= 1/2 at x = 1, enter 1/3 <= 1/2. A true constant comparison shades the whole line and says every real x; a false one gives ∅ and no real x. With several rows, the Sign table also shows holds or fails for each constraint.
- Why is a value missing when it solves the simplified equation?
- (x^2 - 1)/(x - 1) = 2 simplifies to x + 1 = 2, whose solution is x = 1, but the typed expression divides by zero at 1. The solver keeps every point where any denominator in the row is zero out of that row's domain, including denominators that cancel and nested ones such as 1/(1/x), so the answer here is the empty set. Excluded points are listed under Domain restriction and in the critical point table.
- How are AND and OR combined?
- Each row after the first has an AND or OR toggle joining it to the row above. AND is applied before OR, as in ordinary logic, and the page states the grouping it used, for example 1 OR (2 AND 3). A point outside one row's domain makes that row false, but it can still be in the answer through an OR. Blank rows are skipped, and each typed row joins the rows before it with the toggle directly above it.
- How are irrational boundaries shown?
- Every boundary is found exactly. A rational boundary is shown as a fraction. When an irrational boundary's defining polynomial is quadratic it is shown in square-root form, such as 1 - √2; otherwise it is named r1, r2 and so on. Factors you type, such as (x^2 - 2)(x^2 - 3), are kept apart so each can get its own form. Each irrational point lists its defining polynomial, an interval that a Sturm count certifies holds exactly one root of that polynomial, and an approximation to 10 significant digits. The points are ordered by exact interval refinement, never by comparing decimals.
- What are the limits?
- Up to six rows of at most 4000 characters each, enough for a dense degree 8 numerator and denominator with 100-digit coefficients. After a comparison is moved to one side, its numerator and denominator can each reach degree 8, the points excluded by one row's denominators together are limited to degree 8, and every normalized coefficient to 100 digits. Powers must be whole numbers no larger than 64 either way, and a row may grow to degree 32 while it is expanded. Past a limit the page names the row and the limit instead of truncating. If exact root separation runs past its work limit, the result is reported as unresolved, never as a partial set.
- What does it not solve?
- It solves real constraints in one variable. It does not handle absolute values, roots, logarithms, trigonometric or other transcendental functions, two or more variables, integer-only answers or word problems. Rewrite |x - 1| < 3 as -3 < x - 1 < 3 to solve it here.
- What do the copy and download buttons give me?
- Copy solution copies the set in interval and inequality notation, the grouping, each constraint with its normalized function and domain, and every critical point with its role. Copy LaTeX copies the same set written in LaTeX, plus a line defining each r1 style point. Download JSON saves the constraints, the critical points with their certified intervals, the full sign table and the solution pieces. Constraints you type are remembered in this browser; examples are not stored.
Real rational constraints in one variable only: no multivariate regions, transcendental functions, integer-only solutions or word-problem interpretation. Exact polynomial GCDs, Sturm root counts and rational interval isolation establish every boundary and its order; an irrational boundary shows its defining polynomial, a certified isolating interval and an approximation. A resource failure returns unresolved and never silently drops roots.