About convex function The exercise is about convex functions:
How to prove that $f(t)=\int_0^t g(s)ds$ is convex in $(a,b)$ whenever $0\in (a,b)$ and $g$ is increasing in $[a,b]$?
I proved that 
$$f(x)\leq \frac{x-a'}{b'-x}f(b')+\left(1-\frac{x-a'}{b'-x}\right)f(a')$$
when we have 
$$x=\left(1-\frac{x-a'}{b'-a'}\right)a'+\frac{x-a'}{b'-a'}b'$$

A slightly different approach:
We need to show $f(x+\lambda(y-x)) \leq f(x) + \lambda (f(y)-f(x))$, with $\lambda \in (0,1)$. Suppose $x<y$. Then
$$f(x+\lambda(y-x)) - f(x) = \int_{x}^{x+\lambda(y-x)} g(s) \; ds$$
Using the change of variables $t=\frac{s-x}{\lambda}+x$, we get
$$\int_{x}^{x+\lambda(y-x)} g(s) \; ds = \int_{x}^{y} g(\lambda(t-x)+x) \; \lambda \; dt \leq \lambda \int_{x}^{y} g(t) \; dt = \lambda(f(y)-f(x)),$$
where the second to last step follows because $\lambda(t-x)+x \leq t$, and $g$ is increasing.
If $x>y$, let $\mu = 1-\lambda$ (note $\mu \in (0,1)$), then we have already shown that
$$f(y+\mu(x-y)) \leq f(y) + \mu (f(x)-f(y)).$$
Since $c+\mu(d-c) = c+(1-\lambda)(d-c) = d+\lambda(c-d)$, the desired result follows.
