8 - Proof by cases

Proof By Cases

Some problems can be broken down into a finite set of cases:

You can do some proofs by considering all possible cases separately

Screen Shot 2023-09-21 at 11.58.19 AM.png

Congruence

Screen Shot 2023-09-21 at 12.05.53 PM.png

In class practice

Proposition: If xZ, then x2+x is even.

Proof: Let xZ. We work directly. There are two cases.

Case 1: Assume that x is even. Then x=2k for some kZ. Hence

x2+x=(2k2)+2k=2(2k2+k)

is even

Case 2: Assume that x is odd. Then x=2k+1 for some kZ. Hence

x2+x=(2k+12)+(2k+1)=4k2+4k+1+2k+1=2(2k2+3k+1)

is even.

In every case, x2+x is even. .

Given a,bC, we have ab=0 iff a=0 or b=0.
Proof, let a,bC.
=> we work directly. Assume that ab=0. There are two cases.
Case 1. Assume that a=0.
Case 2. Assume that a0. Then b=0a.

Proposition.
If xZ, then x3x (mod 3).
Proof. Let xZ. We work directly.
Case 1: Assume that x=3k for some kZ.
Then

x3x=(3k)3(3k)=3k[(3k)21]=3[k((3k)21)]

Thus x3x (mod 3).

Case 2: Assume that x=3k+1 for some kZ.

Case 3: Assume that x=3k+2 fro some kZ



HW 8

Ben Finch

E 8.1
Proposition:
Let x,yZ. If x and y have the same parity, then x2+xy is even.

Proof. Let x and y be integers. We work directly. There are two natural cases.
Case 1:
Suppose x and y are odd. Thus x=2k+1, y=2n+1 for some k,nZ. We find

\begin{flalign} x^2 + xy &= (2k+1)^2 + (2n + 1)(2n + 1) \\ &= 4k^2 + 4k + 1 + 4n { #2} + 4n + 1 \\ &= 2(2k^2 + 2k +2n^{2}+2n+1) \end{flalign}

is an even integer.

Case 2:
Suppose x and y are even. Thus x=2k, y=2n for some k,nZ. We find

x2+xy=(2k)2+2k(2n)=4k2+4kn=2(2k2+2kn)

is an even integer.

Thus, in every case x2+xy is even when x and y have the same parity.

E 8.2
Proposition. Let a,b,cZ. If abc, then ab and ac

Proof. Let a,b,cZ. We work contrapositively. There are two natural cases.

Case 1:
Suppose a|b. Thus b=al for some lZ. So, bc=alc=a(lc). Since lcZ, we find a|bc.

Case 2:
Suppose a|c. Thus c=ak for some kZ. So, bc=bak=a(bk). Since bkZ we find a|bc.

Thus, for all cases, If abc, then ab and ac.

E 8.3
a) Proposition.

If xZ, either x20 (mod 4) or x21 (mod 4).

Proof:

Let xZ. We work directly. There are two cases.

Case 1: Suppose that x is even, thus x=2k for some kZ. Then

x20=(2k)20=4k20=4[k20]=4[k2].

Thus, 4|(x20) so x20(mod4).

Case 2: Suppose that x is odd, thus x=2k+1 for some kZ. Then

x21=((2k+1)21)=(4k2+4k+11)=4[k2+k]=4[k(k+1)].

Thus, 4|(x21) so x21(mod4).

So, in all cases, x20(mod4) or x21(mod4).

(b)
Proposition: If xZ, then 4|(x4x2).

Proof:
Let xZ. We have two cases. We work directly.

Case 1: Suppose x is even, thus x=2k for some kZ. We find

x4x2=(x2)(x21)=(2k)2[(2k)21]=4k2(4k21)=4[k2(4k21)].

Since k2(4k21) is an integer, it follows that 4|(x4x2) when x is even.

Case 2: Suppose x is odd, thus x=2k+1 for some kZ. We find

x4x2=(x2)(x21)=(x2)(x1)(x+1)=(2k+1)2(2k+11)(2k+1+1)=(4k2+4k+1)(2k)(2k+2)=(4k2+4k+1)(4k2+4k)=16k4+16k3+16k3+4k2+4k=4(4k4+8k3+k2+k)

Since 4k4+8k3+k2+k is an integer, it follows that 4|(x4x2) when x is odd.

Thus, in all cases, 4|(x4x2).

E 8.4
Proposition. Let a,b,c,nZ. If ab (mod n) and bc (mod n), then ac (mod n).

Proof. Let a,b,c,nZ. We work directly.

Assume ab (mod n) and bc (mod n), hence ab=nk for some kZ and bc=nj for some jZ. We find

ac=ab+bc=nk+nj=n(kj)

Since kj is an integer, we have ac (mod n).

If we know 11 ≡ −3 (mod 7) and −3 ≡ 4 (mod 7), can we say that 11 ≡ 4 (mod 7)?

Based on this proof, yes, we can say that 114 (mod 7).

E 8.5
Proposition: For any nZ, 3|n if and only if 3|n2.

Proof:
(=>) We work directly. Assume 3n. Thus n=3k for some kZ. We find

n2=(3k2)=9k2=3(3k2)

Since 3k2 is an integer, we have 3|n2.

(<=) We work contrapositively. Assume 3n. There are two cases:

Case 1:
Suppose n=3k+1 for some kZ. We find

n2=(3k+1)2=9k2+6k+1=3(3k2+2k)+1

is not a multiple of three. Hence we have 3n2.

Case 2:
Suppose n=3n+2 for some nZ. We find

n2=(3k+2)2=9k2+12k+4=3(3k2+4k+1)+1

is not a multiple of three. Hence we have 3n2.

In both cases, if 3 does not divide n, then 3 does not divide n2. Therefore, we have shown that if 3|n2, then 3|n.

In conclusion, we have proved that 3|n if and only if 3|n2.

E 8.6
Proposition: Let nZ, 3|(2n2+1) if and only if 3n.

Proof:
Let nZ.
(=>) We work contrapositively. Assume 3n. Thus n=3k for some kZ. We find

2n2+1=2(3k)2+1=18k2+1=3(6k2)+1

is not a multiple of 3. Thus we have 3(2n2+1).

(<=) We work directly. Assume 3n. There are two cases:

Case 1:
Suppose n=3k+1 for some kZ. We find

2n2+1=2(3k+1)2+1=2(9k2+6k+1)+1=18k2+12K+3=3(6k2+4k+1)

is a multiple of 3. Thus we have 3(2n2+1).

Case 2
Suppose n=3k+2 for some kZ. We find

2n2+1=2(3k+2)2+1=2(9k2+12k+4)+1=18k2+24k+8+1=3(6k2+8k+3)

is a multiple of 3. Thus we have 3(2n2+1).

Thus we have 3(2n2+1) for all cases.

In conclusion, we have proved 3|(2n2+1) if and only if 3n.

E 8.7
Proposition: Let a,b,c,d,nZ. If ab (mod n) and cd (mod n), prove that acbd (mod n).

Proof:
Let a,b,c,d,nZ. Assume ab (mod n) and cd (mod n). Thus we have ab=nk for some kZ and cd=nj for some jZ. We find

acbd=acbc+bcbd=c(ab)+b(cd)=c(nk)+b(nj)=n(ck+bj)

is a multiple of n. Thus we have acbd (mod n).

What does this statement say if we take c = a and d = b?
Simplified, it would say if ab (mod n), then a2b2 (mod n).

We know that 195 (mod 7). Do we then know 19252 (mod 7)? Yes.
How about 19353 (mod 7)? No, not based on this proof.

E 8.8
Proposition: Let x,yR. Then |xy|=|x||y|.

Proof: We work directly. There are four cases.

Case 1
Suppose x<0 and y<0. In this case, |x|=x,|y|=y, and |xy|=(xy)=xy. We find |x||y|=(x)(y)=xy. So, |x||y|=xy=|xy|

Case 2
Suppose x0 and y0. Then |x|=x,|y|=y, and |xy|=xy. So, |x||y|=xy=|xy|.

Case 3
Suppose x<0 and y0. Then |x|=x,|y|=y, and |xy|=xy. We find |x||y|=(x)y=xy. So, |x||y|=xy=|xy|.

Case 4
Suppose x0 and y<0. This case is similar to case 3, thus |x||y|=|xy|

Thus, in all cases, |xy|=|x||y|.

E 8.9

Proposition: a21 if and only if 1a1

Proof. Let aR. We work directly.
() Assume 1a1. There are two cases:

Case 1: Suppose 0a1:

We have 0a and a1. From fact (1), if a1 and 0<a, then 0a21.

Case 2: Suppose 1a<0:

We have 1a and a<0. From fact (2), if a1 and a>0, then a2=(a)212=1.

Therefore, in both cases, the assertion a21 holds.

() Assume a21. There are two cases:

Case 1 Suppose a0:

Since a21 and a0, it follows that 0a1.

Case 2 Suppose a<0:

Then a0 and (a)2=a21; therefore, 1a1.

Therefore, in both cases, the assertion 1a1 holds.

Hence, a21 if and only if 1a1.