Inequalities and Piecewise Functions
How to Restrict a Function’s Domain on a Graph
A domain restriction limits the x-values a function may use, such as f(x) = x² for 0 ≤ x ≤ 2. On a graph only that part of the curve is drawn, with closed or open endpoints. Some restrictions are chosen (to model a real situation or make a function invertible); others are natural, coming from square roots, logarithms or division by zero.
Check it yourself: every example here can be loaded into the Graphing Calculator.
Open the Graphing CalculatorTwo kinds of restriction
| Kind | Where it comes from | Example |
|---|---|---|
| Chosen | the problem or a modelling decision | height of a ball only for 0 ≤ t ≤ 4 |
| Natural | the formula cannot be evaluated elsewhere | √x needs x ≥ 0; 1⁄x needs x ≠ 0 |
Writing a restriction
| Words | Inequality | Interval |
|---|---|---|
| from 0 to 2, both included | 0 ≤ x ≤ 2 | [0, 2] |
| greater than −1 | x > −1 | (−1, ∞) |
| at most 5 | x ≤ 5 | (−∞, 5] |
| all except 3 | x ≠ 3 | (−∞, 3) ∪ (3, ∞) |
Square brackets [ ] include an endpoint (closed dot); round brackets ( ) exclude it (open circle). Infinity always gets a round bracket.
Graphing a restricted function
Graph f(x) = x² for 0 ≤ x ≤ 2:
- Sketch (or imagine) the full parabola.
- Keep only the part between x = 0 and x = 2.
- Put closed dots at (0, 0) and (2, 4), because both endpoints are included.
The range shrinks too: on this domain, y goes from 0 to 4, so the range is [0, 4].
- Graph x² for 0 ≤ x ≤ 2 — opens the Graphing Calculator
Text description of this figure
Two panels. Left: y = x² restricted to x ≥ 0 so that it passes the horizontal line test. Right: y = ln(x − 1) with its natural domain x > 1 and vertical asymptote x = 1.
- Chosen restrictions are written after the formula.
- Natural restrictions come from the formula itself.
- Endpoints: closed if included, open if not.
Natural restrictions to look for
- Even roots — the inside must be ≥ 0. √(x − 3) needs x ≥ 3.
- Logarithms — the inside must be > 0. ln(x + 2) needs x > −2.
- Division — the denominator cannot be 0. 1⁄(x − 4) needs x ≠ 4.
- Combinations — apply all rules. √x ⁄ (x − 1) needs x ≥ 0 and x ≠ 1.
These are covered in detail in domain and range.
Why restrict on purpose?
- Modelling. Time, length and quantity cannot be negative.
- Inverses. x² is not one-to-one, but on x ≥ 0 it is, and its inverse is √x. The same idea defines arcsin, arccos and arctan.
- Piecewise definitions. Each piece of a piecewise function is a restricted function.
- Optimisation on an interval, as in quadratic maximum and minimum.
- Graph sin(x) for 0 ≤ x ≤ π — opens the Graphing Calculator
Common mistakes
- Restricting x but forgetting the range changes.
- Using square brackets with infinity.
- Including endpoints where the function is undefined, such as x = 0 for ln x.
- Leaving out a natural restriction when a chosen one is also given — both apply.
Questions
How do I restrict a domain in the graphing calculator?
Type the restriction in braces after the expression: x^2 {0 <= x <= 2} or sqrt(x) {x < 9}.
Why restrict a domain to make an inverse?
A function needs to be one-to-one to have an inverse. Restricting x² to x ≥ 0 makes it pass the horizontal line test, and its inverse is √x.
What is the natural domain?
The largest set of real x for which the formula makes sense, with no extra conditions added.
Graph your own example with the Graphing Calculator — free, in your browser.
Try it nowSources and further reading
- OpenStax, College Algebra 2e — 3.2 Domain and Range
- OpenStax, College Algebra 2e — 3.7 Inverse Functions
Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.