7. Use a direct proof to show that every odd integer is the difference of two squares.

Let’s refresh the concept of direct proof.

“A direct proof of a conditional statement p → q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. A direct proof shows that a conditional statement p → q is true by showing that if p is true, then q must also be true, so that the combination p true and q false never occurs.” Discrete Mathematics and its Applications by Rosen.

We can rephrase the exercise as follows: if n is odd, then n is the difference of two squares.

As per the definition of direct proof, we will assume that p (n is odd) is true, and we are going to take subsequent steps, using rules of inference, to show that q is also true.

n=2k+1 for a certain integer k (definition of odd number).

Now, we must prove that 2k+1 is the difference of 2 squares.

2k+1 = 1 (2k+1)

= (k+1-k)( 2k+1)

= 2k2+ k + 2k + 1 -2k2 -k

= 2k2+ 3k + 1 – 2k2 – k, simplifying 3k-k

= 2k2 + 2k + 1 – 2k2

= k2+ k2 + 2k + 1 – k2 – k2, simplifying one term k2 with one term -k2,

= k2+ 2k + 1 – k2,

= (k+1)2 – k2

Related exercises: