TITLE: Does $ \int_a^b |f(x) - f_1(x)| = 0$ imply $ \int_a^b |f(x) - f_1(x)|^2 = 0$?
QUESTION [6 upvotes]: Context:I'm trying to solve this problem:

Suppose $f, f_1, g, g_1$ all Riemann integrable complex valued functions on $[a, b]$ such that $f \sim f_1$ and $g \sim g_1$. Prove $\langle f, g \rangle = \langle f_1, g_1 \rangle$.
In this problem, $f \sim f_1$ means $ \int_a^b |f(x) - f_1(x)| = 0$, $\langle f, g \rangle$ is the Hermitian scalar product $ \int_a^b f(x) \overline{g(x)}$, and $\|f\| = \sqrt{\langle f, f \rangle}$.

I tried saying that
\begin{align}\langle f, g \rangle &= \langle f - f_1, g \rangle + \langle f_1, g \rangle\\[0.2cm]&= \langle f - f_1, g \rangle + \overline{\langle g, f_1 \rangle}\\[0.2cm]&= \langle f - f_1, g \rangle + \overline{\langle g - g_1, f_1 \rangle} + \overline{\langle g_1, f_1 \rangle}\\[0.2cm]&= \langle f - f_1, g \rangle + \langle f_1, g - g_1 \rangle + \langle f_1, g_1 \rangle\end{align}
And I wanted to say that the first two terms were $0$ by the Cauchy Schwarz Inequality, by saying $$|\langle f - f_1, g \rangle| \leq \|f-f_1\| \cdot \|g\|$$ and that $\|f - f_1\|$ is $0$, so the left side is too. So that's why I'm wondering if there's a way to show that $$\int_a^b |f(x) - f_1(x)| = 0 \implies \int_a^b |f(x) - f_1(x)|^2 = 0$$

REPLY [8 votes]: The function $|f - f_{1}|$ is Riemann integrable on $[a, b]$, hence bounded. That is, there exists a real number $M$ such that
$$
|f(x) - f_{1}(x)| \leq M,\qquad a \leq x \leq b.
$$
Consequently,
$$
\int_{a}^{b} |f(x) - f_{1}(x)|^{2}\, dx
  \leq M \int_{a}^{b} |f(x) - f_{1}(x)|\, dx = 0.
$$