Every "domain and range" question is the same two questions in disguise: what can go in, and what can come out. Once you check the inputs against three rules and read the outputs off the shape of the function, the whole topic takes ten minutes to learn and no time to forget.
Domain: what can go in
The domain is the set of x-values for which f(x) is a real number. Only three things ever break that:
- Division by zero — any denominator must not be 0.
- Even roots of negatives — anything under √ (or a fourth root, and so on) must be ≥ 0.
- Logs of non-positives — the argument of log must be > 0.
If none of these appear, the domain is all real numbers, ℝ. Polynomials, |x|, sin x and cos x are all like that.
Example 1. f(x) = 1/(x − 3). The denominator is zero at x = 3, so the domain is ℝ − {3}.
Example 2. f(x) = √(x − 2). We need x − 2 ≥ 0, so x ≥ 2. Domain: [2, ∞).
Example 3. f(x) = √(4 − x²). We need 4 − x² ≥ 0, that is x² ≤ 4, so −2 ≤ x ≤ 2. Domain: [−2, 2]. (A common slip is writing x ≤ 2 and forgetting the left end.)
Example 4. f(x) = log(x² − 5x + 6). We need x² − 5x + 6 > 0, so (x − 2)(x − 3) > 0, so x < 2 or x > 3. Domain: (−∞, 2) ∪ (3, ∞).
Range: what comes out
The range is the set of outputs the function actually reaches. There are two reliable methods.
Method A — read the shape
For familiar shapes, you know the range:
| Function | Range | Why | ||
|---|---|---|---|---|
| x² | [0, ∞) | a square is never negative | ||
| \ | x\ | [0, ∞) | a modulus is never negative | |
| sin x, cos x | [−1, 1] | the wave never leaves that band | ||
| eˣ | (0, ∞) | never zero, never negative | ||
| 1/x | ℝ − {0} | never exactly zero | ||
| √x | [0, ∞) | the principal root is non-negative |
Shift and stretch rules carry over: x² + 3 has range [3, ∞); −|x| has range (−∞, 0]; 2 sin x + 1 has range [−1, 3].
Method B — solve for x
When the shape is unfamiliar, put y = f(x) and rearrange to get x in terms of y. Whatever makes that impossible is missing from the range.
Example 5. f(x) = (2x + 1)/(x − 1). Put y = (2x + 1)/(x − 1). Then y(x − 1) = 2x + 1, so yx − y = 2x + 1, so x(y − 2) = y + 1, so x = (y + 1)/(y − 2). This fails only at y = 2. Range: ℝ − {2}.
Example 6. f(x) = x² − 4x + 7. Complete the square: (x − 2)² + 3. The square is at least 0, so f is at least 3. Range: [3, ∞).
Where students go wrong
- Confusing domain with range. Domain is x, range is y. Say it to yourself before writing.
- Forgetting the excluded point in a rational function. In Example 5 the graph never crosses y = 2, and the mark scheme wants that point removed.
- Squaring away a restriction. From √(x − 2) students sometimes conclude "x can be anything since we square later". The root is evaluated first; x ≥ 2 stays.
- Reporting the range as ℝ for a quadratic. A parabola opens one way; its range has a bottom (or a top).
- Dropping the endpoint. Square brackets when the value is reached, round brackets when it is only approached. [2, ∞) for √(x − 2), because f(2) = 0 exists.
How it is tested
In Class 11 boards you will be asked to find the domain and range of two or three functions for 2–4 marks each — usually one rational, one root and one modulus or quadratic. In JEE the same idea appears inside bigger questions: composite functions, inverses, and "for how many integers is f defined". The method does not change; only the algebra around it gets longer.
A good habit: write the domain as an inequality first, solve it fully, then convert to interval notation at the end. Most lost marks are interval-notation slips, not conceptual ones.