Learn the idea. Try it yourself.
Read the explanation or try 6 questions with hints. Free, untimed and no sign-in needed.
Original preparation lesson: rational inequalities and integer solutions for students preparing for Pakistan’s NMTC screening route. Every exercise and explanation here was written for this lesson. These are preparation tasks, not official past-paper questions or a complete mock paper.
Your goal: find every allowed solution of a rational inequality, explain why no interval has been missed, and count the integer solutions without restoring a forbidden value.
Before you start: you should be able to multiply signed numbers, expand and factor simple quadratics, and reverse an inequality when dividing by a negative number. Review inequality rules and signs and algebraic identities and factorisation if those steps are uncertain. We will build the sign-chart and integer-counting methods here.
Study route: allow about 40–60 minutes for a first core pass through the starting checks, Examples 1–3 with their nearby practice, and Questions 1–6. This is a flexible study estimate; take longer when a prerequisite needs repair. Begin with Examples 1–2, then continue when you can explain every open or closed endpoint. Give Example 4, the Stretch questions and the proof extensions a separate sitting. The levels describe this lesson’s progression; they are not official contest classifications.
Three starting checks
RI-D1. What happens to the comparison?
Solve .
Answer and repair route
Dividing by reverses the comparison, so . For example works in both statements, while works in neither. The boundary is excluded because the inequality is strict.
If you kept the direction unchanged, revisit multiplication and division by negative numbers before moving on.
RI-D2. What must stay excluded?
Factor , then state which real values are forbidden in .
Answer and repair route
We need two numbers with product and sum : and 2. Therefore . Expanding checks the identity. The original denominator is zero at , so that value is forbidden. The expression equals only for .
If the factorisation was difficult, review factoring and expanding back. If you allowed , keep a separate domain line beside every calculation in this lesson.
RI-D3. Which integers fit?
List the integers n for which .
Answer and repair route
The first integer greater than is . The complete list is : six integers. The interval length is 5.5, which is not the number of integers.
If the count was uncertain, draw the integers before using an endpoint formula. Floor and ceiling functions provide a further counting route, but no floor notation is required below.
The expression must exist before its sign can be tested
rational expression is a quotient of polynomials, such as . “Rational” describes the form of the expression; x may be any real number unless a question requires an integer. A solution must make the original expression defined and the stated comparison true.
For , the value is excluded because division by zero is undefined. At , the numerator is zero and the denominator is nonzero, so the fraction is zero. These two boundary points have different jobs: a numerator zero may be included in a non-strict inequality; a denominator zero is always excluded.
Cancellation does not change that rule. The expression equals for , but its original value at does not exist. We may simplify the calculation, while retaining in the domain. We will call such a retained exclusion a hole.
Why ordinary cross-multiplication can fail
Consider . Multiplying by without checking its sign would produce and falsely suggest that every works. But gives , which is false.
Instead, split the domain. If , the denominator is positive, so the fraction is positive. If , it is negative, so the fraction is negative. Hence exactly works. There is no case because the original expression is undefined there.
There is also a safe multiplication method. For real quantities P and Q with , the square is strictly positive. Multiplying by preserves the direction and gives . Conversely, dividing by the positive recovers the original inequality. Thus the two comparisons are equivalent on the domain . A zero of Q might satisfy , but it must still be rejected from the rational inequality.
For longer expressions, a sign chart usually avoids unnecessary expansion. First subtract one side from the other and combine the result into a single fraction compared with zero. Then factor and read its sign. The arithmetic identity used to combine fractions does not require their common denominator to be positive; multiplying an inequality by that denominator without reversing the comparison does.
A sign chart records complete cases
A factor is negative to the left of a and positive to its right. Between consecutive roots of the factored numerator and denominator, each linear factor keeps its sign, so their product or quotient keeps its sign. This explains why one sign calculation for each interval is enough. We are not guessing from a few unrelated test values.
- Record the original domain. Mark every denominator zero before cancellation.
- Move everything to one side. Write one fraction compared with zero and factor it.
- Mark the critical values in order. Include numerator zeros, denominator zeros and any retained holes.
- Determine the sign on every interval. Use factor signs or a convenient test value. Account for any negative constant factor.
- Check boundaries separately. Include an allowed numerator zero only for ≤ or ≥. Keep all original denominator zeros excluded.
We write for : the square bracket includes a, and the round bracket excludes b. The symbol ∪ joins solution pieces; means the single value a. At infinity we use a round bracket because infinity is not a real endpoint.
Worked example 1: a zero and a forbidden point
Solve over the real numbers.
Planning hint 1 for RI-E1
Find where the numerator is zero and where the denominator is zero. They are different kinds of boundary.
Planning hint 2 for RI-E1
A nonzero quotient is negative exactly when its numerator and denominator have opposite signs.
The domain is . The critical values are and 3. We examine the three resulting intervals:
| Interval | Quotient | ||
|---|---|---|---|
| − | − | + | |
| + | − | − | |
| + | + | + |
The negative interval is . At the fraction is , which is permitted by ≤. At the fraction is undefined. Therefore the complete solution is , or .
A check at gives , as expected. That substitution checks our calculation; the complete sign chart is what proves that no other interval works.
Your turn 1: change the sign demand
Solve over the real numbers.
Hint 1 for RI-T1
Place and 4 on a number line before writing cases.
Hint 2 for RI-T1
You need equal nonzero signs in numerator and denominator. The strict comparison excludes a numerator zero.
Full solution for RI-T1
The domain excludes . For , both factors are negative, giving a positive quotient. For their signs differ, giving a negative quotient. For both are positive. The value 4 gives zero and is not allowed by >. Thus or .
Bridge: a repeated factor need not reverse the sign
For , the square is positive on both sides of a. An odd power has the sign of , while an even power is positive away from a. Thus a simple factor changes sign as we cross its root, but a squared factor does not. The same sign rule applies to a denominator factor; the root of a denominator remains forbidden.
For instance is negative for and positive for except that it equals zero at . Its sign does not reverse at 2. When the required comparison is , an allowed repeated numerator root can be an isolated solution, even when the expression is positive immediately on both sides.
Do not begin by automatically alternating + and − at every marked value. Check whether the remaining factor has odd or even multiplicity, meaning an odd or even exponent. A cancelled factor can leave a hole with no sign change at all.
Worked example 2: cancellation, a hole and an isolated solution
Solve over the real numbers.
Planning hint 1 for RI-E2
Write the two forbidden values before cancelling a common factor.
Planning hint 2 for RI-E2
Away from , the squared numerator is positive. Decide the sign from , then check separately.
The original denominator is zero at and , so both are excluded. On this domain, cancel to obtain . The cancellation makes the sign calculation shorter, but it does not restore .
If , the numerator is positive and is negative, so the quotient is negative. Every such x works except the hole . If and , both numerator and denominator are positive, so the inequality fails. At , the original denominator is and the numerator is zero, so the inequality holds.
The complete solution is with , together with . In interval notation it is . The point 1 is included even though no interval around it is included.
There are three separate checks here: the sign changes at the remaining simple denominator root ; it does not change at the repeated numerator root 1; and stays forbidden because of the original denominator.
Your turn 2: keep the expression, make the inequality strict
Solve over the real numbers.
Hint 1 for RI-T2
Keep the same original domain and interval signs.
Hint 2 for RI-T2
Which solution of Example 2 produced equality rather than a negative value?
Full solution for RI-T2
The domain is still . The quotient is negative exactly when , apart from the hole . The isolated point gives zero and must now be removed. Hence the solution is .
Bridge: first solve over the reals, then count integers
A rational inequality may have infinitely many real solutions but only finitely many integer solutions in a stated interval. Keep these tasks separate. First identify the allowed real intervals; then find the first and last permitted integers in each piece and remove any forbidden integers.
If the first integer is L and the last is U, inclusive, the count is when . For example has entries. If there are no integers in that piece. An open integer endpoint must be skipped, while an open noninteger endpoint is handled by finding the next integer directly.
For disjoint pieces, add their counts. Do not count a shared endpoint twice, and do not subtract a forbidden point unless it actually lies in the candidate set. Listing a short candidate set is often clearer than introducing a counting formula.
Worked example 3: compare two fractions, then count
How many integers x with satisfy ?
Planning hint 1 for RI-E3
Subtract the right side and combine into one fraction. Record both denominator exclusions.
Planning hint 2 for RI-E3
The new numerator is . Its zero creates another boundary besides the two denominator zeros.
The domain excludes and . Subtracting gives
.
The numerator becomes after expanding the brackets and collecting terms.
We need this last fraction to be nonnegative. Its critical values in order are and 4. The numerator is positive before 4 and negative after 4; this negative coefficient is why we must check the sign rather than assume it.
| Interval | Quotient | ||
|---|---|---|---|
| + | + | + | |
| + | − | − | |
| + | + | + | |
| − | + | − |
Include 4 because it makes the numerator zero and neither denominator zero. Thus the real solution is or . Intersecting with the stated integer range leaves from the first piece and 2, 3, 4 from the second. There are 6 integers.
At the equality endpoint , the original comparison reads . At or 1, it does not make sense. A candidate list is complete only after these domain and boundary checks.
Your turn 3: change the range and exclude equality
How many integers x with satisfy ?
Hint 1 for RI-T3
Reuse the factor signs from Example 3, then reconsider the zero at 4.
Hint 2 for RI-T3
Intersect and with the new integer range.
Full solution for RI-T3
The strict comparison removes the equality point 4. The allowed real pieces are and . Inside , their integers are and 2, 3. Therefore the answer is 4.
Bridge: a moving boundary may change the order of the cases
A parameter is a fixed value whose possible choices we are investigating. If a boundary contains a parameter, its position is not known in advance. Before drawing the sign chart, ask whether it lies to the left of, equals, or lies to the right of the other boundary.
For two distinct integers , the integers strictly between them are through . There are of them, with zero when . The order of the endpoints matters; a negative count signals that the formula has been used outside its assumptions.
Worked example 4: recover the parameter from an integer count
Find every integer m for which has exactly three integer solutions n.
Planning hint 1 for RI-E4
A quotient of two simple linear factors is negative between their distinct roots. Decide separately whether or .
Planning hint 2 for RI-E4
For , count the integers strictly between m and 2. For , count those strictly between 2 and m.
The domain excludes . If , the quotient is negative exactly for : numerator and denominator then have opposite signs. Its integer solutions are through 1, giving solutions. Requiring gives .
If , the negative interval is . Its integer solutions are 3 through , giving solutions. Requiring gives . These formulas give zero when the distinct integer roots are adjacent.
If , the quotient is 1 for every allowed n, so there are no solutions. This collision case cannot be treated as an interval with two distinct endpoints.
Both candidates check: gives ; gives . Therefore or , and the three cases prove that the list is complete.
Your turn 4: when are there no integer solutions?
Find every integer m for which has no integer solutions n.
Hint 1 for RI-T4
Keep the same three cases for m. An interval between adjacent integers contains no integer.
Hint 2 for RI-T4
Use in the case , and in the case . Check the equal-root case separately.
Full solution for RI-T4
For , the count is , so only works. For , the count is , so only works. When the quotient is always 1 on its domain, so it also has no negative values. The complete answer is or 3.
A final bridge for the Stretch questions
When every occurrence of n is through , temporarily write . Solve the rational inequality in u, keeping the original exclusions. Then return to n: , and each positive square can come from both a positive and a negative integer. For example means , so the only integer possibilities are and . Here is the distance of n from zero. Squaring does not make n itself positive.
In a counting problem with a cancelled factor, first find the candidate integer interval, then ask whether the hole lies inside it. A forbidden value outside that interval does not reduce its count. Questions 8–9 combine these two reminders with the earlier method.
Stop at the first step that lost information
- A forbidden value reappeared: return to the original denominator, before cancellation.
- The sign chart alternates at a square: test the squared factor on both sides; it is positive away from its root.
- A repeated numerator zero disappeared: test it separately when equality is allowed.
- Cross-multiplication used an unknown sign: split into sign cases, use a positive square, or combine to one fraction compared with zero.
- An integer count equals an interval length: write the first and last allowed integers and count inclusively.
- A parameter answer uses only one order: check both orders and the equal-boundary case.
Practise with feedback
A practice session selects six questions from the bank below. Choose a starting level and explain your reasoning on paper before selecting an option. The complete static set provides two staged hints, worked solutions and a repair link for every question. A correct choice with help is useful practice, but it is different from an independent solution.
Interactive practice loads here. You can also use the complete question set below.
Nine graded original practice questions
Foundation secures domain, signs and endpoint counting. Core combines those skills. Stretch adds a squared-variable substitution or a moving boundary. Choose a complete answer; keep the written argument that supports it. The question text and option order below match the adaptive bank.
RI-Q1. Keep the original domain
Foundation
Solve over the real numbers.
- , with
- , with
Hint 1 for RI-Q1
Factor the difference of two squares, but first record the forbidden value from the original denominator.
Hint 2 for RI-Q1
On its domain, the expression simplifies to . Solve the linear inequality, then retain the domain restriction.
Answer and full solution for RI-Q1
Answer B: , with .
The original denominator excludes . Since , the fraction equals for . The condition gives . The value is allowed because it makes the numerator zero and the denominator ; the value 3 remains forbidden. Thus with . In particular, values larger than 3 are allowed, so the solution does not stop at the hole.
Check the first error: Cancelling a common factor does not define the original fraction at its zero.
Repair the domain before cancellation, then retry this question before looking at its answer.
RI-Q2. Locate a noninteger boundary
Foundation
Solve over the real numbers.
- or
Hint 1 for RI-Q2
Find the zero of each linear factor, then order the two boundaries.
Hint 2 for RI-Q2
The numerator and denominator have opposite signs between their roots. Check whether either endpoint can be included.
Answer and full solution for RI-Q2
Answer C: .
The numerator is zero at and the denominator at . Below both are negative, so their quotient is positive. Between and 4 the numerator is positive and the denominator negative, so the quotient is negative. Above 4 both are positive. The numerator zero is excluded by the strict comparison, and 4 is excluded by the domain. Hence .
Check the first error: A strict inequality excludes an allowed zero; a denominator zero is excluded regardless of strictness.
Review the first sign chart, then retry this question before looking at its answer.
RI-Q3. Count after choosing the interval
Foundation
How many integers n satisfy ?
- 4
- 6
- 7
- 5
Hint 1 for RI-Q3
First find the real solution interval. The numerator zero and denominator zero have different inclusion rules.
Hint 2 for RI-Q3
The first permitted integer is , while is forbidden. List the last permitted integer before counting.
Answer and full solution for RI-Q3
Answer D: 5.
The domain excludes 2. The quotient is negative between and 2, positive outside that interval, and zero at . Therefore . Its integers are and 1, giving 5 solutions. Counting an interval length without checking the endpoints can give the wrong total.
Check the first error: The count includes zero and negative integers because no positivity restriction was stated.
Review inclusive integer counting, then retry this question before looking at its answer.
RI-Q4. Keep an isolated numerator zero
Core
Solve over the real numbers.
- or
- , with
- , with
Hint 1 for RI-Q4
Record both denominator zeros. Away from its zero, a squared factor is positive on both sides.
Hint 2 for RI-Q4
Away from , the quotient has the sign of . Check the allowed numerator zero separately.
Answer and full solution for RI-Q4
Answer A: or .
The domain excludes and . For an allowed x other than 2, both squared factors are positive, so the quotient has the sign of . It is positive for and negative for , except at . At 2 the numerator is zero and the denominator is nonzero, so equality is allowed. Thus the solution is the isolated value 2 together with every . Neither nor 5 can be restored.
Check the first error: Do not alternate signs at squared factors or discard an isolated allowed zero.
Review repeated factors and isolated solutions, then retry this question before looking at its answer.
RI-Q5. A hole changes an integer count
Core
How many integers n satisfy ?
- 4
- 6
- 5
- 7
Hint 1 for RI-Q5
Cancel only after recording both forbidden integer values.
Hint 2 for RI-Q5
The simplified fraction is nonpositive for . Check which of those integers was excluded before cancellation.
Answer and full solution for RI-Q5
Answer C: 5.
The original domain excludes and . On that domain the fraction is , which is negative for and zero at . The candidate integers are 0, 1, 2, 3, 4, 5. Removing the original hole 2 leaves 0, 1, 3, 4, 5, so there are 5 solutions. The excluded endpoint was never in the candidate list and must not be subtracted again.
Check the first error: Subtract a forbidden integer exactly once and only if it lies in the candidate set.
Review cancellation with a retained hole, then retry this question before looking at its answer.
RI-Q6. Compare two fractions without unsafe multiplication
Core
Which is the complete set of integers n with satisfying ?
Hint 1 for RI-Q6
Move the second fraction to the left and form a single fraction compared with zero.
Hint 2 for RI-Q6
The resulting numerator is . Make a sign chart using 1, 4 and 7, then intersect the positive intervals with .
Answer and full solution for RI-Q6
Answer B: .
The domain excludes and . Subtraction gives . For the numerator is negative and the denominator positive, so the quotient is negative. For both numerator and denominator are negative, so it is positive. For it is negative, and for it is positive. The strict comparison excludes 7. Intersecting or with the given integer range leaves exactly .
Check the first error: The sign of the product of the two denominators changes; it cannot be treated as positive everywhere.
Review the two-fraction comparison, then retry this question before looking at its answer.
RI-Q7. A square, a fractional boundary and an integer range
Stretch
How many integers n with satisfy ?
- 5
- 7
- 8
- 6
Hint 1 for RI-Q7
Separate the effect of the squared factor from that of the three simple linear factors. Keep as a separate zero check.
Hint 2 for RI-Q7
Away from , examine on intervals cut by and 3. Only afterward impose the integer range.
Answer and full solution for RI-Q7
Answer D: 6.
The domain excludes and 3. The square is positive except at 4, where the original fraction is zero and so fails the strict inequality. For , the sign is that of . It is negative for , positive for , negative for , and positive for . Thus the required integers in the given range are and 1, 2: six in total. The zero 4 is outside the negative intervals anyway; it must not be added as a solution or subtracted from the count again.
Check the first error: A repeated factor does not force a sign change, and a fractional boundary is not an integer to count.
Rebuild the sign chart with repeated factors, then retry this question before looking at its answer.
RI-Q8. Return from a squared variable to every integer
Stretch
Let S be the set of all integers n satisfying . What is the sum of over all n in S?
- 50
- 58
- 60
- 68
Hint 1 for RI-Q8
Record all four forbidden integers before cancelling. Then temporarily use .
Hint 2 for RI-Q8
Solve , then select integer squares and remember that a positive square has two integer square roots.
Answer and full solution for RI-Q8
Answer A: 50.
The original denominator excludes and 2. On that domain cancel and put . The inequality gives : the value 1 is forbidden and 16 gives equality. The integer values of n with are . The original exclusions remove and 2, leaving S . The requested sum is . We count both signs because they are different integers in S.
Check the first error: Do not restore cancelled square roots or keep only positive n after the substitution .
Review the squared-variable bridge, then retry this question before looking at its answer.
RI-Q9. A moving interval crosses a fixed hole
Stretch
For which integers m does have exactly five integer solutions n?
- or
- or
- or
- only
Hint 1 for RI-Q9
After recording the holes at and , separate the orders and .
Hint 2 for RI-Q9
For , the fixed hole 4 is outside the candidate interval. For , decide whether 4 lies strictly between 2 and m before subtracting it.
Answer and full solution for RI-Q9
Answer C: or .
The original domain excludes and . The simplified fraction is , so negativity occurs strictly between its distinct roots. If , the candidates are through 1, and the hole 4 is outside them. There are solutions; setting this to 5 gives . If , the simplified quotient is 1 and there are no solutions. If , the candidates are 3 through . For there are none, and for there is only 3, so neither works. For the list contains 4; deleting it leaves solutions. Setting gives . These candidates check: gives ; gives 3, 5, 6, 7, 8. The complete answer is or .
Check the first error: A fixed hole changes the count only after the moving interval reaches it; check both orders of the moving root.
Review the parameter cases, then retain the hole, then retry this question before looking at its answer.
Two proof extensions
Write a connected solution before opening the hints. These six-point checklists are for self-review in this lesson; they are not official marking schemes. A correct final set without the domain and sign argument is incomplete.
RI-P1. Prove a counting rule with a cancelled hole
Let a, b and c be integers with . Determine the number of integer solutions n of . Express your answer in terms of a, b and the position of c. Your argument must also cover and .
Hint 1 for RI-P1
Record the domain before cancellation, then solve .
Hint 2 for RI-P1
Count the integers from the included zero a to just before the forbidden pole b. Decide whether c is already outside that list.
Full proof for RI-P1
The original denominator excludes and . On that domain the quotient simplifies to . Since , both factors are negative for , their signs differ for , and both are positive for . At the simplified numerator is zero. Therefore the simplified nonpositive condition is , subject to the original exclusions.
The candidate integers are . This list has entries. The endpoint b is already absent. If , exactly one candidate, namely c, is forbidden, leaving solutions. Otherwise c is outside the candidate list, leaving solutions.
This includes : the apparent numerator zero a is undefined in the original fraction and is removed. It also includes : there is only the already excluded endpoint b, so no candidate is removed. When and , the first formula gives zero, agreeing with an empty solution set. The sign cases cover the whole domain, so the count is complete.
Six-point self-review rubric for RI-P1
- 1 point: States the original exclusions and before cancellation.
- 1 point: Simplifies only on that domain and justifies the sign cases.
- 1 point: Obtains the correct inclusive/exclusive candidate interval .
- 1 point: Counts its integers.
- 1 point: Subtracts one exactly when .
- 1 point: Explains and , and states that the cases are complete.
Return to the worked bridge if a step needed help. Rewrite that step in your own words and try again later.
RI-P2. Solve a whole family of two-fraction comparisons
Let a and b be real numbers with , and let t be a real number with . Find every real x satisfying . Express any new endpoint in terms of a, b and t, and justify why its position relative to a and b is fixed.
Hint 1 for RI-P2
Combine the difference into one fraction, preserving and .
Hint 2 for RI-P2
The numerator is . Find its zero c, then rewrite using and .
Full proof for RI-P2
The original domain is . Subtracting the right side gives . Let . The numerator is .
To locate the new boundary, subtract a: . The numerator and denominator are both positive, so . Hence . This establishes the endpoint order without testing particular values.
For , the numerator is positive and both denominator factors are negative, so the quotient is positive. For , the numerator is negative while the denominator is positive, so the quotient is negative. For , the numerator and denominator are both negative, so the quotient is positive. For , the numerator is negative and the denominator positive, so the quotient is negative.
At the numerator is zero, and c is distinct from a and b, so equality is allowed. The poles a and b are always excluded. The complete solution is therefore , or . The four sign intervals and the three boundary checks exhaust every real possibility.
Six-point self-review rubric for RI-P2
- 1 point: States and combines the fractions correctly.
- 1 point: Finds and the negative leading coefficient.
- 1 point: Proves from the assumptions, rather than assuming an order.
- 1 point: Justifies the signs in all four intervals.
- 1 point: Includes c and excludes a and b for the correct reasons.
- 1 point: Gives both solution pieces and explains completeness.
Return to the worked bridge if a step needed help. Rewrite that step in your own words and try again later.
My proof notebook
Write on paper or keep a draft here. Check the original domain, the ordered boundaries, the sign of every interval and the final integer count. The rubric supports your review; a written proof is not automatically marked.
What shows you are ready to move on?
Choose one Core question you solved independently. Explain why a forbidden point stays forbidden, why each interval keeps its sign and why every counted integer is allowed. Then attempt RI-Q9 or a proof extension without opening a hint. If you needed a solution, revisit the nearest worked example and retry on a later sitting; one remembered answer is not evidence that the method is secure.
How this fits Pakistan preparation
The STEM programme’s released-paper resources link the NSTC-22 Mathematics paper dated 28 June 2025. That historical paper includes 50 mathematics multiple-choice questions in Part II and two written mathematics questions in Part III. This lesson therefore practises both selecting an answer and explaining a complete argument. It covers one algebra topic, and it does not reproduce that paper or establish a future syllabus or format.
Use the Pakistan route and official-paper guide for current-stage context, and confirm your own edition’s instructions with the official NMTC organiser. The preparation lesson does not establish eligibility, registration or selection.
Choose your next step
For a sign error, return to inequality rules and signs. For a factoring error, return to algebraic identities and factorisation. For harder endpoint counting, continue to floor and ceiling functions. To improve the written argument, use proof methods.
Original teaching material · IMOolympiad.com. Report a specific mathematical or wording error. Learning progress is optional and stays in this browser.