Prove $f(\sum^k_{i=1} \alpha_i x_i) \leq \sum^k_{i=1} \alpha_i f(x_i) $ for a convex function f

I'm learning for an exam in calculus and have come across this question which I can't seem to prove:

Let $C \subseteq V$ be a convex set. Let there be a function >$f:C\rightarrow \mathbb{R}$ a convex function.

Now let there be scalars $\alpha_1,\alpha_2 \dots \alpha_k >0$ such that >$\sum^k_{i=1} \alpha_i = 1$, and also let there be a group of points >$x_1,x_2\dots x_k \in C$. Show that the following inequality exists:

$f(\sum^k_{i=1} \alpha_i x_i) \leq \sum^k_{i=1} \alpha_i f(x_i) $

I thought about using induction to show the inequality, whereby the basis k=2 is the actual definition of a convex function i.e: $f(\lambda x + (1-\lambda)y) \leq \lambda f(x) + (1-\lambda)f(y)$ I've ran into a problem using induction, since the scalars won't sum up to 1 in the induction hypothesis. I also don't really use the fact that C is convex, which I'm probably supposed to...

Either there is some algebraic trick that can be done so I can use induction, or I'm doing something wrong (and induction is not the way to go with this inequality)

Any help will be appreciated, thank you!


Solution 1:

Induction step: \begin{align*} f\left(\sum_{i=1}^{n+1}\alpha_i x_i\right)&=f\left(\sum_{i=1}^{n-1}\alpha_i x_i+(\alpha_n+\alpha_{n+1})\left(\frac{\alpha_n}{\alpha_n+\alpha_{n+1}}x_n+\frac{\alpha_{n+1}}{\alpha_n+\alpha_{n+1}}x_{n+1}\right)\right)\\ &\leq\sum_{i=1}^{n-1}\alpha_i f(x_i)+(\alpha_n+\alpha_{n+1})f\left(\frac{\alpha_n}{\alpha_n+\alpha_{n+1}}x_n+\frac{\alpha_{n+1}}{\alpha_n+\alpha_{n+1}}x_{n+1}\right)\\ &\leq\sum_{i=1}^{n-1}\alpha_i f(x_i)+(\alpha_n+\alpha_{n+1})\left(\frac{\alpha_n}{\alpha_n+\alpha_{n+1}}f(x_n)+\frac{\alpha_{n+1}}{\alpha_n+\alpha_{n+1}}f(x_{n+1})\right)\\ &=\sum_{i=1}^{n+1}\alpha_i f(x_i). \end{align*} The first inequality above uses the induction hypothesis. The convexity of $C$ is there so that whenever $x_1,\ldots, x_n$ are in $C$, any convex combination of $x_1,\ldots,x_n$ is again in $C$. (Recall the domain of $f$ is $C$.)