Fourier's trick: example of simple way of finding the Fourier coefficients

1.3k Views Asked by At

I have searched a couple of similar threads here on StackExchange but they do not provide the answer to this particular question I want to ask. It is just a simple matter of finding Fourier coefficients when they are inside a sum.

$$ \begin{equation}\sum_{k=0}^{\infty}\hat{u}_{k}(0)\cos(kx)=\sin(x) \end{equation} $$

How do I obtain $\hat{u}_{k}(0)$? I know that $\cos(kx)$ has a period of $T=2\pi/k$, and if I compare to $\cos(\frac{k\pi x}{a})$ I can identify that $a=\pi$ (I remember this from a Fourier analysis course I took before). Does this mean that

$$ \hat{u}_{k}(0)=\frac{1}{\pi}\int_{0}^{\pi}\cos(kx)\sin(x)dx\;? $$

If not, how do I come up with the right answer? (This was just some formula I had written down in my lecture notes long ago, alas no explanation!)

\ Best regards

1

There are 1 best solutions below

0
On BEST ANSWER

The functions $\{\cos(kx)\}_{k=0}^{\infty}$ are mutually orthogonal on $[0,\pi]$ with respect to the integral $$ \langle f,g\rangle = \int_0^{\pi}f(x)g(x)dx. $$ So, if you know that $$ h(x) = a_0 + a_1\cos(x)+a_2\cos(2x)+\cdots, $$ then Fourier's trick is to multiply both sides by of the functions, say $\cos(kx)$ and integrate over $[0,\pi]$ in order to obtain an explicit expression for the constants $a_k$ in terms of integrals: $$ \int_0^\pi h(x)\cos(kx)dx = \int_0^\pi a_k\cos^2(kx)dx \\ a_k = \frac{\int_0^\pi h(x)\cos(kx)dx}{\int_0^{\pi}\cos^2(kx)dx} $$