I'm having huge trouble with figuring out fourier series as soon as I'm not dealing with a really simple function.
I found a solution to my problem (fourier series for $|cos(x)|$, I'm troubled by the result in line (4) here if anyone has the time to check it out; Fourier Series for $|\cos(x)|$), but there's a part I simply can't understand.
I see that $cos(\pi*n)$ is represented as $(-1)^n$, which is pretty clear.
How about $sin(\pi/2+n*\pi/2$)? I thought it was exactly the same as $-cos(n*\pi/2)$ which would then be... $(-1)^{2n+1}$ ? I thought it was correct but my end result isn't correct.
Could anyone please explain what all of this means? When do I use n and when do I use 2n+1?