Sub topic 10
Testing special cases and substitution
This chapter covers a family of checks and shortcuts for TITA (Type In The Answer) questions: pick concrete values, run the question on them, and read the answer off the result. It assumes you can set up equations from wording and handle percentages, ratios, remainders and basic coordinate geometry. Earlier chapters cover parsing the question and building equations. Here you use specific numbers to solve a question, or to test an answer you already have.
What a special case is
A special case is a concrete instance of a general question. The question says "a rectangle" and you draw a 3 by 4 rectangle. It says "a number n" and you try n = 1, 2, 3. It says "a price" and you set the price to 100.
Special cases do three jobs:
- Solve the question directly. If the answer must be the same for every valid choice, one valid choice gives it.
- Reveal a pattern. Small cases show a rule that you then apply to a large case, such as the 100th power or the 50th term.
- Check a result. After deriving a general formula, you test it on a case you can compute by hand.
The first job needs a guarantee that the answer is constant. The second and third do not.
When one value is enough
Use direct substitution when the wording promises that the result does not depend on the free quantities. Typical signals are:
- "Find the value of ..." with variables left unspecified.
- "The percentage change is ..." with no starting amount given.
- "... is independent of the position of P" or "for all x".
- The answer is asked as a ratio or percentage, not as an amount.
Example 1: percentages with no base
The price of an item rises by 25%. By what percentage must consumption fall so that total expenditure stays the same?
No base price or quantity is given, so the answer cannot depend on them. Take price 100 and consumption 100, so expenditure is 10 000. The new price is 125. The consumption needed is 10 000 ÷ 125 = 80. That is a fall of 20%.
Choosing 100 makes percentages equal to raw numbers. For ratios, choose the LCM of the denominators. For "A takes 12 days, B takes 20 days", assume the total work is 60 units. A does 5 per day and B does 3 per day.
Example 2: an identity in x
If (x + 3)(x + k) = x² + 7x + 12 for all x, find k.
"For all x" means you may choose x freely. Put x = 0: 3k = 12, so k = 4. Putting x = 1 gives 4(1 + k) = 20, so k = 4 again. The second value is a cheap confirmation.
Example 3: a functional equation
For x ≠ 0, f(x) + 2f(1/x) = 3x. Find 2·f(1/2).
Substitute x = 2 and x = 1/2 into the equation. This gives two equations in the two unknowns f(2) and f(1/2):
- f(2) + 2f(1/2) = 6
- f(1/2) + 2f(2) = 3/2
From the second, f(1/2) = 3/2 − 2f(2). Put that in the first: f(2) + 3 − 4f(2) = 6, so f(2) = −1. Then f(1/2) = 3/2 + 2 = 7/2, and 2·f(1/2) = 7.
Check against the first equation: −1 + 2(7/2) = 6 ✓.
The substitution here is the method itself. Replacing x by 1/x produces the second equation you need.
Example 4: a geometric invariant
P is a point inside rectangle ABCD with PA = 3, PB = 4 and PC = 5. Find PD².
The question implies that PD is determined, so the relation between the four distances must hold everywhere. Test it by moving P to corner A. Then PA = 0, PB = AB, PC = AC and PD = AD. Since AC² = AB² + AD², we get PA² + PC² = PB² + PD². Now use the given values: 9 + 25 = 16 + PD², so PD² = 18.
You can confirm the relation numerically for any rectangle and any point:
import random
w, h = 7, 5
for _ in range(5):
px, py = random.randint(0, w), random.randint(0, h)
pa = px**2 + py**2
pb = (w - px)**2 + py**2
pc = (w - px)**2 + (h - py)**2
pd = px**2 + (h - py)**2
print(pa + pc - (pb + pd))Every line prints 0, so PA² + PC² = PB² + PD² holds for each sampled point.
Small cases to find a pattern
When a question asks about a large exponent, term or count, compute the first few cases and look for a cycle or formula. Then verify the pattern on one more case before relying on it.
Take the remainder of 7¹⁰⁰ when divided by 5. List the remainders of 7ⁿ for n = 1 to 8:
print([pow(7, n, 5) for n in range(1, 9)])The output is [2, 4, 3, 1, 2, 4, 3, 1]. The cycle 2, 4, 3, 1 has length 4, and the remainder is 1 whenever n is a multiple of 4. Since 100 is a multiple of 4, the remainder is 1.
A second pattern: guess a closed form for 1/(1·2) + 1/(2·3) + ... + 1/(n(n+1)). Compute the first few sums exactly:
from fractions import Fraction
total = Fraction(0)
for n in range(1, 6):
total += Fraction(1, n * (n + 1))
print(n, total)The output is 1/2, 2/3, 3/4, 4/5, 5/6, which suggests n/(n+1). That is a conjecture, not a proof. Telescoping (1/(n(n+1)) = 1/n − 1/(n+1)) proves it, but under time pressure a pattern confirmed on five cases is usually enough to enter an answer.
Choosing good test values
A poorly chosen value can mislead you or waste time. Use these rules:
- Obey every constraint. If the question says a, b, c are distinct positive integers, do not use a = b.
- Avoid 0 and 1 unless they are valid and informative. They make many expressions coincide, so a wrong formula can appear to pass.
- Avoid symmetric choices when the question is not symmetric. Setting two different variables equal can hide an error.
- Prefer numbers that simplify the arithmetic. Use 100 for percentages, LCM for work and speed, and a 3-4-5 triangle for right-angle geometry.
- Use a second, different value whenever the first passes too easily.
| Situation | Useful special case | Main risk |
|---|---|---|
| Percentage change, no base given | Base 100 | None, if the answer is a percentage or ratio |
| Work or pipes with several rates | Total work = LCM of times | Forgetting to convert back to time |
| "For all x" identity | x = 0, 1, −1 | Value makes a factor vanish and hides an unknown |
| "Independent of position" in geometry | Move the point to a vertex or the centre | Choosing a degenerate position the question excludes |
| Large exponent or term number | Compute n = 1 to 8 | Cycle not yet visible in the tested range |
| General formula you derived | A small case computed by hand | Checking only the case you built the formula from |
What a special case cannot do
One special case proves nothing if the answer may vary. If the question asks "how many integers n satisfy ...", testing n = 5 only tells you about n = 5. In that setting, substitution can still eliminate wrong ideas, but it cannot give the answer.
Special cases also fail in these ways:
- Degenerate values. Setting a triangle's height to 0 may make a ratio undefined or drop a term you need.
- Hidden constraints. A value that satisfies the visible conditions may break one implied by the wording, such as "a person's age" requiring a positive integer.
- Coincidence. Two different formulas can agree at one input. A second test separates them.
- Unchecked patterns. The first four terms of a sequence can fit several rules. Test the next term before extrapolating.
Substitution as a check
Even when you solved a question by algebra, a quick numeric test can catch sign errors and misread conditions. The standard approach:
- Take your final answer and plug it back into the original wording, not into your own equations. Your equations may contain the error.
- Pick a small value for any remaining free variable and recompute both sides.
- If a derived formula should hold for all n, test n = 1 and n = 2 by hand.
In Example 3 above, you check the result by returning to f(x) + 2f(1/x) = 3x with the found values. That check uses the question's own statement.
Deciding whether to use it
Common mistakes
- Choosing a value that violates the question and then trusting the result.
- Using equal values for variables that the question treats as different.
- Stopping at the first passing test when a second would take ten seconds.
- Extrapolating a pattern from too few terms.
- Checking an answer against your own working instead of the original wording.
- Spending several minutes on substitution for a question that is a direct one-line calculation.
Exercise
A shopkeeper marks up an article by 40% over cost and then gives a discount of 25% on the marked price. Using a convenient cost value, find the profit percentage.
Show answer
The answer is the same for any cost, so take cost = 100. Marked price = 140. After a 25% discount, selling price = 140 × 0.75 = 105. Profit = 5 on a cost of 100, so the profit is 5%.
Exercise
If (x − 2)(x + m) = x² + 3x − 10 for all x, find m. Then find a second value of x that confirms your answer.
Show answer
Put x = 0: (−2)(m) = −10, so m = 5. Confirm with x = 1: left side (1 − 2)(1 + 5) = −6, right side 1 + 3 − 10 = −6 ✓.
Exercise
Find the remainder when 3⁵⁰ is divided by 7, by listing the remainders of the first few powers of 3.
Show answer
The remainders of 3¹ to 3⁶ are 3, 2, 6, 4, 5, 1. The cycle has length 6. Since 50 = 6 × 8 + 2, the remainder of 3⁵⁰ equals the remainder of 3², which is 2.