Fourier series for $f(t)=\cos(t)$.

169 Views Asked by At

I would like to compute the Fourier series for the following function:

$f:\left[-\pi,\pi\right]\to \mathbb{R}$, $f(t)=\cos(t)$.

So:

$$a_{0}=\frac{1}{2\pi}\int^{\pi}_{-\pi}{\cos(t)dt}=0$$

$$a_{n}=\int^{\pi}_{-\pi}{\cos(t)\cos(nt)}dt=-\frac{2n\sin(\pi n)}{n^2-1}=0$$

$$b_{n}=\int^{\pi}_{-\pi}{\cos(t)\sin(nt)}dt=0$$

It seems that everything is $0$. I'm sure that something is wrong.

Please, tell me where the mistake is.

2

There are 2 best solutions below

2
On

$a_1$ should be non-zero (the rest are indeed 0). This is because $\cos(t)=\cos(t)$; it requires only one basis vector to be expressed. Check your work for $a_1$ (the formula you have is undefined for $n=1$).

0
On

Note that

$$\int_{-\pi}^{\pi}\cos(t)\cos(t)\ \text{d}t = \pi$$

Hence

$$a_1 = \pi$$

Whilst

$$a_{n\neq 1} = 0$$

In addition to that:

$$\lim_{n\to 1}-\frac{2n\sin(n\pi)}{n^2 - 1} = \lim_{n\to 1} -\frac{2\sin(\pi n) + 2n\pi\cos(\pi n)}{2n} = \lim_{n\to 1}- \frac{\pi\cos(\pi)}{1} = -\frac{-\pi}{1} = \pi$$

Thanks to the Hopital rule.

Also, by definition, the Fourier series of $\cos(t)$ must be $\cos(t)$.