Skip to main content

Proof — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for proof.

UT-1: Proof by Contradiction — 2\sqrt{2} is Irrational

Question:

(a) Prove by contradiction that 2\sqrt{2} is irrational.

(b) A student's proof contains the following claim: "Since p2p^2 is even, pp must be even." Justify this step rigorously by proving its contrapositive.

(c) Adapt the method to prove that 3\sqrt{3} is irrational.

[Difficulty: hard. Tests the full rigour of proof by contradiction, including the contrapositive argument that "if p2p^2 is even then pp is even."]

Solution:

(a) Suppose, for contradiction, that 2\sqrt{2} is rational. Then 2=pq\sqrt{2} = \frac{p}{q} where p,qZp, q \in \mathbb{Z}, q0q \neq 0, and gcd(p,q)=1\gcd(p, q) = 1 (i.e. the fraction is in its lowest terms).

Squaring: 2=p2q22 = \frac{p^2}{q^2}, so p2=2q2p^2 = 2q^2.

Since p2=2q2p^2 = 2q^2, p2p^2 is even. Since the square of an odd number is odd, pp must be even.

Write p=2kp = 2k for some integer kk. Then (2k)2=2q2(2k)^2 = 2q^2, so 4k2=2q24k^2 = 2q^2, giving q2=2k2q^2 = 2k^2.

Since q2=2k2q^2 = 2k^2, q2q^2 is even, and by the same argument, qq is even.

So both pp and qq are even, contradicting gcd(p,q)=1\gcd(p, q) = 1.

Therefore 2\sqrt{2} is irrational.

(b) The claim is: "If p2p^2 is even, then pp is even."

The contrapositive is: "If pp is odd, then p2p^2 is odd."

Proof of contrapositive: If pp is odd, write p=2k+1p = 2k + 1 for some integer kk. Then:

p2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1p^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1

which is odd (of the form 2m+12m + 1 where m=2k2+2km = 2k^2 + 2k).

Since the contrapositive is logically equivalent to the original statement, and we have proved the contrapositive, the original statement is also proved.

(c) Suppose 3=pq\sqrt{3} = \frac{p}{q} in lowest terms.

p2=3q2p^2 = 3q^2, so p2p^2 is divisible by 3.

We need: "If p2p^2 is divisible by 3, then pp is divisible by 3."

Contrapositive: "If pp is not divisible by 3, then p2p^2 is not divisible by 3."

If pp is not divisible by 3, then p1(mod3)p \equiv 1 \pmod 3 or p2(mod3)p \equiv 2 \pmod 3.

  • If p1(mod3)p \equiv 1 \pmod 3: p21(mod3)p^2 \equiv 1 \pmod 3.
  • If p2(mod3)p \equiv 2 \pmod 3: p241(mod3)p^2 \equiv 4 \equiv 1 \pmod 3.

In either case, p2≢0(mod3)p^2 \not\equiv 0 \pmod 3, so p2p^2 is not divisible by 3.

Therefore pp is divisible by 3. Write p=3kp = 3k. Then 9k2=3q29k^2 = 3q^2, so q2=3k2q^2 = 3k^2, and by the same argument, qq is divisible by 3.

Both pp and qq divisible by 3 contradicts gcd(p,q)=1\gcd(p,q) = 1. Therefore 3\sqrt{3} is irrational.


UT-2: Proof by Induction — Base Case Errors

Question:

A student is asked to prove that r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6} for all n1n \geq 1.

(a) Write out the full proof by induction, including the base case and inductive step.

(b) A different student claims the formula holds for all n0n \geq 0 and starts their base case at n=0n = 0. Show that the formula also holds for n=0n = 0 and explain why starting at n=0n = 0 does not invalidate the proof.

(c) A third student tries to prove that 2n>n22^n \gt n^2 for all n1n \geq 1 by induction. Show that the inductive step fails at n=2n=3n = 2 \to n = 3, even though the statement is true for n=3n = 3. Find the smallest value of NN such that 2n>n22^n \gt n^2 for all nNn \geq N.

[Difficulty: hard. Tests the role of the base case in anchoring the induction, and the subtlety that the inductive step may require nn to be sufficiently large.]

Solution:

(a) Let P(n)P(n) be the statement r=1nr2=n(n+1)(2n+1)6\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6}.

Base case (n=1n = 1): LHS =12=1= 1^2 = 1. RHS =LB123RB◆◆LB6RB=1= \frac◆LB◆1 \cdot 2 \cdot 3◆RB◆◆LB◆6◆RB◆ = 1. LHS == RHS. P(1)P(1) is true.

Inductive step: Assume P(k)P(k) is true for some k1k \geq 1:

r=1kr2=k(k+1)(2k+1)6\sum_{r=1}^{k} r^2 = \frac{k(k+1)(2k+1)}{6}

For P(k+1)P(k+1):

r=1k+1r2=r=1kr2+(k+1)2=k(k+1)(2k+1)6+(k+1)2\sum_{r=1}^{k+1} r^2 = \sum_{r=1}^{k} r^2 + (k+1)^2 = \frac{k(k+1)(2k+1)}{6} + (k+1)^2

=k(k+1)(2k+1)+6(k+1)26=(k+1)[k(2k+1)+6(k+1)]6= \frac{k(k+1)(2k+1) + 6(k+1)^2}{6} = \frac{(k+1)[k(2k+1) + 6(k+1)]}{6}

=(k+1)[2k2+k+6k+6]6=(k+1)(2k2+7k+6)6= \frac{(k+1)[2k^2 + k + 6k + 6]}{6} = \frac{(k+1)(2k^2 + 7k + 6)}{6}

=(k+1)(k+2)(2k+3)6=(k+1)((k+1)+1)(2(k+1)+1)6= \frac{(k+1)(k+2)(2k+3)}{6} = \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}

This is P(k+1)P(k+1). By induction, P(n)P(n) is true for all n1n \geq 1.

(b) At n=0n = 0: LHS =r=10r2=0= \sum_{r=1}^{0} r^2 = 0 (empty sum). RHS =LB011RB◆◆LB6RB=0= \frac◆LB◆0 \cdot 1 \cdot 1◆RB◆◆LB◆6◆RB◆ = 0. True.

Starting at n=0n = 0 is valid because the inductive step from P(k)P(k) to P(k+1)P(k+1) works for k0k \geq 0. The proof establishes the result for all n0n \geq 0, which is a stronger statement than n1n \geq 1. This does not invalidate the proof; it simply proves a more general result.

(c) Check values: 21=2>1=122^1 = 2 \gt 1 = 1^2. True. 22=4=4=222^2 = 4 = 4 = 2^2. Not strictly greater (equality, not inequality). 23=8>9=322^3 = 8 \gt 9 = 3^2. False!

So the statement "2n>n22^n \gt n^2 for all n1n \geq 1" is actually false at n=3n = 3.

Inductive step from kk to k+1k+1: Assume 2k>k22^k \gt k^2. Need 2k+1>(k+1)22^{k+1} \gt (k+1)^2.

2k+1=22k>2k22^{k+1} = 2 \cdot 2^k \gt 2k^2 (by the inductive hypothesis).

We need 2k2(k+1)2=k2+2k+12k^2 \geq (k+1)^2 = k^2 + 2k + 1, i.e. k22k10k^2 - 2k - 1 \geq 0, i.e. k1+22.41k \geq 1 + \sqrt{2} \approx 2.41.

So the inductive step works for k3k \geq 3, meaning 2n>n22^n \gt n^2 for all n5n \geq 5 (since we need to verify the base case at n=5n = 5, or anchor at n=3n = 3 and step forward).

Wait, let me check: 24=16>162^4 = 16 \gt 16? No, 16=1616 = 16. Not strictly greater.

25=32>25=522^5 = 32 \gt 25 = 5^2. True.

26=64>362^6 = 64 \gt 36. True. And the inductive step works from k=5k = 5 onwards.

So the smallest NN is 55: 2n>n22^n \gt n^2 for all n5n \geq 5.


UT-3: Necessary vs Sufficient Conditions

Question:

For each of the following, state whether the condition is necessary, sufficient, both, or neither.

(a) "x>2x \gt 2" as a condition for "x2>4x^2 \gt 4".

(b) "nn is prime" as a condition for "nn is odd".

(c) "a2+b2=0a^2 + b^2 = 0" (where a,bRa, b \in \mathbb{R}) as a condition for "a=0a = 0 and b=0b = 0".

(d) A student claims: "If a function is differentiable at a point, then it is continuous at that point." State whether this is a necessary condition, a sufficient condition, or both, for continuity.

(e) Prove that "x2=4x^2 = 4" is necessary but not sufficient for "x=2x = 2", and construct a counterexample to show insufficiency.

[Difficulty: hard. Tests the fundamental distinction between necessary and sufficient conditions, which students confuse persistently.]

Solution:

(a) "x>2x \gt 2" implies "x2>4x^2 \gt 4": if x>2x \gt 2 then x2>4x^2 \gt 4. So "x>2x \gt 2" is sufficient for "x2>4x^2 \gt 4".

However, "x>2x \gt 2" is not necessary: x=3x = -3 gives x2=9>4x^2 = 9 \gt 4, but x<2x \lt 2.

Answer: sufficient but not necessary.

(b) If nn is prime and n2n \neq 2, then nn is odd. But n=2n = 2 is prime and even.

So "prime" does not imply "odd" (counterexample: 2). Also, "odd" does not imply "prime" (counterexample: 9).

Answer: neither necessary nor sufficient.

(c) "a2+b2=0a^2 + b^2 = 0": since a20a^2 \geq 0 and b20b^2 \geq 0, the sum is zero only when both are zero. So a2+b2=0    a=0 and b=0a^2 + b^2 = 0 \iff a = 0 \text{ and } b = 0.

Answer: both necessary and sufficient (the condition is equivalent).

(d) The statement "If differentiable then continuous" means differentiability is sufficient for continuity. Equivalently, continuity is necessary for differentiability.

Note: the converse is false (e.g. f(x)=xf(x) = \lvert x \rvert is continuous at x=0x = 0 but not differentiable there), so differentiability is not necessary for continuity.

Answer: Differentiability is sufficient (but not necessary) for continuity.

(e) "x2=4x^2 = 4" is necessary for "x=2x = 2": if x=2x = 2 then x2=4x^2 = 4. (Every x=2x = 2 satisfies x2=4x^2 = 4.)

"x2=4x^2 = 4" is not sufficient for "x=2x = 2": the counterexample is x=2x = -2, since (2)2=4(-2)^2 = 4 but 22-2 \neq 2.


Integration Tests

Tests synthesis of proof with other topics. Requires combining concepts from multiple units.

IT-1: Proving Convergence of a Recurrence Relation by Induction (with Sequences)

Question:

A sequence (an)(a_n) is defined by a1=2a_1 = 2 and an+1=an+32a_{n+1} = \frac{a_n + 3}{2} for n1n \geq 1.

(a) Prove by induction that an<3a_n \lt 3 for all n1n \geq 1.

(b) Prove by induction that anan+1a_n \leq a_{n+1} for all n1n \geq 1.

(c) State the limit of the sequence and justify your answer using the monotone convergence theorem.

(d) Find r=1nar\sum_{r=1}^{n} a_r in terms of nn, giving your answer in its simplest form.

[Difficulty: hard. Combines proof by induction with recurrence relations, boundedness, monotonicity, and series summation.]

Solution:

(a) Let P(n)P(n) be "an<3a_n \lt 3".

Base case (n=1n = 1): a1=2<3a_1 = 2 \lt 3. True.

Inductive step: Assume ak<3a_k \lt 3 for some k1k \geq 1.

ak+1=ak+32<3+32=3a_{k+1} = \frac{a_k + 3}{2} \lt \frac{3 + 3}{2} = 3 (since ak<3a_k \lt 3).

So ak+1<3a_{k+1} \lt 3. By induction, an<3a_n \lt 3 for all n1n \geq 1.

(b) Let Q(n)Q(n) be "anan+1a_n \leq a_{n+1}".

Base case (n=1n = 1): a1=2a_1 = 2, a2=52=2.5a_2 = \frac{5}{2} = 2.5. 22.52 \leq 2.5. True.

Inductive step: Assume akak+1a_k \leq a_{k+1} for some k1k \geq 1. We need ak+1ak+2a_{k+1} \leq a_{k+2}.

ak+2ak+1=ak+1+32ak+1=3ak+12a_{k+2} - a_{k+1} = \frac{a_{k+1} + 3}{2} - a_{k+1} = \frac{3 - a_{k+1}}{2}.

By part (a), ak+1<3a_{k+1} \lt 3, so 3ak+1>03 - a_{k+1} \gt 0, giving ak+2ak+1>0a_{k+2} - a_{k+1} \gt 0.

So ak+1<ak+2a_{k+1} \lt a_{k+2}. By induction, an<an+1a_n \lt a_{n+1} for all n1n \geq 1 (strictly increasing).

(c) The sequence is strictly increasing (part b) and bounded above by 3 (part a). By the monotone convergence theorem, the sequence converges.

Let L=limnanL = \lim_{n \to \infty} a_n. Then L=L+32    2L=L+3    L=3L = \frac{L+3}{2} \implies 2L = L + 3 \implies L = 3.

(d) The recurrence can be solved: an+13=an32a_{n+1} - 3 = \frac{a_n - 3}{2}.

This gives an3=a132n1=12n1a_n - 3 = \frac{a_1 - 3}{2^{n-1}} = \frac{-1}{2^{n-1}}, so an=312n1a_n = 3 - \frac{1}{2^{n-1}}.

r=1nar=r=1n(312r1)=3nr=0n112r\sum_{r=1}^{n} a_r = \sum_{r=1}^{n}\left(3 - \frac{1}{2^{r-1}}\right) = 3n - \sum_{r=0}^{n-1}\frac{1}{2^r}

=3n1(1/2)n11/2=3n2(112n)=3n2+12n1= 3n - \frac{1 - (1/2)^n}{1 - 1/2} = 3n - 2\left(1 - \frac{1}{2^n}\right) = 3n - 2 + \frac{1}{2^{n-1}}


IT-2: Proving a Function is Injective (with Functions)

Question:

(a) Prove that f(x)=x3f(x) = x^3 is injective on R\mathbb{R} using two different methods: (i) by algebra, and (ii) by calculus.

(b) Prove that g(x)=x2g(x) = x^2 is NOT injective on R\mathbb{R} by providing a specific counterexample.

(c) Find the largest subset of R\mathbb{R} on which g(x)=x2g(x) = x^2 is injective, and prove your answer.

[Difficulty: hard. Combines injectivity proofs with algebraic and calculus-based arguments, and domain restriction analysis.]

Solution:

(a) (i) Algebraic proof: Suppose f(a)=f(b)f(a) = f(b) for some a,bRa, b \in \mathbb{R}.

a3=b3    a3b3=0    (ab)(a2+ab+b2)=0a^3 = b^3 \implies a^3 - b^3 = 0 \implies (a-b)(a^2 + ab + b^2) = 0.

Either a=ba = b or a2+ab+b2=0a^2 + ab + b^2 = 0.

Now a2+ab+b2=(a+b2)2+3b240a^2 + ab + b^2 = \left(a + \frac{b}{2}\right)^2 + \frac{3b^2}{4} \geq 0.

Equality requires a+b2=0a + \frac{b}{2} = 0 and b=0b = 0, giving a=b=0a = b = 0.

So a2+ab+b2=0a^2 + ab + b^2 = 0 only when a=b=0a = b = 0. In all cases, a=ba = b.

Therefore ff is injective.

(ii) Calculus proof: f(x)=3x20f'(x) = 3x^2 \geq 0 for all xRx \in \mathbb{R}, with equality only at x=0x = 0.

f(x)0f'(x) \geq 0 means ff is non-decreasing. To show strict monotonicity: for any a<ba \lt b with a0a \neq 0, f(x)=3x2>0f'(x) = 3x^2 \gt 0 on (a,b)(a, b) (since x=0x = 0 is a single point), so by the Mean Value Theorem, f(b)f(a)=f(c)(ba)>0f(b) - f(a) = f'(c)(b-a) \gt 0 for some c(a,b)c \in (a, b).

If a<0<ba \lt 0 \lt b: f(a)=a3<0<b3=f(b)f(a) = a^3 \lt 0 \lt b^3 = f(b).

Therefore a<b    f(a)<f(b)a \lt b \implies f(a) \lt f(b) for all a,bRa, b \in \mathbb{R}, so ff is strictly increasing and hence injective.

(b) g(1)=12=1=(1)2=g(1)g(1) = 1^2 = 1 = (-1)^2 = g(-1), but 111 \neq -1. Therefore gg is not injective on R\mathbb{R}.

(c) Claim: g(x)=x2g(x) = x^2 is injective on [0,)[0, \infty).

Proof: If a,b0a, b \geq 0 and a2=b2a^2 = b^2, then a2b2=(ab)(a+b)=0a^2 - b^2 = (a-b)(a+b) = 0. Since a+b0a + b \geq 0, we need ab=0a - b = 0, giving a=ba = b.

Similarly, gg is injective on (,0](-\infty, 0].

Maximality: Any domain that contains both a positive and a negative number fails to make gg injective (since g(k)=g(k)g(k) = g(-k) for k0k \neq 0). Adding 00 to either half preserves injectivity. Therefore the largest subsets are [0,)[0, \infty) and (,0](-\infty, 0].


IT-3: Divisibility Proof Using Induction (with Number Theory)

Question:

(a) Prove by induction that n3nn^3 - n is divisible by 6 for all positive integers nn.

(b) Prove that 32n+1+2n+23^{2n+1} + 2^{n+2} is divisible by 7 for all n0n \geq 0.

(c) A student claims that n2+n+1n^2 + n + 1 is prime for all positive integers nn. Disprove this claim by counterexample, finding the smallest counterexample.

[Difficulty: hard. Combines induction for divisibility with disproof by counterexample, requiring systematic search.]

Solution:

(a) Let P(n)P(n) be "n3nn^3 - n is divisible by 6."

Base case (n=1n = 1): 11=0=6×01 - 1 = 0 = 6 \times 0. True.

Inductive step: Assume k3k=6mk^3 - k = 6m for some integer mm.

For n=k+1n = k + 1:

(k+1)3(k+1)=k3+3k2+3k+1k1=k3+3k2+2k(k+1)^3 - (k+1) = k^3 + 3k^2 + 3k + 1 - k - 1 = k^3 + 3k^2 + 2k

=(k3k)+3k2+3k=6m+3k(k+1)= (k^3 - k) + 3k^2 + 3k = 6m + 3k(k+1)

Since k(k+1)k(k+1) is the product of two consecutive integers, one is even, so k(k+1)k(k+1) is divisible by 2. Therefore 3k(k+1)3k(k+1) is divisible by 3×2=63 \times 2 = 6.

So (k+1)3(k+1)=6m+6p=6(m+p)(k+1)^3 - (k+1) = 6m + 6p = 6(m+p) for some integer pp. Divisible by 6.

By induction, n3nn^3 - n is divisible by 6 for all n1n \geq 1.

(Alternative proof: n3n=n(n1)(n+1)=(n1)n(n+1)n^3 - n = n(n-1)(n+1) = (n-1)n(n+1), the product of three consecutive integers. Among any three consecutive integers, one is divisible by 3 and at least one is divisible by 2. So the product is divisible by 3×2=63 \times 2 = 6.)

(b) Let P(n)P(n) be "32n+1+2n+23^{2n+1} + 2^{n+2} is divisible by 7."

Base case (n=0n = 0): 31+22=3+4=7=7×13^1 + 2^2 = 3 + 4 = 7 = 7 \times 1. True.

Inductive step: Assume 32k+1+2k+2=7m3^{2k+1} + 2^{k+2} = 7m for some integer mm.

For n=k+1n = k + 1:

32(k+1)+1+2(k+1)+2=32k+3+2k+3=932k+1+22k+23^{2(k+1)+1} + 2^{(k+1)+2} = 3^{2k+3} + 2^{k+3} = 9 \cdot 3^{2k+1} + 2 \cdot 2^{k+2}

=732k+1+2(32k+1+2k+2)= 7 \cdot 3^{2k+1} + 2(3^{2k+1} + 2^{k+2})

=732k+1+27m=7(32k+1+2m)= 7 \cdot 3^{2k+1} + 2 \cdot 7m = 7(3^{2k+1} + 2m)

Divisible by 7. By induction, 32n+1+2n+23^{2n+1} + 2^{n+2} is divisible by 7 for all n0n \geq 0.

(c) Check values:

nnn2+n+1n^2 + n + 1Prime?
13Yes
27Yes
313Yes
421No (21=3×721 = 3 \times 7)

The smallest counterexample is n=4n = 4: 42+4+1=214^2 + 4 + 1 = 21, which is not prime.