<s>[INST] Is (f, g, h) an orthonormal string for $\langle f,g \rangle = \frac{1}{2\pi}\int_{0}^{2\pi}f(x)g(x)dx? I'm working on this exercise about orthogonality related to Fourier series. Basically, the exercise is as follows:
Study the inner product space of the space $C([0,2\pi])$:
$$
\langle f,g\rangle=\frac{1}{2\pi}\int_{0}^{2\pi}f(x)g(x)dx.
$$
Is the string $(f,g,h)$ orthogonal, when
$f(x)=1,\, g(x)=\sin x,\, h(x)=\cos x$?
Here's what I tried:
The conditions of orthonormality:
a) $\langle v_i,v_j\rangle = 0$ for all $j \neq i$
b) $||v_j|| = 1$ for all $j\in\{1,\cdots,n\}$.
Studying all the function pairs:
\begin{align*}\langle f,g\rangle &= \frac{1}{2\pi}\int_{0}^{2\pi}f(x)g(x)dx\\
    &= \frac{1}{2\pi}\int_{0}^{2\pi}1sin(x)dx&\text{| }\int sin(x)dx = -cos(x)\\
    &= \frac{1}{2\pi}(-cos(2\pi)+cos(0)) = \frac{1}{2\pi}(-1+1) = 0
\end{align*}
\begin{align*}\langle f,h\rangle &= \frac{1}{2\pi}\int_{0}^{2\pi}f(x)h(x)dx\\
    &= \frac{1}{2\pi}\int_{0}^{2\pi}1cos(x)dx&\text{| }\int cos(x)dx = sin(x)\\
    &= \frac{1}{2\pi}(sin(2\pi)-sin(0)) = \frac{1}{2\pi}(0-0) = 0
\end{align*}
\begin{align*}\langle g,h\rangle &= \frac{1}{2\pi}\int_{0}^{2\pi}g(x)h(x)dx&\\
    &= \frac{1}{2\pi}\int_{0}^{2\pi}sin(x)cos(x)dx&\text{| }sin(x)cos(x) = \frac{1}{2}sin(2x)\\
    &= \frac{1}{2\pi}\int_{0}^{2\pi}\frac{1}{2}sin(2x)dx&\text{| }2x = z, 2dx = dz\\
    &= \frac{1}{2\pi}\cdot\frac{1}{4}\int_{0}^{2\pi}sin(u)du&\text{| }\int sin(x)dx = -cos(x)\\
    &= \frac{1}{2\pi}(-\frac{1}{4}cos(4\pi)-(-\frac{1}{4})cos(2\cdot0))&\text{| }u = 2x \iff cos(u) = cos(2x)\\
    &= \frac{1}{2\pi}(-\frac{1}{4}cos(4\pi)+(\frac{1}{4})cos(2\cdot0))&\\
    &= \frac{1}{2\pi}(-\frac{1}{4}\cdot1+(\frac{1}{4})1) = 0&
\end{align*}
So the first condition is filled. Then:
\begin{align*}||f|| = \sqrt{\langle f,f\rangle} &= sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}f(x)f(x)dx}\\
    &= \sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}1dx}&\text{| }\int 1 = x\\
    &= \sqrt{\frac{1}{2\pi}(2\pi-0)} = sqrt{\frac{1}{2\pi}(2\pi)} = 1
\end{align*}
Then, to count $\langle g,g\rangle$ I need the formula for integrating $sin^2(x)$:
\begin{align*}1 - 2sin^2(x) &= cos(2x)&\\
    2sin^2(x) &= cos(2x) + 1&\\
    sin^2(x) &= \frac{1}{2}(cos(2x) + 1)&\\
    \int sin^2(x)dx &= \frac{1}{2}\int cos(2x) + 1dx&\\
    \int sin^2(x)dx &= \frac{1}{2}(-\frac{1}{2}sin(2x) + x) + C&\\
\end{align*}
\begin{align*}
||g|| = \sqrt{\langle g,g\rangle} &= sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}g(x)g(x)dx}\\
    &= \sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}sin^2(x)dx}\\
    &= \sqrt{\frac{1}{2\pi}(\frac{1}{2}((-\frac{1}{2}sin(4\pi)+2\pi)-(-\frac{1}{2}sin(2\cdot0)+0)}\\
    &= \sqrt{\frac{1}{2\pi}(\frac{1}{2}(0 + 2\pi)+0)} = \frac{1}{\sqrt{2}}
\end{align*}
Therefore, because $||g|| \neq 1$, we can conclude that the series $(f, g, h)$ is not orthogonal.
This is where I'm uncertain. From the setup of the exercise, it feels natural to me that the exercise is constructed so that the series should be orthogonal. But I can't find a mistake in what I've done. What did I mess up or is my assumption wrong?
 [/INST] It seems like you are using the terms orthogonal and orthonormal interchangeably in your question. This is not correct. In fact, orthonormality is a stronger condition than orthogonality.
A set of vectors $\{v_i\}_{i\in I}$ in an inner product space is orthogonal if $\langle v_i,v_j\rangle=0$ for all $i\neq j$. That set is orthonormal if it is orthogonal and if $\|v_i\|=1$ for all $i\in I$.

In conclusion, the set $\{f,g,h\}\subset C([0,2\pi])$ is orthogonal (as you have shown) but not orthonormal (since $\|g\|\neq 1$).
</s>