The statement
$\exists t\in[0,1]$ with $tx+(1−t)y\not\in M$
is not equivalent to
$\frac{1}{2} (x+y)\not\in M$
as the existence of a $t \in [0, 1]$ does not guarantee that $t = \frac{1}{2}$.
Idea of a solution
This exercise can be solved with a similar approach to the bisection method.
Proof
If $t \in \{0, 1\}$, the equality holds.
Let $t \in (0, 1)$ be a dyadic rational, i. e. $\exists\, m \in \mathbb{N}, \exists\, a \in [\![0, 2^m - 1]\!], t = \frac{a}{2^m}$ and $a \wedge 2^m = 1$ ($a$ is odd).
Let $a = \overline{a_1 a_2 ... a_{m-1} a_m}$ be the binary representation of $a$, with $a_m = 1$. Then $t = \overline{0.a_1 a_2 ... a_{m-1} a_m}$.
Let us show by induction on $m$ that $\forall\, x, y \in M, t x + (1 - t) y \in M$.
- If $m = 1$, then $t = \overline{0.a_1} = \overline{0.1} = \frac{1}{2} = 1 - t$. By hypothesis, $tx + (1-t) y = \frac{1}{2}(x + y) \in M$.
- Suppose that $\forall\, t \in [0, 1), (\exists\, a \in [\![0, 2^m - 1]\!], t = \frac{a}{2^m} \implies \forall\, x, y \in M, t x + (1 - t) y \in M)$.
We want to show that property for $m + 1$.
Let us write $u := \overline{0.a_2 a_3... a_m a_{m + 1}}$. By hypothesis of induction, $\forall\, x, y \in M, ux + (1 - u)y \in M$.
- If $a_1 = 0$, then $\frac{1}{2} (\underbrace{ux + (1 - u)y}_{\in M} + y) \in M$.
As $\frac{1}{2} (ux + (1 - u)y + y) = tx + (1-t)y \in M$, this concludes this case.
- Similarly, if $a_1 = 1$, then $\frac{1}{2} (x + \underbrace{ux + (1 - u)y}_{\in M}) \in M$.
As $\frac{1}{2} (x + ux + (1 - u)y) = tx + (1-t)y$, we get $tx + (1-t)y \in M$.
Conclusion: If $t$ is a dyadic rational, then $\forall\, x, y \in M, t x + (1 - t) y \in M$.
You can write $t = \overline{0.t_1 t_2 ... t_k...}$ the dyadic representation of t (in base 2), s. t.
$$ t = \sum_{k = 1}^{+\infty} \frac{t_k}{2^k} $$
Writing $(v_m)_{m \in \mathbb{N}}$ the sequence of dyadic rationals $v_m := \overline{0.t_1 t_2 ... t_m}$, it follows that
$$\forall\, x, y \in M, v_m x + (1- v_m) y \in M$$
As $M$ is closed and $v_m \to t$, we get
$$\forall\, x, y \in M, t x + (1 - t) y \in M$$
Finally, $M$ is a convex set.