Sum of Fourier Series I need to find the Fourier Series for $f\in \mathcal{C}_{st}$ that is given by

$$f(x)=\begin{cases}0,\quad-\pi<x\le 0\\ \cos(x),\quad0\le x<\pi\end{cases}.$$

in the interval $]-\pi,\pi[$ and give the sum of the series for $x=p\pi,p\in\mathbb{Z}$.
What I know:
If $f(x)=\sum_{n=-\infty}^{\infty}\alpha_ne^{inx}$ on $[-\pi,\pi]$, then
$\alpha_n=\frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}dx$.
Questions:
Can I use the above formula (the intervals are different)?
Should I use integration by parts?
To compute the sum, do I just substitute $x=p\pi$ in?

You can use your expression for $\alpha_n$.  In this case, it becomes: 
\begin{align}
\alpha_n&=\frac12\int_{-\pi}^\pi f(x)e^{-inx} dx\\
&=\frac12\int_{-\pi}^\pi\left.\begin{cases}0&-\pi<x\le 0\\ \cos(x)&0\le x<\pi\end{cases}\right\}dx\\
&=\frac12\int_{-\pi}^0 0 dx + \int_0^\pi \cos(x)e^{-inx}dx\\
&=\frac12\int_0^\pi \cos(x)e^{-inx}dx\\
\end{align}
