Define inner product as $\langle f, g \rangle_{[a,b]} := \int_a^b f(x)g(x) \ dx$.
Say $f,g$ are orthogonal: $\langle f, g \rangle_{[a,b]} = 0 \Leftrightarrow \int_a^b f(x)g(x) \ dx = 0 \Leftrightarrow \lim_{n \to \infty} \sum_{k=1}^n f(\xi_k)g(\xi_k) \cdot \frac{b-a}{n} = 0$, where $\xi_k \in [x_{k-1},x_k]$. Is it true then, that $\lim_{n \to \infty} \sum_{k=1}^n f(\xi_k)g(\xi_k) = 0 $ ? If yes I would appreciate a proof or a reference to a proof, if not a counterexample is sufficient.
Consider $f(x)=\sin x$ and $g(x)=1$ on $[-\frac{\pi}{2},\frac{\pi}{2}]$. Split into $2n$ intervals of equal length, and pick $\xi_k$ to maximize each individual summand (which minimizes the magnitude of negative summands), giving
$$ -\sin\Bigl(\frac{(n-1)\pi}{2n}\Bigr)-\cdots-\sin(0)+\sin\Bigl(\frac{1\pi}{2n}\Bigr)+\cdots+\sin\Bigl(\frac{n\pi}{2n}\Bigr) $$
which simplifies to $\sin\frac{\pi}{2}=1$.