Sometimes in exercises we are asked to calculate the fourier series of a function. But there are two ways to do that.
If $f:\Bbb R\mapsto\Bbb R$ is $T$-periodic over $\Bbb R$ then what conditions will make you choose one type of coefficients over the other? I'm referring to the choice between calculating $a_n={2\over T}\int\limits_0^Tf(x)\cos({2\pi\over T}nx)dx,\ b_n={2\over T}\int\limits_0^Tf(x)\sin({2\pi\over T}nx)dx\ $ or $\ c_n={1\over T}\int\limits_0^Tf(x)e^{-i{2\pi\over T}nx}$
for a function.
$a_n$ is the cosine series, whilst $b_n$ is the sine series. The use of them depends on whether the function on $\mathbb{R}$ is even or odd:
For complex Fourier coefficient $c_n$, if the function is odd , the Fourier coefficient is purely imaginary (and odd). If the function is even , the Fourier coefficient is purely real (and even). You can apply the integral for coefficient to arbitrary periodic functions on, $\mathbb{R}$ or $\mathbb{C}$.
Note that the sums of them (representations) are different. For complex Fourier series, you have an infinite sum of exponential; for sine and cosine series, you have sums over positive $n$. However, the resultant representations are equivalent. You can check by picking any odd/even functions.
In short, it depends on the questions "In what form do you want the function to be in?" and "Will this simplify calculation?".