Prove that if x and y are real numbers, then max(x,y) + min(x,y) = x+y. [Hint: Use a proof by cases, with the two cases corresponding to x≥y and x<y, respectively.]
Using hint, I supposed two cases where: x≥y or x<y.
Thus, if x≥y, then max(x,y) = x or y (since x and y might be the same), min(x,y) = y. Therefore, it is equal to 2y or x+y. Since it covers all of the cases, the equality always holds.
If x<y, then max(x,y) = y, min(x,y) = x. Thus, it is equal to x+y.
But the answer is slightly different from my solution. The answer is:
If x≤y, then max(x,y) + min(x,y) = y+x = x+y. If x≥y, then max(x,y)+min(x,y) = x+y. Because there are only two cases, the equality always holds.
You can notice that the answer supposed two different cases, x≤y or x≥y.
But I supposed x≥y or x<y.
I want to know whether these two different answers are both correct or not.
On the other hand, is it correct if I make three cases, where x > y, x = y, and x < y?
When x > y, max(x,y) = x, min(x,y) = y. Thus, x + y.
When x = y, max(x,y) = x or y, min(x,y) = x or y. Thus, 2x or 2y or x + y.
When x < y, max(x,y) = y, min(x,y) = x. Thus, x + y.
Is this answer correct? It seems clearer for me.
Thank you in advance.