[Math] Prove that if $(x+y)$ is even, then $(x-y)$ is even, for integers.

discrete mathematics

I am completely stuck on how to prove this. I need to prove it multiple ways too (directly, contrapositive and by contradiction). My problem is that I can't figure out how to isolate $x$ and $y$ in order to be able to show the difference between $x+y$ and $x-y$.

The only thing I can think of is first to prove that if $x$ and $y$ are both even, then $x+y$ is even. But then, if they are both odd, $x+y$ is also even. So I'm not sure this is the right way to go, unless I do multiple proofs, one for when $x$ and $y$ are both odd and one for when $x$ and $y$ are both even. Not sure this is the right way to go. Would it be sort of a proof by cases then? Like, prove that if x+y is even then $x-y$ is even, when $x$ and $y$ are both even and $x$ and $y$ are both odd?

The other solution I thought of would be to assume if $x+y$ is even, then it is equal to $2k$. And then somehow show that $2k$ is the addition of $2$ integers… I tried to show that $x = 2k – y$ but that doesn't show me anything, and when I tried to do the same for $y$ and substitute, I end up with $x = 2k – 2k – x$ and I get $x = -x$ which obviously doesn't make sense.

I'm pretty frustrated with this problem… I am comfortable with the different proof methods but I am stuck on how to express this properly. Any advice on how to approach it?

Thanks

Best Answer

Hint: $(x-y) = (x+y) - 2y$. Can you take it from here?