# Finding Fourier coefficients of an orthonormal sequence

I am trying to find the Fourier coefficients of f with respect to the sequence $$\lbrace \phi_k \rbrace_{k=1}^\infty = \lbrace \frac{1}{\sqrt{2 \pi}}, \frac{\cos(x)}{\sqrt{\pi}}, \frac{\sin(x)}{\sqrt{\pi}},..., \frac{\cos(kx)}{\sqrt{\pi}}, \frac{\sin(kx)}{\sqrt{\pi}},... \rbrace$$ I know that $f \in L([-\pi, \pi])$ and $f(x) = x$ where $x \in [-\pi, \pi]$. I know that the Fourier coefficients for an orthonormal sequence in $L^2$ are $c_k = \langle f, \phi_k \rangle$. So using this I can say that $$\langle f, \phi_k \rangle = \int \limits_{-\pi}^\pi f \phi_k$$ I know that when $\phi_k = \frac{\cos(kx)}{\sqrt{\pi}}$ or if $\phi_k = \frac{\sin(kx)}{\sqrt{\pi}}$ then the integral goes to 0. So I am left with $$\int \limits_{-\pi}^\pi \frac{f}{\sqrt{2 \pi}} = \int \limits_{-\pi}^\pi \frac{x}{\sqrt{2 \pi}} = \frac{(\pi^2 - (-\pi)^2)}{2\sqrt{2 \pi}}=0$$ So in other words there are no Fourier coefficients, which I am pretty sure is wrong. I am also supposed to show that $\sum \limits_{k=1}^\infty \frac{1}{k^2} = \frac{\pi^2}{6}$. I know the sequence is complete so then I know that $\sum \limits_{k=1}^\infty c_k=\parallel f\parallel_2^2$. I can solve for $\parallel f\parallel_2^2$ $$\parallel f\parallel_2^2 = \int \limits_{-\pi}^\pi x^2 = \frac{(\pi^3 - (-\pi)^3)}{3}= \frac{2\pi^3}{3}$$ I am clearly doing something wrong, but I can't figure out what. Any ideas?

EDIT: The assumption I made, if $\phi_k = \frac{\cos(kx)}{\sqrt{\pi}}$ or if $\phi_k = \frac{\sin(kx)}{\sqrt{\pi}}$ then the integral goes to 0, was not true. Doing the full integral yields the correct answer.

-
You're right with the edit. They don't all go to 0, but one thing to notice is that $x\phi_k$ for $k$ even is an odd function (since it is an odd function times an even function), so you can immediately conclude that integral is $0$ for $k$ even. This trick is quite useful to remember in the future. – Matt Nov 28 '12 at 17:48

Let $c_k$ be the $k$th Fourier coefficient of $f$. So $c_k = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(t) e^{-ikt} dt$. Since $f(t) = t$, that is $\frac{1}{2\pi} \int_{-\pi}^{\pi} t e^{-ikt} dt$. Integrate by parts to find $c_k$. To find the coefficients in terms of the sequence you gave (sines and cosines), take the real and imaginary parts.
This does not make sense since the definition of Fourier coefficients I am using is $c_k = \langle f, \phi_k \rangle$. Also where did you get $e^{-ikt}$? I don't think that represents the sequence I have. – rioneye Nov 28 '12 at 15:46
$e^{ix} = cos(x) + isin(x)$. I'm using the notation here for brevity. If it confuses you, don't use the complex notation for this sequence. But the idea is the same. The Fourier coefficients are just defined by an integral. Evaluate the integral. The trick is integrating by parts. – anonymous Nov 28 '12 at 19:25
In general, I had the right approach, but I made an in correct assumption. Like I said in the edit, the assumption I made, if $\phi_k = \frac{\cos(kx)}{\sqrt{\pi}}$ or if $\phi_k = \frac{\sin(kx)}{\sqrt{\pi}}$ then the integral goes to 0, was not true. Doing the full integral yields the correct answer.