Upper sum and integral epsilon proof

I showed previously that $f(x)=\ln x$ on $[1,2]$ has the upper sum $$U(f,P_n)=\frac 1 n\sum_{i=1}^{n}\ln\left(1+\frac in\right)$$

I want to prove that $\forall\varepsilon>0$, $\exists N\in\mathbb{Z}$ such that when $n\geq N$ we have $$\left|U(f,P_n)-\int_1^2\ln x dx\right|<\varepsilon$$ So I see I need to show that the distance between the upper sum and the integral is small from a certain point. I know we have that as $n$ the number of partitions increases $U$ gets smaller. So that the upper sum converges to the true value of the integral (and thus also closer to the lower sum). It makes sense than that the distance between the upper sum and the integral would become small from a certain point. I also know of the result that (let the definite integral be $I$ and the Riemann sum be $S(f,P_n))$:

$$\left|S(f,P_n)-I \right|<\varepsilon$$ Which also adds to what I'm trying to prove.

Moving along. I calculated $\int_1^2\ln x dx$ to be $2\ln 2-1$) $$\left|\frac 1 n\sum_{i=1}^{n}\ln\left(1+\frac in\right)-2\ln 2-1\right|<\varepsilon$$

Kinda stuck here

• "Which I can write as $\frac{ln2}{n}$ right?" What do you mean ? You can bound $$\frac1n \sum_{i=1}^n \ln(1 + i/n) \leq \frac1n \cdot n \ln(2) = \ln(2)$$ Or using the fact $\ln(1+x) \leq x$ $$\frac1n \sum_{i=1}^n \ln(1 + i/n) \leq \frac1n \sum_{i=1}^n \frac{i}{n} = \frac{1}{n^2} \cdot n(n+1)/2$$ But the summation is not equal to $\ln(2)/n$. – Zubzub Mar 16 '17 at 9:50
• Ok thanks. Fixed and added. But now I'm even more lost. – themli Mar 16 '17 at 9:54

Note that $$\int_1^2\ln xdx=\int_0^1\ln(1+x)dx=\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\ln(1+x)dx, U(f,P_n)=\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\ln(1+\frac{i}{n})dx$$ and that $f(x)=\ln(1+x)$ is increasing. So by the Lagrange MVT, one has \begin{eqnarray} &&|U(f,P_n)-\int_1^2\ln xdx|\\ &=&\bigg|\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\bigg[\ln(1+\frac{i}{n})-\ln(1+x)\bigg]dx\bigg|\\ &=&\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\bigg[\ln(1+\frac{i}{n})-\ln(1+x)\bigg]dx\\ &=&\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\frac{1}{1+t_i}(\frac{i}{n}-x)dx\\ &\le&\sum_{i=1}^n\int_{\frac{i-1}{n}}^{\frac{i}{n}}\frac{1}{1+t_i}(\frac{i}{n}-\frac{i-1}{n})dx\\ &\le&\sum_{i=1}^n\frac{1}{n}\int_{\frac{i-1}{n}}^{\frac{i}{n}}1dx\\ &=&\frac{1}{n}. \end{eqnarray} Thus for $\forall \epsilon>0$, there is $N\in\mathbb{N}$ such that when $n\ge N$, one has $\frac{1}{n}<\epsilon$. This implies $$|U(f,P_n)-\int_1^2\ln xdx|<\epsilon.$$
• What was that you did with when you went from $\ln$ to $t_i$'s? – themli Mar 16 '17 at 14:33
• @themli, $\frac{1}{1+t_i}\le1$. – xpaul Mar 16 '17 at 14:47
• So there should be a $\leq$ sign when you change to $t_i$? From line 3 to 4. Sorry but this proof seems beyond my current comprehension. So I was kinda lost at that point. But awesome work either way. – themli Mar 16 '17 at 14:52
• $\ln(1+\frac{i}{n})-\ln(1+x)=\frac{1}{1+t_i}(\frac{i}{n}-x)$, $t_i\in (x,\frac{i}{n})$. – xpaul Mar 16 '17 at 14:55