fourier series by lebesgue integral hw:
anyone knows how to find fourier series over the function
$$
f(x)=
\begin{cases}
1 & \text{if $x$ is irrational}\\
0 & \text{if $x$ is rational}
\end{cases}
$$
by lebesgue integral?
Thank you a lot!
 A: Assuming you meant to define this function on some finite interval, as Lebesgue integrals, $\int f(x)e^{ikx}dx$ and $\int e^{ikx}dx$ are equal since $f(x)=1$ almost everywhere (and therefore $f(x)e^{ixk}=e^{ikx}$ almost everywhere). 
A: First, since you asked for a fourier series expansion, not the fourier transform, you first have to establish that your function is periodic, and then determine it's period. Or at the very least, you'll have to simply pick an interval $[a,b]$, and simply pretend that $f$ corresponds to the periodic extension of $f|_{[a,b]}$ to $\mathbb{R}$.
Luckily, $f$ actually is periodic, since if $x$ is rational exactly if $x+d$ is rational for some rational $d$. You may thus pick any interval $[a,b]$ with $a,b \in \mathbb{Q}$. In the following I picked $[0,1]$ for, um, no reason at all other than us mathematicians love for those numbers. Well that, and it makes the formula slightly simpler.
Then just do the computation. You get $$
  c_n = \int\limits_{[0,1]} f(x) e^{-i2\pi n} \,d\lambda(x)
      = \int\limits_{[0,1] \setminus \mathbb{Q}} e^{-i2\pi n} \,d\lambda(x)
      \overset{\lambda(\mathbb{Q})=0}= \int\limits_{[0,1]} e^{-i2\pi n} \,d\lambda(x)
      = \begin{cases}
        1 &\text{if $n=0$} \\
        0 &\text{otherwise.}
      \end{cases}
$$
This if course is the same as the fourier series for the constant function $1$ on $[0,1]$. Had you asked for the fourier transform instead, the answer would depend on whether you're interested in a function or in a distribution as a result.
In the former case, the answer is that the fourier transform doesn't exist. For the fourier transform to exist, $\int_{\mathbb{R}} |f|\,d\lambda$ needs to exist, and in your case it doesn't.
In the latter case, then the result of the fourier transform of $f$ does exist as a distribution, in particular it's the distribution $\Delta_0 = g \to g(0)$. Or, if you want, the measure $\mu_0$ with $\mu_0(A) = 1$ exactly if $0 \in A$.
It still holds for all of these cases that there's no difference between asking for the fourier transform of $f$ and that of the constant function $1$.
