An interesting convex set property Let $C$ be a nonempty convex subset of $\mathbb{R}^{2}$ and $f,g:[a,b]\rightarrow \mathbb{R}$ be two continuous functions such that $\left(f(t),g(t)\right)\in C$ for all $t \in [a,b]$.
I want to prove that also $\left(\frac{1}{b-a}\int_{a}^{b} f(t)dt, \frac{1}{b-a}\int_{a}^{b} g(t)dt \right) \in C$.
I have tried to prove it by using the integral mean value theorem.
There exist $t_1,t_2 \in[a,b]$ such that $f(t_1)= \frac{1}{b-a} \int_{a}^{b} f(t)dt$ and $g(t_2)= \frac{1}{b-a}\int_{a}^{b} g(t)dt$.
But in general $t_1 \ne t_2$, so I cannot use the hypothesis that $\left(f(t),g(t)\right)\in C$ for all $t\in [a,b]$ in order to prove that also $\left(f(t_1),g(t_2)\right)=\left(\frac{1}{b-a}\int_{a}^{b} f(t)dt, \frac{1}{b-a}\int_{a}^{b} g(t)dt \right)\in C$.
How can I prove that property?
How is it possible to prove the same property in $\mathbb{R}^3$?
 A: The following depends on the intuitively obvious (but awkward to prove) fact that if $C$ is convex and $x \notin C$ then there is some
non zero linear $l$ and a constant $\alpha$ such that $l(x) = \alpha$ and $l(c) \le \alpha$ for all $c \in C$.
Let $\phi: [a,b] \to \mathbb{R}^2$ be given by $\phi(x) = (f(x),g(x))$, we are given that $\phi(x) \in C$ for all $x \in [a,b]$ and we want to prove that $\bar{\phi} \in C$ where
$\bar{\phi} = { 1\over b-a} \int_a^b \phi(x)dx$.
Suppose $\bar{\phi} \notin C$, then there is a non zero linear functional $l$ and constant $\alpha$ such that $l(\bar{\phi}) = \alpha$ and 
$l(c) \le \alpha$ for all $c \in C$. In particular, we must
have $l(\phi(x)) = \alpha$ for all $x \in [a,b]$ and so
we can see that $\phi(x) \in C \cap L$ where $L = l^{-1}(\{ \alpha \})$.
Now let $k$ be another linear functional whose normal is orthogonal to $l$. If $k(\bar{\phi}) \in k(\phi([a,b]))$ then there is some $x$ such that $k(\phi(x)) = k(\bar{\phi})$ and since $l(\phi(x)) = l(\bar{\phi})$ we see that $\bar{\phi} = \phi(x)$, a contradiction (because $\phi(x) \in C$ and we have assumed that $\bar{\phi} \notin C$). Hence we can presume $k(\phi(x)) < k(\bar{\phi})$ for all $x \in [a,b]$. However, then
$k(\bar{\phi}) = {1 \over b-a} \int_a^b k(\phi(x)) dx < {1 \over b-a} \int_a^b k(\bar{\phi}) dx = k(\bar{\phi})$, again a contradiction.
Hence $\bar{\phi} \in C$.
This result extends (essentially by induction) to $\mathbb{R}^n$. Also, the result applies to any probability measure $P$ on $[a,b]$ (not just ${1 \over b-a} m$) and one only needs $\phi$ to be integrable and $\phi(x) \in C$ ae. [$P$].
Note: 
If $l$ is a non zero linear functional on $\mathbb{R}^2$ it can be written as $l(x) = \lambda_1 x_1 + \lambda_2 x_2 = \lambda^T x$. When I say choose a $k$ whose normal is orthogonal to that of $l$, I mean choose some non zero $\kappa \bot \lambda$ and let $k(x) =\kappa^T x$. 
The point is that any point $x$ in the plane can be uniquely identified by the pair $(l(x),k(x))$.
A: If we approximate the integral with a Riemann sum for a partition of $[a,b]$ in to $n$ equal intervals, then let point $p_n$ be  the average of these points. Then $p_n\in C$. Also, at least one line through $p_n$ intersects the curve $(f,g)$ in at least two points $u_n,v_n$ with $p_n$ between $u_n$ and $v_n$ (why?).
If we let $n\to\infty$, we find that $p_n\to \frac1{b-a}\int_a^b$ so that the latter is $\in\overline C$. From the sequences $u_n, v_n$ we find a common convergent subsequence $u_{n_k}\to u$, $v_{n_k}\to v$ with both limits on the curve (this uses that $[a,b]$ is compact). Conclude that this makes $p\in C$.
