1

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?

Guy Fsone
  • 23,903
frostpad
  • 235

3 Answers3

1

Using the addition angle formula $\sin(x+y)=\sin(x)\cos(y)+\cos(x)\sin(y)$ reveals

$$\begin{align} \sin(\pi/2-n\pi/2)&=\underbrace{\sin(\pi/2)}_{=1}\,\cos(n\pi/2)-\underbrace{\cos(\pi/2)}_{=0}\sin(n\pi/2)\\\\ &=\cos(n\pi/2)\\\\ &=\begin{cases} 0&,n\,\text{odd}\\\\ 1&,n=4m\\\\ -1&,n=2(2m-1) \end{cases} \end{align}$$

Mark Viola
  • 179,405
  • It seems silly to me to use the angle sum formula when the identity $\cos(x) = \sin(\pi/2 - x)$ is blatantly clear from the definitions of sine and cosine as ratios in a right triangle. (And cosine literally means the sine of the complementary angle...) – Alex Provost Jan 23 '18 at 18:00
0

Try various values of $n$ (Let $\sin(\pi/2+n\pi/2):=s$): $$n=0\to s=\sin(\pi/2)=1 \\n=1\to s=\sin(\pi)=0 \\n=2\to s=\sin(3\pi/2)=-1 \\n=3\to s=\sin(2\pi)=0$$ This looks like $$s=\begin{cases}1&n=0,4,8,...\\-1&n=2,6,10,...\\0&n\text{ is odd}\end{cases}$$ fow which the formula would be $$s=\begin{cases}(-1)^{n/2}& n\text{ even}\\0& n\text{ odd}\end{cases}$$

John Doe
  • 14,545
0

if $$n =2p\implies \sin(\pi/2-n*\pi/2)= \cos(n\pi/2) = \cos(p\pi)= (-1)^{p}=(-1)^{\frac n2}$$ $$n =2p+1\implies \sin(\pi/2-n*\pi/2)= \cos(n\pi/2) = \cos(p\pi +\pi/2)= \sin(p\pi)= 0$$

Guy Fsone
  • 23,903