intermediate value theorem convex combination Let $f \colon [a,b] \to \mathbb{R}$ be continuous, $p,q>0$. We want to show that there is a $c\in [a,b]$ s.t. $pf(a)+qf(b)=(p+q)f(c)$.
$\frac{p}{p+q}, \frac{q}{p+q}$ are both in $(0,1)$. Then
$\frac{p}{p+q} f(a) + \frac{q}{p+q} f(b) $ is in $(0, f(a)+f(b))$.
If we want to apply the intermediate value theorem we better would need it to be in $[f(u), f(w)]$, where we know that $f(u)$ is the Minimum and $f(w)$ is the Maximum.
But we have not any info about what the Min/Max would be?
 A: $\frac{p}{p+q} f(a) + \frac{q}{p+q} f(b) $ is also in $[m,M]$ where $m$ is the minimum and $M$ is the maximum.  For example, $f(a) \leq M$ and $f(b) \leq M$ implies $\frac{p}{p+q} f(a) + \frac{q}{p+q} f(b)\leq  \frac{p}{p+q} M+ \frac{q}{p+q} M=M$ and similarly for the minimum.
A: Define a function $x \mapsto h(x) = f(x)-\frac{p}{p+q}f(a)-\frac{q}{p+q} f(b)$. Observe that this is continuous in $[a,b]$. Then:
$$h(a) = \frac{q}{p+q} \left(f(a)-f(b) \right)$$
$$h(b) = \frac{p}{p+q} \left(f(b)-f(a) \right)$$
If $f(a) = f(b)$, then we can let $c = a$ and we are done. Suppose that $f(a) \neq f(b)$. Then, $h(a) \cdot h(b) < 0$ so by the Intermediate Value Theorem:
$$\exists c \in [a,b]: h(c) = 0$$
$$\implies f(c) = \frac{p}{p+q} f(a)+\frac{q}{p+q} f(b)$$
$$\implies p f(a)+q f(b) = (p+q) f(c)$$
as was desired. $\Box$
A: By the intermediate value theorem, $f([a, b]) \subset \mathbb R$ is an interval, which is always a convex subset. Thus $\frac{p}{p + q} f(a) + \frac{q}{p + q} f(b) \in f([a, b])$ by convexity as $f(a), f(b) \in f([a, b])$, so there exists a $c \in [a, b]$ such that $f(c) = \frac{p}{p + q} f(a) + \frac{q}{p + q} f(b)$.
