Showing posts with label square. Show all posts
Showing posts with label square. Show all posts

Thursday, November 13, 2008

If x^2 (x squared) is odd then x is odd. (Contraposition)

Assume x is an integer. If x^2 (x squared) is odd then x is odd.


This is the same proof as we did yesterday, except this time we will prove the statement using another form of logic called contraposition.


To do this, we must first state the contrapositive of what we set out to prove.

so

If x^2 (x squared) is odd then x is odd

now becomes

If x^2 (x squared) is even then x is even

which is the contrapositive, the idea is that if we can prove that x^2 is even for all x that is even, it stands to reason that x^2 can only be odd for all x that is odd.

The way to write this symbolically is ~Q => ~P so therefore P => Q.

So now we prove if x^2 (x squared) is even then x is even

x is even so x=2y for some integer y.

then x^2 = 2y(2y) = (4y^2) = 2(2y^2) which is even.

Therefore if x^2 is even x is even, so by contraposition, if x^2 is odd, x is odd.

Wednesday, November 12, 2008

Prove that if x^2 is odd then x is odd. (Direct proof)

Assume x is an integer. If x^2 (x squared) is odd then x is odd.

First lets look at some examples

3^2 is 9
5^2 is 25
7^2 is 49
9^2 is 81

So it does appear that for any odd integer, its square is also an integer, how can we prove this for all cases?

First we assume x is odd, then x=2y+1 for some integer y.

So now x^2 = (2y+1)(2y+1) = 4y^2 + 4y + 1= 2(2y^2 + 2) + 1 which is odd.