This is the Fourier Series representation for a periodic function with period 2p, given in my lecture note.
$\dfrac{a_0}{2} + \sum_{n=1}^{\infty}(a_n cos(\dfrac{n\pi t}{p})+b_nsin(\dfrac{n\pi t}{p}))$
with the coefficients
$a_0 = \dfrac{1}{p} \int_c^{c+2p} f(t) dt$
$a_n = \dfrac{1}{p} \int_c^{c+2p} f(t) cos(\dfrac{n\pi t}{p})dt$
$b_n = \dfrac{1}{p} \int_c^{c+2p} f(t) sin(\dfrac{n\pi t}{p})dt$
From my understding, if the given function is even, there will be only $cosine$ term in the series, thus $b_n = 0$. But if the function is odd, there will only be $sine$ term in the series which means $a_0$ and $a_n$ are $0$.
By applying the above method, I can only find just the necessary coefficients and avoid finding all unless the function is neither odd nor even.
So, basically, what I understood was, if the function is odd, then it can be represented by the Fourier Sine Series and Cosine Series if it is even (correct me if i am wrong).
Everything was clear until I came across this following definition for Odd function:
If $f(t)$ is an odd function defined on the inverval $-p\leq t\leq p$ with a period of 2p then
$f(t) = \sum_{n=1}^{\infty}b_n sin(\dfrac{n\pi t}{p})$
with coefficient of
$b_n = \dfrac{2}{p}\int_0^p f(t) sin(\dfrac{n\pi t}{p})dt$
Looks like it is only integrating from 0 to p (half of period) and multiply by 2 which result in having $\dfrac{2}{p}$ instead of $\dfrac{1}{p}$ like the previous definition.
But I don't think we can simply multiply by 2 after integrating from 0 to p as the area of positive region times 2 is not equal to the area of positive region plus area of negative region.
Now I am confused between whether to use $\dfrac{1}{p}$ or $\dfrac{2}{p}$ while finding coefficients.If both are correct then when do i use the each of them?