Show by induction that if $f:\mathbb{R}\to\mathbb{R}$ is convex, then for any $x_1,\dots ,x_n$ and $\lambda_1,\dots ,\lambda_n$ with $\sum_{i=1}^n\lambda_i = 1$, $$ f\left(\sum_{i=1}^n\lambda_i x_i\right) \leq \sum_{i=1}^n\lambda_i f (x_i) . $$
I think this is similar to the Jensen's inequality, but am not sure how to formally proof this.
Thank you so much!