Let $f:[0,1] \to [1,2]$, continuous on $[0,1]$ with $1<f(1)<2$.
Show that $$\int_0^1\left (f^2(x)-2f(x)\right )\, dx>-1.$$
We have that $$(f(x)-1)^2\geq 0\implies \int_0^1 (f(x)-1)^2\, dx\geq 0 \Rightarrow \int_0^1\left (f^2(x)-2f(x)\right )\, dx\geq -1.$$ Till here we have $\geq$ instead of $>$. How can we show that the equality doesn't occur?
Does the same holds also if $f$ is Riemann integrable?
The equality occurs if and only if $$\int_0^1 (f(x)-1)^2\, dx = 0 \iff \forall x\in(0,1), f(x)=1 \tag{1} $$ But because $f(1)>1$ and $f(x)$ continue, so there exists an interval $(1-\epsilon,1)$ near $1$ such that $\forall x \in (1-\epsilon,1), f(x)>1$. Hence, the condition (1) can't be satisfied. That's why the equality doesn't occur.