When to know which proof method to use : indirect or direct proof Prove that for all integers x and y, if x² + y² is even then x + y is even.
Now for this question how can I determine which proof method to use if it is not mentioned in question.
Or can I use any of the method:
Direct, indirect(contradiction, contraposition) for proving above statement.
I am very noob at this so please help me.
 A: It is definitely scary when you need to start proving things and you want to make sure you are being precise, but keeping track of your premises, assumptions, and conclusions, and making sure that your reasoning seems sound overall is going to be more helpful in the beginning. I recommend trying to figure out an argument that makes sense to you first and then only worrying about the the formalism behind the proof strategy if you feel the need to refine your logical reasoning.
Like others have said, many easier statements will have many avenues for proof, so just focus on building a solid argument. As a demonstration, here are multiple for the similar statement $$\text{if }x^2\text{ is even, then }x\text{ is even}.$$
Direct: Let $x=2k+r$ for some $k\in\mathbb{Z}$ and $r=0$ or $r=1$, to cover the possibilities that $x$ is even or odd. Then, $x^2=4k^2+4kr+r^2=2(2k^2+2kr)+r$. Now, $x^2$ is even, so $r=0$, thus $x=2k$, so $x$ is even as well.
Contradiction: Suppose that $x$ is odd and $x^2$ is even, so we may write $x=2k+1$. Then, $x^2=2(2k^2+2k)+1$, but $x^2$ is even, a contradiction, so $x$ must not be odd, thus is even. The contrapositive looks quite similar to this one.
As you can see, each method is fairly similar and involves the same sort of "idea" of representing the number as a sum of an even number modulo adding one.
A: You should think about starting the proof with any of the possible methods, and see which one look easiest.
For that to be helpful advice, we have to know what makes an approach easier? There are many factors, because there's unfortunately no recipe that just cranks out proofs for you. Here's a few to think about:
Which assumption gives you more to work with?
Take a simpler example: "If $x$ is even, then $x^2$ is even."

*

*A direct proof will have you assume that $x$ is even: this is very helpful, because you can set $x = 2k$ for an integer $k$ and plug that into $x^2$.

*An indirect proof will have you assume that $x^2$ is odd: now, we'd be setting $x^2 = 2k+1$, and $x = \sqrt{2k+1}$ looks much less appealing when we're working with integers!

In your example, you have a choice between assuming "$x^2+y^2$ is even" or "$x+y$ is odd". Neither of these is immediately as easy to deal with. But "$x+y$ is odd" is on the verge of becoming useful, because we know two ways to get an odd sum: odd+even, and even+odd. This suggests a two-step strategy:

*

*Prove the contrapositive: assume that $x+y$ is odd, and try to prove that $x^2+y^2$ is odd.

*To make our assumption easier to work with, split it into cases. First, deal with the case that $x$ is odd: then, to make $x+y$ odd, $y$ must be even. Second, deal with the case that $x$ is even: then, to make $x+y$ odd, $y$ must be odd.

Which conclusion is easier to prove?
This is not so much a consideration at this point, but it will become one as you write trickier proofs.
Again, the details are many and varied, but here is an example: often, proving that something exists is much easier than proving that something does not exist. (When deciding between a direct and indirect proof, it's common to decide between these two options.) To prove that an equation has a solution, it's enough to find one: finding the solution may be hard, but writing the proof afterwards is easy. To prove that an equation has no solution, there's no clear method!
When you've seen similar theorems, which proof method was used?
This is an infinitely adaptable strategy that will see you through any level of math. Solve lots of problems, and remember how you solved them! Very rarely does a proof use entirely new ideas that have never been seen before: it's just a matter of remembering the right idea to use.
A: both contraposition and direct are equally valid proof techniques from a logically perspective.
If you use proof by contradiction, you should try to use the same kernel of the idea and redo the proof either directly or by contraposition.
After a while, you might experience that there are numerous statements that proof by contradiction is not essential, and there are direct or contrapositive proofs. Theoretically speaking, there are statements where proof by contradiction cannot be dispensed with. You can, through training, discern when proof by contradiction is essential or not.
In brief, for the first try, you may use any proof method. After you suceed, you can try to use the key idea and try to get a proof without contradiction, if that is possible.
A: Any proof method that's rigorous is acceptable.
Mostly we don't know which proof method is best, simplest or clearest to readers. First proofs are like first discoveries: they are nearly always quite elaborate - the elegances are usually only apparent with hindsight and the confidence of certainty.
So just go with the flow of your own mind.
My own initial approach was to start with the given assertion and draw that out, then use the intuitive (and readily "provable" via enumeration up to 100) idea of odd numbers squared always being odd, the rest being even.
But here, as Alex alluded to, we must first prove that  an odd number squared is an odd number; and an even number squared is an even one. Every proof, I think, must start there.
If $e$ is an even number, then:
$e = 2z $ where $z \in \mathbb{Z}. $
Squaring $e$ we get:
$ e^2 = 4z^2 $
And:
$ e^2/2 = 2z^2 $  where $z \in \mathbb{Z}. $
So we may say that squaring an even number results in another even number.
Every odd integer is offset by 1 from a previous even integer, i.e.
$$ o = e + 1 $$
So squaring the odd integer, we have:
$$ o^2 = (e + 1)^2 = e^2 + 2e + 1  $$
Since the first two terms of the RHS are even it is clear that the final term makes the whole expression odd.
So:
$ o^2 / 2 = w $ where $ w \notin \mathbb{Z}  $
So we can say that squaring an odd integer results in an odd integer and squaring an even integer results in an even one.
In the OP's original assertion, we take two integers, $x$ and $y$, and square each before adding them together to form an even integer, i.e.
$ x^2 + y^2 = 2z_1 $ where $ x,y,z_1 \in \mathbb{Z} $
If the sum of two integer squares adds up to an even number, then the integer squares must be either (1) both even; or (2) both odd.
And from the above reasoning, this means that both original integers (before squaring) must also be either (1) both even; or (2) both odd.
In either case the sum of the two integers will always be even, i.e.
$ (x + y) / 2 = z_2  $ where $ z_2 \in \mathbb{Z}. $
