Complex representation of sinusoids question A sum of sinusoids defined as:
$$\tag1f(t) = \sum_{n=1}^{N}A\sin(2\pi tn) + B\cos(2\pi tn)$$ is said to be represented as:
$$\tag2f(t) = \sum_{n=-N}^{N}C\cdot e^{i2\pi tn}$$
which is derived from Euler's identity $e^{ix} = \cos(x) + i\sin(x)$ from which follows that:
$$\cos(x) = \frac{e^{ix} + e^{-ix}}{2}$$ and $$\sin(x)=\frac{e^{ix} - e^{-ix}}{2i}$$ 
therefore:
$$ \cos(x) + \sin(x) = \frac{e^{ix} + e^{-ix}}{2} + \frac{e^{ix} - e^{-ix}}{2i} $$
The thing is, I cannot see how this turns into $(2)$? The last statement, no matter how I try to manipulate it, I cant get it to the form $$\cos(x) + \sin(x) = Ce^{ix}$$ so that the summation works and it makes no sense for it to be so, since Euler's equation is using $i\sin(x)$ - clearly a different thing...
Further, the statement :
$$ |\cos(x) + i\sin(x)| = 1$$ is also confusing since ${\cos(x)^2 + i\sin(x)}^2$ is not the same thing as ${\cos(x)^2 + \sin(x)}^2$ and it appears people just "drop" the $i$, which is terribly confusing.
Could someone please explain what am I not understanding? Thanks a bunch!

Using the identities:
$$\begin{aligned}
f(t) 
&= \sum_{n=1}^N A \cos(2 \pi t n) + B \sin(2 \pi t n) \\
&= \sum_{n=1}^N \left[A\left(\frac{e^{i 2 \pi t n} + e^{-i 2 \pi t n}}{2} \right) + 
B \left(\frac{e^{i 2 \pi t n} - e^{-i 2 \pi t n}}{2i} \right)\right] \\
&= \sum_{n=1}^N \left[\left(\frac{A}{2}+\frac{B}{2i}\right)e^{i 2 \pi t n} +
\left(\frac{A}{2}-\frac{B}{2i}\right)e^{-i 2 \pi t n}\right] \\
&=\sum_{n=1}^N \left(\frac{A}{2}+\frac{B}{2i}\right)e^{i 2 \pi t n}
+\sum_{n=1}^N \left(\frac{A}{2}-\frac{B}{2i}\right)e^{-i 2 \pi t n} \\
&=\sum_{n=1}^N \left(\frac{A}{2}+\frac{B}{2i}\right)e^{i 2 \pi t n}
+\sum_{n=-N}^{-1} \left(\frac{A}{2}-\frac{B}{2i}\right)e^{i 2 \pi t n}
\end{aligned}$$
So you are right about the fact that there is no single $C$ that fulfills the sum from $-N$ to $N$, unless $A=B=0$. Otherwise, define
$$ 
C_n = 
\begin{cases}
\frac{A}{2}+\frac{B}{2i} \quad \text{if } n>0 \\
0 \qquad ~~~~~~~~\text{if } n=0 \\
\frac{A}{2}-\frac{B}{2i} \quad \text{if } n<0 \\
\end{cases}
$$
and you get something similar.
Regarding $|\cos(x)+i\sin(x)|=1$, note that the square of the modulus of a complex number $z$ is given by $|z|^2=z\bar{z}$, which in this case gives
$$\begin{aligned}
|\cos(x)+i\sin(x)|^2 
&= \left(\cos(x)+i\sin(x)\right) \left(\cos(x)-i\sin(x)\right) \\
&=\cos^2(x) -i^2\sin^2(x) \\
&=\cos^2(x) + \sin^2(x) \\
&=1
\end{aligned}$$
