# Finding Area to integrate

I am having trouble figuring out where to integrate. The question asks to find the exponential Fourier series coefficients of a signal given: From the signal, I know that the period is $8$, thus $\omega_0=\pi/4$

I know the definition is $X_k=(1/T)∫x(t)e^{−jkω0t}dt$

My question is from where do I integrate. Originally, I integrated from $-5$ to $-3$ and $-1$ to $1$, because that when the unit function is not zero; however, my answer did not come out as clean as I wished

My answer was $(1/2jk)(e^{kj3\pi/4} - e^{kj5\pi/4}) + (\sin(k\pi/4))/\pi k$ • Why would you expect the answer to be simpler ? – Yves Daoust Jun 6 '16 at 8:10

Since the function $x(t)$ has even symmetry about $t=0$ it seems most natural to use an interval symmetric about the origin. Clearly $X_0=0$, and for $k\ne0$, \begin{align}X_k&=\frac18\int_{-4}^4x(t)e^{-jk\omega_0t}dt=\frac18\left[\int_{-4}^{-3}-e^{-jk\omega_0t}dt+\int_{-1}^1e^{-jk\omega_0t}dt+\int_3^4-e^{-jk\omega_0t}dt\right]\\ &=\frac1{-8jk\omega_0}\left[\left.-e^{-jk\omega_0t}\right|_{-4}^{-3}+\left.e^{-jk\omega_0t}\right|_{-1}^1\left.-e^{-jk\omega_0t}\right|_3^4\right]\\ &=\frac1{-2jk\pi}\left[-e^{jk3\pi/4}+e^{jk\pi}+e^{-jk\pi/4}-e^{jk\pi/4}-e^{-jk\pi}+e^{-jk3\pi/4}\right]\\ &=\frac1{k\pi}\left[\sin\frac{3k\pi}4-\sin k\pi+\sin\frac{k\pi}4\right]=\frac2{k\pi}\sin\frac{k\pi}2\cos\frac{k\pi}4\end{align} So the symmetry $X_k=X_{-k}$ is evident, and also it can be seen that $X_{2k}=0$. The power in $X_3+X_{-3}$ is, let's see I forget the normalization, something like $$2\left(\frac{2}{3\pi}\right)^2\left(-\frac{1}{\sqrt2}\right)^2=\frac{4}{9\pi^2}$$