Let $f:[0,1]\rightarrow \mathbb{R}$ be a monotonic increasing function such that $f(0)=0, f(1)=1.$
$(a)$ Prove for all $n$: $$\int_0^1f(x)dx \leq \frac{1}{n}\sum_{j=1}^nf(\frac{j}{n}) \leq \int_0^1f(x)dx +\frac{1}{n}$$
$(b)$ Prove for all $n$: $$\int_0^1f(x)dx \leq \frac{2}{n^2}\sum_{j=1}^njf(\frac{j^2}{n^2})$$
My try:
$(a)$ Let us set a partition $\Pi_n$ of the interval $[0,1]$ of $n$ intervals of the same length and pick the end points of each interval as $t_n.$
We get the Riemann sum of $f(x),$ which is integrable, so when $n \rightarrow \infty, \lambda(\Pi_n)\rightarrow 0,$ and we get:
$$\lim_{n\to \infty}\sum_{j=1}^n\frac{1}{n}f(\frac{j}{n})=\lim_{n\to \infty}S(f,\Pi_n,t_n)= \int_0^1f(x)dx $$
I can see that for $j=n$, we get $\frac{1}{n}f(1)=\frac{1}{n}$. Can I take it out of the summation (obviously won't affect the integral) and then because of the monotonicity we get right inequality ?
As for the left inequality, I belive we should use that $f(0)=0$, but can't really see how.
$(b)$ I think, in the same way as in $(a)$, we can get the Riemann sum of $2xf(x^2)$, but can't really get further.
Any help appreciated.
Hint:
For (a) use
$$\frac{1}{n} f\left(\frac{j-1}{n} \right) \leqslant \int_{(j-1)/n}^{j/n}f(x) \, dx \leqslant \frac{1}{n} f\left(\frac{j}{n} \right)$$
and sum from $j=1$ to $n$, yielding
$$\frac{f(0)}{n} + \frac{1}{n} \sum_{j=1}^n f\left(\frac{j}{n} \right) - \frac{f(1)}{n} = \frac{1}{n} \sum_{j=1}^n f\left(\frac{j-1}{n} \right) \leqslant \int_{0}^{1}f(x) \, dx \leqslant \frac{1}{n} \sum_{j=1}^nf\left(\frac{j}{n} \right),$$
and, since $f(0) = 0$ and $f(1) = 1$,
$$\tag{*}\frac{1}{n} \sum_{j=1}^n f\left(\frac{j}{n} \right) - \frac{1}{n} \leqslant \int_{0}^{1}f(x) \, dx \leqslant \frac{1}{n} \sum_{j=1}^nf\left(\frac{j}{n} \right).$$
For (b)
$$\int_{(j-1)^2/n^2}^{j^2/n^2}f(x) \, dx \leqslant \frac{(2j-1)}{n^2} f\left(\frac{j^2}{n^2} \right)$$