Spivak, Ch. 18, Problem 36: Understanding solution manual "easily" showing $\frac{1}{b-a}\int_a^b \log{f}\leq\log(\frac{1}{b-a}\int_a^b f )$ The following problem is from Chapter 18 of Spivak's Calculus



*(a) Let $f$ be a positive function on $[a,b]$ and let $P_n$ be a partition of $[a,b]$ into $n$ equal subintervals. Use Problem 2-22 to
show that

$$\frac{1}{b-a}L(\log{f},P_n)\leq\log\left(\frac{1}{b-a}L(f,P_n)\right )$$
(b) Use the Appendix to Chapter 13 to conclude that for all integrable
$f>0$ we have
$$\frac{1}{b-a}\int_a^b \log{f}\leq \log\left (\frac{1}{b-a}\int_a^b
 f\right )$$

The Appendix to Chapter 13 contains one theorem which says

Suppose $f$ is integrable on $[a,b]$. Then for every $\epsilon>0$
there is a $\delta>0$ such that if $P=\{t_0,...,t_n\}$ is a partition
of $[a,b]$ with $t_i-t_{i-1}<\delta$ for all $i$ then
$$\left | \sum\limits_{i=1}^n f(x_i)\Delta t_i-\int_a^b f(x)dx\right |<\epsilon$$

which basically says that any Riemann sum can be made arbitrarily close to the integral (which is defined in terms of lower and upper sums being equal).
The solution manual solution to part $(b)$

Theorem 1 shows that if $f$ is integrable then for every $\epsilon>0$
there is a $\delta>0$ such that
$$\left | \sum\limits_{i=1}^n f(x_i)\Delta t_i-\int_a^b f(x)dx\right
 |<\epsilon/2$$
for any partition $P=\{t_0,...,t_n\}$ of $[a,b]$, and choices $x_i$ in
$[t_{i-1},t_i]$, for which all $t_i-t_{i-1}<\delta$. It is easy to
conclude that we then have
$$\left |L(f,P)-\int_a^b f(x)dx \right |<\epsilon$$
for such partitions (we need to increase $\epsilon/2$ to $\epsilon$
since $m_i$ may not actually be $f(x_i)$ for any $x_i$ in
$[t_{i-1},t_i]$).

I'm not sure how the relationship between $\epsilon/2$ and $\epsilon$ was reached. Why do we increase $\epsilon/2$ to $\epsilon$?
All I came up with was that since
$$L(f,P)\leq \int_a^b f\leq U(f,P)$$
for all partitions $P$, and by definition of integrability of $f$
$$\forall\epsilon, \exists\text{ partition } P, 0<U(f,P)-L(f,P)<\epsilon$$
then
$$0\leq \int_a^b f - L(f,P)\leq U(f,P)-L(f,P)<\epsilon$$
$$|L(f,P)-\int_a^b f|<\epsilon$$
What does this have to do with Theorem 1?

In particular
$$\left |L(\log{f},P_n)-\int_a^b \log{f} \right |<\epsilon$$
$$\left |L(f,P_n)-\int_a^b f \right |<\epsilon$$
For $n$ sufficiently large. The desired result then follows easily
from part $(a)$.

I don't think I've ever been so frustrated with the use of the word "easily". How does this last step follow from part $(a)$?
 A: Your proof of $|L(f,P_n)-\int_a^b f|<\epsilon$ is OK, which doesn't have to do with Theorem $1$. Now you have: for each $\epsilon>0$, there is a partition $P_n$ such that
$$\left |L(\log{f},P_n)-\int_a^b \log{f} \right |<\epsilon,$$
$$\left |L(f,P_n)-\int_a^b f \right |<\epsilon.$$
We first prove the desried result from here. This may be not easy for some students. Denote $S=\frac1{b-a}\int_a^b f$.
\begin{align*}
\frac1{b-a}\int_a^b\log f-\log\left(\frac1{b-a}\int_a^b f\right)=&\frac1{b-a}\int_a^b\log f-\frac1{b-a}L(\log f, P_n)\\
&+\frac1{b-a}L(\log f, P_n)-\log\left(\frac{1}{b-a}L(f,P_n)\right )\\
&+\log\left(\frac{1}{b-a}L(f,P_n)\right )-\log\left(\frac1{b-a}\int_a^b f\right).
\end{align*}
We have
$$\frac1{b-a}\int_a^b\log f-\frac1{b-a}L(\log f, P_n)<\frac\epsilon{b-a},$$
$$\text{part (a) }\ \ \Longrightarrow\frac1{b-a}L(\log f, P_n)-\log\left(\frac{1}{b-a}L(f,P_n)\right )\leq0,$$
$$\log\left(\frac{1}{b-a}L(f,P_n)\right )-\log\left(\frac1{b-a}\int_a^b f\right)\leq \log\left(S+\frac\epsilon{b-a}\right)-\log(S).$$
So, we have: for each $\epsilon>0$,
$$\frac1{b-a}\int_a^b\log f-\log\left(\frac1{b-a}\int_a^b f\right)\leq \frac\epsilon{b-a}+\log\left(S+\frac\epsilon{b-a}\right)-\log(S).$$
Letting $\epsilon\to0$ gives that (here we use the continuity of $x\mapsto\log x$)
$$\frac1{b-a}\int_a^b\log f-\log\left(\frac1{b-a}\int_a^b f\right)\leq0,$$
which completes the proof of part (b).
Now, I'll try to explain the $\frac\epsilon2\mapsto \epsilon$ thing, although we don't have to use that in our proof. The key point is that we want $L(f, P_n)=\sum m_i \Delta t_i$, but we only have the Riemann sum $\sum f(x_i) \Delta t_i$, and there may not exist $x_i$ such that $f(x_i)=m_i$. Generally speaking, we can only pick $x_i$ such that $f(x_i)$ is arbitrarily close to $m_i$. This procedure, which is a kind of taking limit, needs another $\frac\epsilon2$-room. Therefore, we need to change $\frac\epsilon 2$ to $\frac\epsilon 2+\frac\epsilon 2=\epsilon$. This is a informal explanation, which can be converted to a rigorous analysis argument.
Rigorous proof:
Given $C>0$ arbitrarily. Since $\displaystyle m_i=\inf_{[t_{i-1}, t_i]} f$, we can find $x_i\in[t_{i-1}, t_i]$ such that $$0\leq f(x_i)-m_i<C\frac\epsilon{(b-a)}.$$
Now we have
\begin{align*}
\left|\sum m_i\Delta t_i-\int_a^b f\right|&\leq \left|\sum m_i\Delta t_i-\sum f(x_i)\Delta t_i\right|+ \left|\sum f(x_i)\Delta t_i-\int_a^b f\right|\\
&<\sum |m_i-f(x_i)|\Delta t_i+ \frac\epsilon 2\\
&<C\frac\epsilon{(b-a)}\sum \Delta t_i+ \frac\epsilon 2\\
&= C\epsilon +\frac\epsilon2.
\end{align*}
If we choose $C=\frac12$, then we will get what the solution manual said. The key point is not $C=\frac12$, but $C>0$. $C>0$ is needed due to the reasons I mentioned above: there may not exist $x_i$ such that $f(x_i)=m_i$  and we can only pick $x_i$ such that $f(x_i)$ is arbitrarily close to $m_i$.
Hope this helps!
A: If you are just trying to prove the result, here is an easier way:
Note that since $\log$ is concave, for any $y,y_0>0$ we have
$\log y \le \alpha(y) = \log y_0 + {y- y_0 \over y_0}$.
Let $y_0 = {1 \over b-a} \int_a^b f$ and then note that
${1 \over b-a} \int_a^b \log f \le {1 \over b-a} \int_a^b \alpha = \log y_0 = \log ( {1 \over b-a} \int_a^b f )$.
