Consider a periodic function $f(w)$, it can be expressed in terms of sins and cosines using a fourier series : $f(w)=\frac{a_0}{2}+ \sum{}_{n=1}^{\infty} a_ncos(nw)+b_nsin(nw) $.
I was trying to derive formula for the coefficients $a_n $ and $b_n$. My approach was to think of an analogy in terms of vectors. If a vector $\vec{A}$ is expressed in terms of 2 other vectors, example $\vec{A} = a \vec{B} + b\vec{C}$, you can find the coefficients through taking a dot product of A with the normalised versions of vectors A, i.e $a = \vec{A} \cdot\hat{B}$ , $b = \vec{A} \cdot\hat{C}$.
So I thought it made sense here to the same, i.e: $a_n = \int^{T+t_0}_{t_o}cos(nw)f(w) /\sqrt{\int^{T+t_0}_{t_o}cos^2(nw)}$ and $b_n= \int^{T+t_0}_{t_o}sin(nw)f(w) /\sqrt{\int^{T+t_0}_{t_o}sin^2(nw)}$. However, looking up the real answers, it seems to follow the same approach except the divisions by normalisation factors.
I just wanted to ask, why we dont divide through by the "magntiudes" of the $cos(nw)$ or $sin(nw)$ functions we are taking an inner product with? Where does my analogy with the ordinary vector dot product break down here?