$f$ is said to be convex if $$f(\lambda x + (1-\lambda)y) \le \lambda f(x)+(1-\lambda)f(y)$$ for every $x,y\in (a,b)$ and $\lambda \in [0,1]$. If $f$ is convex, $r \in \mathbb R$ and $[y_0-|r|,y_0+|r|] \subset (a,b)$, prove that $$(1+\lambda)f(y_0) - \lambda f(y_0-r)\le f(y_0+\lambda r) \le (1-\lambda)f(y_0) + \lambda f(y_0+r)$$ for every $\lambda \in [0,1]$.
The RHS is easy (by substituting $y=y_0$ and $x=y_0+r$) but I'm not sure how to prove the LHS from the definition of convexity.
I know both inequalities can be proven easily using geometric arguments but I want to see an algebraic proof if it is possible.
The LHS can be written as $\displaystyle\,f(y_0) \le \frac{\lambda}{1+\lambda} f(y_0-r) + \frac{1}{1+\lambda}f(y_0+\lambda r)\,$, which follows from the definition of convexity since:
$\displaystyle \frac{\lambda}{1+\lambda}, \frac{1}{1+\lambda} \in [0,1]\,$ and $\,\displaystyle \frac{\lambda}{1+\lambda} + \frac{1}{1+\lambda} = 1\,$;
$\require{cancel} \displaystyle \frac{\lambda}{1+\lambda}(y_0-\bcancel{r})+\frac{1}{1+\lambda}(y_0+\bcancel{\lambda r})=y_0\,$.