Fourier series of $\cos(\pi w x)$

97 Views Asked by At

Let $w\notin \mathbb{Z}$, calculate the fourier series of $f:[-1,1]\rightarrow \mathbb{R}$, $f(x) = \cos(\pi wx)$ where the period is $2$.


My attempt:

Previously, I have calculated the coefficients for a function $f^*:\mathbb{R}\rightarrow\mathbb{R}$ with period $L$: $$f^*(x)\sim a_0+\sum_{n=1}^{\infty} (a_n \cos(\frac{2\pi nx}{L})+b_n\sin(\frac{2\pi nx}{L}))$$ which are \begin{align*} &a_n = \frac{2}{L}\int^{\frac{2}{L}}_{-\frac{2}{L}} f^*(x)\cos(\frac{2\pi nx}{L})dx\\ &b_n = \frac{2}{L}\int^{\frac{2}{L}}_{-\frac{2}{L}} f^*(x)\sin(\frac{2\pi nx}{L})dx \end{align*}

So I think I can look at $f(x)=\cos(\frac{\pi w x}{2})$ since the period is $2$, right? I also know that $\cos$ is an even function, so $b_n = 0$ $\forall n$

Therefore, \begin{align*} f(x)\sim a_0+\sum_{n=1}^{\infty} (a_n \cos(\frac{2\pi nx}{2})+b_n\sin(\frac{2\pi nx}{2})) \end{align*} with coefficients \begin{align*} &a_n = \int^{1}_{-1} \cos(\pi w x)\cos(\pi nx)dx\\ &b_n = 0 \end{align*} $$\Rightarrow \quad f(x)\sim \sum_{n=1}^{\infty} (\int^{1}_{-1} \cos(\pi w y)\cos(\pi ny)dy)\cdot \cos(\pi nx)$$

Is this correct? Can/should I simplify further?

EDIT: I used $\cos(x)\cos(y)=\frac{1}{2} (\cos(x+y)+\cos(x-y))$ and can simplify further:

$$\Rightarrow \quad f(x)\sim \sum_{n=1}^{\infty} (\frac{\sin(\pi (n-w))}{\pi (n-w)}+\frac{sin(\pi(n+w))}{\pi(n+w)})\cdot \cos(\pi nx)$$