# Finding the Fourier coefficients of this function

I need help finding the Fourier coefficients of:

$f(x) =\begin{cases} \sum_{n=0}^\infty{\frac{e^{inx}}{1+n^2}} & \text{if } x\neq 2k\pi \\0& \text{if } x= 2k\pi \end{cases}$

And my main problem is that I know how to find the coefficients for each case separately, but how do I reach a final answer for the whole function?

-
The answer is before your eyes. – Christian Blatter Aug 29 '12 at 13:10
yes i know that it is already in the form of it's Fourier series for $x\neq 2k\pi$ but, as i originally stated, my problem is how to show that the coefficients are $\frac{1}{1+n^2}$ for the entire function $f$. – JohnnyE. Aug 29 '12 at 13:21

According to Mathematica $$\sum_{n=0}^\infty{1\over 1+n^2}={1+\pi\,{\rm coth}(\pi)\over2}\doteq 2.07667\ne0\ .$$ Therefore your function $f$ differs from the function $$g(x):=\sum_{n=0}^\infty {e^{inx}\over 1+n^2}$$ only at the points $x=2k\pi$, $\ k\in{\mathbb Z}$. It follows that $f$ has the same Fourier coefficients as $g$, namely $$c_n=\cases{{1\over 1+n^2}\quad&(n\geq0) \cr 0&(n<0)\cr}\quad .$$

-

The fourier coefficients of a function depend only on its class in $L^2([0,2\pi])$ so you can think of $f$ to be the series $\sum_{n\geq 0} \dfrac{e^{inx}}{1+n^2}$ since they differ only on the set (of null Lebesgue measure) $2\pi\mathbb Z$.

If you don't really know much about Lebesgue theory, you want to compute the fourier coefficients in terms of the integrals : $c_n(f)=\frac{1}{2\pi}\int_{0}^{2\pi} f(t)e^{-inx}dx$. However you should know that the integral of a function doen't change if you modify its values in a finite number of points.

So the two integrals, with $f$ or with the series, are exactly the same : $c_n(f)=c_n(x\mapsto \sum_{n\geq 0} \frac{e^{inx}}{1+n^2})$.

-
Lebesgue's theory wasn't part of the silabus of this course (although i am personally familiar with it from other courses i took), so i am not allowed to use it here. Also, there are infinitely many points where $x= 2k\pi$, perhaps you meant it is not a finite but a countable set? in any case i was hoping for a more direct approach using Fourier's formula for 2π-periodic functions using sines and cosines (if possible). – JohnnyE. Aug 29 '12 at 13:14
I mean, the function $f$ is clearly $2\pi$-periodic, so information about Fourier coefficients really comes from its restriction to any subset of the form $I_a:=[a,a+2\pi]$. On such a set $f$ differs from $g(x)=\sum_{n\geq 0} \dfrac{e^{inx}}{1+n^2}$ in only two points hence for any continuous function $h:[0,2\pi] \rightarrow \mathbb C$, $\int_0^{2\pi} f(x)h(x)dx= \int_0^{2\pi} g(x)h(x)dx$. It clearly implies that $f$ and $g$ have the same Fourier coefficients and you can see that your question really comes from a construction of the Riemann Integral instead of Fourier formulae. – Bebop Aug 29 '12 at 16:01