How can I go by proving $x < \frac{x+y}{2} < y$ when $x < y$? I have this exercise that asks: Prove that for all real numbers $x$ and $y$ if $x < y$, then $x < \frac{x+y}{2} < y$.
My attempt to this was like so:
Proof: Let x and y be real numbers and suppose $x < \frac{x+y}{2} < y$. Multiplying 2 to both sides gives us this expression $2x < x+y < 2y$. Then we simplify it to get $x < y$. Since we get the $x < y$, then we know its true.
Is that a correct way to approach this problem?     
 A: You started by the end.
$$x <y\implies \frac {x}{2}<\frac {y}{2} $$
$$\implies \frac {x}{2}+\frac {x}{2}<\frac {x}{2}+\frac {y}{2} $$
$$\implies x <\frac {x+y}{2} $$
this is correct.
A: We can do it through a proof by contradiction. Given the premise, assume that it's not the case that $x < \frac{x+y}{2} < y$, then  $x < \frac{x+y}{2}$ and $\frac{x+y}{2} < y$ and $x < y$ must all be false. 
However we have from the premise that $x < y$ is true, which is a contradiction on that $x < y $ is false; so therefore our assumption must be wrong; which means the statement $x < \frac{x+y}{2} < y$ is true for when $x < y$.
A: Because $$y-\frac{x+y}{2}=\frac{y-x}{2}>0$$ and
$$\frac{x+y}{2}-x=\frac{y-x}{2}>0.$$
A: Often you can assume the conclusion, work towards the premise and reverse the steps but you must be careful to ensure all the steps are still valid. To modify your solution so that it's a proof we can take the following steps.
$1)$ Given $x < y$ show that $2x < x+y$
$2)$Given $x < y$ show that $x + y < 2y$
$3)$Conclude that $2 x < x+ y < 2y$
$4)$Mulitply $2x < x+ y < 2y$ though by $\frac{1}{2}$
and you've got the result you're looking for. I find many $\epsilon$-$\delta$ proofs for continuity of a function often reveal themselves this way so it's worth remembering the technique.
