We will do many examples today to get intuition for what's Fourier transform is doing.
Let $N$ be a positive integer.
Let 'x-space' be $V_x = \Z/ N \Z = \{0,1, \cdots, N-1\}$, and then (rescaled) 'p-space' is also $V_p = \Z / N\Z$, then we can build the Fourier transformation kernel $$ K(x,p) = e^{2\pi i (x p / N)} : V_x \times V_p \to U(1) $$ where $U(1)$ is the unit circle in complex number.
The kernel satisfies the orthonormal condition in both x and p variable. $$ \frac{1}{N} \sum_{x \in V_x} K(x,p_1) \overline{K(x,p_2)} = \delta(p_1, p_2) $$ $$ \frac{1}{N} \sum_{p \in V_p} K(x_1,p) \overline{K(x_2,p)} = \delta(x_1, x_2) $$
Given a function $f(x): V_x \to \C$, we can expand it as $$ f(x) = \sum_{p \in V_p} K(x,p) F(p) $$ for some function $F(p): V_p \to \C$. Using the orthonormal condition, we get, for any $q \in V_p$, we have $$ (1/N) \sum_{x \in V_x} f(x) \overline{K(x,q)} = (1/N) \sum_{x \in V_x} \sum_{p \in V_p} K(x,p) F(p) \overline{K(x,q)} = F(q). $$ that is $$ F(q) = (1/N) \sum_{x \in V_x} f(x) \overline{K(x,q)}. $$
Let $Fun(V_x, \C)$ be the space of functions from $V_x$ to $\C$. Similarly define $Fun(V_p, \C)$. Concretely $Fun(V_x, \C) = \C^N$ and $Fun(V_p, \C) = \C^N$.
Fourier transformation $FT$, sends an element $f(x) \in Fun(V_x,\C)$ to an element $F(p) \in Fun(V_p, \C)$. $FT$ is a linear map.
If we define hermitian inner product on $Fun(V_x,\C)$ as $$ \langle f, g\rangle_x = (1/N) \sum_{x \in V_x} f(x) \overline{g(x)}, $$ and we define hermitian inner product on $Fun(V_p,\C)$ as $$ \langle F, G \rangle_p = \sum_{p \in V_p} F(p) \overline{G(p)}. $$ then we find that Fourier transformation is compatible with the two inner products, namely $$ \langle f, g \rangle_x = \langle F, G \rangle_p, \quad F = FT(f), G = FT(g). $$
A function $f(x)$ is determined by its values $f(0), f(1)$. Similarly for $F(p)$. We have relations $$ F(0) = (1/2) (f(0) + f(1)), \quad F(1) = (1/2) (f(0) - f(1)). $$ So, we can reconstruct $f(x)$ from $F(p)$, by $$ f(0) = F(0) + F(1), \quad f(1) = F(0) - F(1). $$
$1 + (-1) = 0. $ and less obviously $1 + e^{2\pi i / 3} + e^{2\pi i (2/3)} = 0$ more generally $$ \sum_{j=0}^{N-1} e^{2\pi i (j/N)} = 0 $$
How to see this? You can say, this is the sum of all the $N$-th roots of unity, and we have $$ z^N - 1 = \prod_{j=0}^{N-1} ( z - e^{2\pi i (j/N)}). $$ hence by looking at the coefficient of $z^{N-1}$, we see the sum of all the roots is 0.
Or, draw these roots as vectors on the complex plane, they show up as evenly distributed on the unit circle, since the summands are invariant under rotation by $2\pi/N$, hence the result is invariant under such a rotation. And the only possible number is 0.
try it yourself.
Due on Monday (Oct 9th)
1. Find the Fourier transformation of the following function. $$ f(x) = \begin{cases} 1 & 0<x<1 \cr 0 & \text{else} \end{cases} $$
2. Find the Fourier transformation of the following function. $$ f(x) = \begin{cases} 1+x & -1<x<0 \cr 1-x & 0<x<1 \cr 0 & \text{else} \end{cases} $$
3. Let $f(x) = a / (x - i) + b / (x+i) + c / (x - 5i)$ for some complex numbers $a,b, c$.
4. Compute the inverse Fourier transform for $$ F(p) = \pi e^{-|p|} $$ you should get back $f(x) = 1/(1+x^2)$.
(my convention is $f(x) = \frac{1}{2\pi} \int F(p) e^{ipx} dp. $)
Topics:
Suppose you started from $f(x)$, and did some hard work to get the Fourier transformation $F(p)$. Can you recover $f(x)$ from $F(p)$? Did you lose information when you throw away $f(x)$ and only keep $F(p)$?
If $f(x)$ is continuous and absolutely integrable, we can recover $f(x)$ from $F(p)$ by $$ f(x) = \frac{1}{2\pi} \int_{p \in \R} F(p) e^{ipx} dp $$ The proof of this theorem is beyond the scope of this class. You might be happy to just accept the formal 'rule' that $$ \frac{1}{2\pi} \int_\R e^{ipx - ipy} dp = \delta(x-y). $$ and that $$ f(x) = \int \delta(x-y) f(y) dy $$
We can try some example to see if it works.
If the function $f(x)$ is a periodic function, of period $L$, meaning $f(x) = f(x+L)$, then we cannot do Fourier transform (why?), but instead, we need to do Fourier series.
We are not going to use all $e^{ipx}$ for all $p$, but only those that satisfies $e^{ipx} = e^{ip(x+L)}$ have the same periodicity. Which mean $p$ needs to satisfy $$ p = (2\pi / L) n$$ for some integer $n$.
So, we define $$ e_n(x) = e^{i(2\pi/L) n x}. $$ We define the Fourer series coefficient as $$ c_n = \frac{1}{L} \int_{0}^L f(x) \overline{e_n(x)} dx $$
Given these coefficient $c_n$, can we recover $f(x)$? Yes, under some smoothness condition of $f(x)$, we have $$ f(x) = \sum_{n \in \Z} c_n e_n(x). $$
What's coming in the second part of this course?
When we solve equation of the form $$ \frac{df(x)}{dx} = \lambda f(x), $$ the general soluition is $$ f(x) = c e^{\lambda x}. $$ We say $e^{\lambda x}$ is an eigenfunction for the operator $d/dx$ with eigenvalue $\lambda$, here $\lambda$ can be any complex number.
If you give me a function $f(x)$, we can try to write it as a linear combination of these easy to understand pieces $e^{\lambda x}$. Say $$ f(x) = \int_{C} c(\lambda) e^{\lambda x} d\lambda $$ The benefit for doing this? If a differential operator $d/dx$ walk to it, we would have $$ (d/dx) f(x) = \int_{\lambda} c(\lambda) (d/dx) e^{\lambda x} d\lambda = \int_{\lambda} c(\lambda) \lambda e^{\lambda x} d\lambda. $$ Of course, you would immediately complain:
Let's keep these questions in our head, we will return to those.
So, what is Fourier transformation? If you go on wiki, or open some textbook, you see the following definition: given a function $f(x)$ (with some condition on it), we can define $$ F(p) := \int_{x \in \R} f(x) e^{-ipx} dx. $$ This is called the Fourier transformation.
Let's throw in some input and see what we get.
$$ f(x) = \cosh(x) = (e^{x} + e^{-x} )/2. $$ This function grows to infinity when $x \to \pm \infty$, indeed, when $x \to +\infty$, $e^x$ dominate, and $x \to -\infty$ we have $e^{-x}$ dominate. Either way, you blow up. Good luck when integrating $\int_\R f(x) dx$.
But, let's try to do the Fourier transformation anyway. We get $$ F(p) = \int_x f(x) e^{-ipx} dx = (1/2) \int_\R e^{(1-ip)x} dx + (1/2) \int_\R e^{(-1-ip)x} dx. $$ OK, we cannot continue.
$f(x)$ need to have sufficient 'decay' near infinity for the Fourier transformation to make sense. More precisely, a sufficient condition is that $f(x)$ is 'absolutely integrable', which means $$ \int_\R |f(x)|dx < \infty. $$ Given this condition, we know $$ |F(p)| = | \int_\R e^{-ipx} f(x) dx | \leq \int_\R |e^{-ipx} f(x)| dx = \int_\R |f(x)| dx < \infty. $$ so we are safe.
The Gaussian. $f(x) = e^{-x^2}. $ It decays pretty nicely in both directions.
Since we learned our lesson, we need to do a check first $$ \int_\R e^{-x^2} dx = \sqrt{\pi}. $$ Great, it is finite.
Now, let's Fourier transform. $$ F(p) = \int e^{-ipx - x^2} dx = \int_\R e^{- (x-ip/2)^2 - p^2/4} dx = e^{-p^2/4} \int_{u \in -ip/2+\R} e^{-u^2} du $$ where we used the new variable $u = -ip/2+x$.
We can move the contour for $u$ as long as the integral is convergent. Recall from last Wednesday's lecture, $e^{-u^2}$ decays fast to $0$ when $|u| \to \infty$ in the sectors $\arg(u) \in (-\pi/4, \pi/4)$ and $\arg(u) \in \pi + (-\pi/4, \pi/4)$. So, we are going to move the integration contour of $u$ from the shifted real line $-ip/2+\R$ back to $\R$. We get $$ \int_{u \in -ip/2+\R} e^{-u^2} du = \int_{u \in \R} e^{-u^2} du = \sqrt{\pi}.$$ Thus, we get $$ F(p) = \sqrt{\pi} e^{-p^2/4}.$$
Success!
Let $f(x) = 1/(1+x^2)$. Let's check that $f(x)$ is absolutely integrable first $$ \int_\R f(x) dx = \int_{C_R} f(z) dz = 2\pi i Res_{z=i} f(z) = 2\pi i \frac{1}{2i } = \pi. $$ where $C_{+,R}$ is the contour consist of two part
Equivalently, we can choose a different contour $C_{-,R}$, which also consist of two part
Note that when we go around $C_{-,R}$ it goes around the singularity of $f(z)$ at $z=-i$ in the 'negative' (clockwise) direction, hence we get $$ \int_{C_{-,R}} f(z) dz = (-2\pi i) Res_{z=-i} f(z) = -2\pi i \frac{1}{-2i} = \pi. $$ Whew! the two minus sign cancels, we get the same answer.
Now, let's compute the little variation $$ F(p) = \int_\R e^{-ipx} f(x) dx. $$ We first take the 'truncation' approximation, which recovers the original limit under the limit $R \to \infty$. $$ F(p) = \lim_{R \to \infty} \int_{-R}^R e^{-ipx} f(x) dx. $$ Then, we try to 'close the contour', by connecting the point $R$ to $-R$ along some way. Due to this exponential factor $e^{-ipz}$, it matters whether we close the contour in the upper half-plane, or the lower one. Indeed, we have $$ |e^{-ipz}| = e^{Re(-ip(x+iy))} = e^{Re(-ipx + py)} = e^{py} = e^{p Im(z)}. $$ So,
Thus, for $p \geq 0$, we can complete the by the lower-half-semicircle $C_{-,R}$. We get $$ (p\geq 0) F(p) = \int_{C_{-,R}} \frac{e^{-ipz}}{1+z^2} dz = (-2\pi i) Res_{z=-i} \frac{e^{-ipz}}{1+z^2} = \pi e^{-p}. $$ Similarly, for $p \geq 0$, we get $$ (p\leq 0) F(p) = \int_{C_{+,R}} \frac{e^{-ipz}}{1+z^2} dz = (2\pi i) Res_{z=i} \frac{e^{-ipz}}{1+z^2} = \pi e^{p}. $$ We can write the result in a cool way as $$ F(p) = \pi e^{-|p|}. $$ So when $|p| \to \infty$, we see $F(p) \to 0$ very quickly.
warm up:Does the function $f(x)=1$ admits Fourier transformation? Why? How about $f(x) = 1 / (1+|x|)$?
Find the Fourier transformation of the following functions. $$ f(x) = \begin{cases} 1 & 0<x<1 \cr 0 & \text{else} \end{cases} $$
$$ f(x) = \begin{cases} 1+x & -1<x<0 \cr 1-x & 0<x<1 \cr 0 & \text{else} \end{cases} $$
We will do many examples today to get intuition for what's Fourier transform is doing.
Let $N$ be a positive integer.
Let 'x-space' be $V_x = \Z/ N \Z = \{0,1, \cdots, N-1\}$, and then (rescaled) 'p-space' is also $V_p = \Z / N\Z$, then we can build the Fourier transformation kernel $$ K(x,p) = e^{2\pi i (x p / N)} : V_x \times V_p \to U(1) $$ where $U(1)$ is the unit circle in complex number.
The kernel satisfies the orthonormal condition in both x and p variable. $$ \frac{1}{N} \sum_{x \in V_x} K(x,p_1) \overline{K(x,p_2)} = \delta(p_1, p_2) $$ $$ \frac{1}{N} \sum_{p \in V_p} K(x_1,p) \overline{K(x_2,p)} = \delta(x_1, x_2) $$
Given a function $f(x): V_x \to \C$, we can expand it as $$ f(x) = \sum_{p \in V_p} K(x,p) F(p) $$ for some function $F(p): V_p \to \C$. Using the orthonormal condition, we get, for any $q \in V_p$, we have $$ (1/N) \sum_{x \in V_x} f(x) \overline{K(x,q)} = (1/N) \sum_{x \in V_x} \sum_{p \in V_p} K(x,p) F(p) \overline{K(x,q)} = F(q). $$ that is $$ F(q) = (1/N) \sum_{x \in V_x} f(x) \overline{K(x,q)}. $$
Let $Fun(V_x, \C)$ be the space of functions from $V_x$ to $\C$. Similarly define $Fun(V_p, \C)$. Concretely $Fun(V_x, \C) = \C^N$ and $Fun(V_p, \C) = \C^N$.
Fourier transformation $FT$, sends an element $f(x) \in Fun(V_x,\C)$ to an element $F(p) \in Fun(V_p, \C)$. $FT$ is a linear map.
If we define hermitian inner product on $Fun(V_x,\C)$ as $$ \langle f, g\rangle_x = (1/N) \sum_{x \in V_x} f(x) \overline{g(x)}, $$ and we define hermitian inner product on $Fun(V_p,\C)$ as $$ \langle F, G \rangle_p = \sum_{p \in V_p} F(p) \overline{G(p)}. $$ then we find that Fourier transformation is compatible with the two inner products, namely $$ \langle f, g \rangle_x = \langle F, G \rangle_p, \quad F = FT(f), G = FT(g). $$
A function $f(x)$ is determined by its values $f(0), f(1)$. Similarly for $F(p)$. We have relations $$ F(0) = (1/2) (f(0) + f(1)), \quad F(1) = (1/2) (f(0) - f(1)). $$ So, we can reconstruct $f(x)$ from $F(p)$, by $$ f(0) = F(0) + F(1), \quad f(1) = F(0) - F(1). $$
$1 + (-1) = 0. $ and less obviously $1 + e^{2\pi i / 3} + e^{2\pi i (2/3)} = 0$ more generally $$ \sum_{j=0}^{N-1} e^{2\pi i (j/N)} = 0 $$
How to see this? You can say, this is the sum of all the $N$-th roots of unity, and we have $$ z^N - 1 = \prod_{j=0}^{N-1} ( z - e^{2\pi i (j/N)}). $$ hence by looking at the coefficient of $z^{N-1}$, we see the sum of all the roots is 0.
Or, draw these roots as vectors on the complex plane, they show up as evenly distributed on the unit circle, since the summands are invariant under rotation by $2\pi/N$, hence the result is invariant under such a rotation. And the only possible number is 0.
try it yourself.
Due on Monday (Oct 9th)
1. Find the Fourier transformation of the following function. $$ f(x) = \begin{cases} 1 & 0<x<1 \cr 0 & \text{else} \end{cases} $$
2. Find the Fourier transformation of the following function. $$ f(x) = \begin{cases} 1+x & -1<x<0 \cr 1-x & 0<x<1 \cr 0 & \text{else} \end{cases} $$
3. Let $f(x) = a / (x - i) + b / (x+i) + c / (x - 5i)$ for some complex numbers $a,b, c$.
4. Compute the inverse Fourier transform for $$ F(p) = \pi e^{-|p|} $$ you should get back $f(x) = 1/(1+x^2)$.
(my convention is $f(x) = \frac{1}{2\pi} \int F(p) e^{ipx} dp. $)
Topics:
Suppose you started from $f(x)$, and did some hard work to get the Fourier transformation $F(p)$. Can you recover $f(x)$ from $F(p)$? Did you lose information when you throw away $f(x)$ and only keep $F(p)$?
If $f(x)$ is continuous and absolutely integrable, we can recover $f(x)$ from $F(p)$ by $$ f(x) = \frac{1}{2\pi} \int_{p \in \R} F(p) e^{ipx} dp $$ The proof of this theorem is beyond the scope of this class. You might be happy to just accept the formal 'rule' that $$ \frac{1}{2\pi} \int_\R e^{ipx - ipy} dp = \delta(x-y). $$ and that $$ f(x) = \int \delta(x-y) f(y) dy $$
We can try some example to see if it works.
If the function $f(x)$ is a periodic function, of period $L$, meaning $f(x) = f(x+L)$, then we cannot do Fourier transform (why?), but instead, we need to do Fourier series.
We are not going to use all $e^{ipx}$ for all $p$, but only those that satisfies $e^{ipx} = e^{ip(x+L)}$ have the same periodicity. Which mean $p$ needs to satisfy $$ p = (2\pi / L) n$$ for some integer $n$.
So, we define $$ e_n(x) = e^{i(2\pi/L) n x}. $$ We define the Fourer series coefficient as $$ c_n = \frac{1}{L} \int_{0}^L f(x) \overline{e_n(x)} dx $$
Given these coefficient $c_n$, can we recover $f(x)$? Yes, under some smoothness condition of $f(x)$, we have $$ f(x) = \sum_{n \in \Z} c_n e_n(x). $$
What's coming in the second part of this course?
When we solve equation of the form $$ \frac{df(x)}{dx} = \lambda f(x), $$ the general soluition is $$ f(x) = c e^{\lambda x}. $$ We say $e^{\lambda x}$ is an eigenfunction for the operator $d/dx$ with eigenvalue $\lambda$, here $\lambda$ can be any complex number.
If you give me a function $f(x)$, we can try to write it as a linear combination of these easy to understand pieces $e^{\lambda x}$. Say $$ f(x) = \int_{C} c(\lambda) e^{\lambda x} d\lambda $$ The benefit for doing this? If a differential operator $d/dx$ walk to it, we would have $$ (d/dx) f(x) = \int_{\lambda} c(\lambda) (d/dx) e^{\lambda x} d\lambda = \int_{\lambda} c(\lambda) \lambda e^{\lambda x} d\lambda. $$ Of course, you would immediately complain:
Let's keep these questions in our head, we will return to those.
So, what is Fourier transformation? If you go on wiki, or open some textbook, you see the following definition: given a function $f(x)$ (with some condition on it), we can define $$ F(p) := \int_{x \in \R} f(x) e^{-ipx} dx. $$ This is called the Fourier transformation.
Let's throw in some input and see what we get.
$$ f(x) = \cosh(x) = (e^{x} + e^{-x} )/2. $$ This function grows to infinity when $x \to \pm \infty$, indeed, when $x \to +\infty$, $e^x$ dominate, and $x \to -\infty$ we have $e^{-x}$ dominate. Either way, you blow up. Good luck when integrating $\int_\R f(x) dx$.
But, let's try to do the Fourier transformation anyway. We get $$ F(p) = \int_x f(x) e^{-ipx} dx = (1/2) \int_\R e^{(1-ip)x} dx + (1/2) \int_\R e^{(-1-ip)x} dx. $$ OK, we cannot continue.
$f(x)$ need to have sufficient 'decay' near infinity for the Fourier transformation to make sense. More precisely, a sufficient condition is that $f(x)$ is 'absolutely integrable', which means $$ \int_\R |f(x)|dx < \infty. $$ Given this condition, we know $$ |F(p)| = | \int_\R e^{-ipx} f(x) dx | \leq \int_\R |e^{-ipx} f(x)| dx = \int_\R |f(x)| dx < \infty. $$ so we are safe.
The Gaussian. $f(x) = e^{-x^2}. $ It decays pretty nicely in both directions.
Since we learned our lesson, we need to do a check first $$ \int_\R e^{-x^2} dx = \sqrt{\pi}. $$ Great, it is finite.
Now, let's Fourier transform. $$ F(p) = \int e^{-ipx - x^2} dx = \int_\R e^{- (x-ip/2)^2 - p^2/4} dx = e^{-p^2/4} \int_{u \in -ip/2+\R} e^{-u^2} du $$ where we used the new variable $u = -ip/2+x$.
We can move the contour for $u$ as long as the integral is convergent. Recall from last Wednesday's lecture, $e^{-u^2}$ decays fast to $0$ when $|u| \to \infty$ in the sectors $\arg(u) \in (-\pi/4, \pi/4)$ and $\arg(u) \in \pi + (-\pi/4, \pi/4)$. So, we are going to move the integration contour of $u$ from the shifted real line $-ip/2+\R$ back to $\R$. We get $$ \int_{u \in -ip/2+\R} e^{-u^2} du = \int_{u \in \R} e^{-u^2} du = \sqrt{\pi}.$$ Thus, we get $$ F(p) = \sqrt{\pi} e^{-p^2/4}.$$
Success!
Let $f(x) = 1/(1+x^2)$. Let's check that $f(x)$ is absolutely integrable first $$ \int_\R f(x) dx = \int_{C_R} f(z) dz = 2\pi i Res_{z=i} f(z) = 2\pi i \frac{1}{2i } = \pi. $$ where $C_{+,R}$ is the contour consist of two part
Equivalently, we can choose a different contour $C_{-,R}$, which also consist of two part
Note that when we go around $C_{-,R}$ it goes around the singularity of $f(z)$ at $z=-i$ in the 'negative' (clockwise) direction, hence we get $$ \int_{C_{-,R}} f(z) dz = (-2\pi i) Res_{z=-i} f(z) = -2\pi i \frac{1}{-2i} = \pi. $$ Whew! the two minus sign cancels, we get the same answer.
Now, let's compute the little variation $$ F(p) = \int_\R e^{-ipx} f(x) dx. $$ We first take the 'truncation' approximation, which recovers the original limit under the limit $R \to \infty$. $$ F(p) = \lim_{R \to \infty} \int_{-R}^R e^{-ipx} f(x) dx. $$ Then, we try to 'close the contour', by connecting the point $R$ to $-R$ along some way. Due to this exponential factor $e^{-ipz}$, it matters whether we close the contour in the upper half-plane, or the lower one. Indeed, we have $$ |e^{-ipz}| = e^{Re(-ip(x+iy))} = e^{Re(-ipx + py)} = e^{py} = e^{p Im(z)}. $$ So,
Thus, for $p \geq 0$, we can complete the by the lower-half-semicircle $C_{-,R}$. We get $$ (p\geq 0) F(p) = \int_{C_{-,R}} \frac{e^{-ipz}}{1+z^2} dz = (-2\pi i) Res_{z=-i} \frac{e^{-ipz}}{1+z^2} = \pi e^{-p}. $$ Similarly, for $p \geq 0$, we get $$ (p\leq 0) F(p) = \int_{C_{+,R}} \frac{e^{-ipz}}{1+z^2} dz = (2\pi i) Res_{z=i} \frac{e^{-ipz}}{1+z^2} = \pi e^{p}. $$ We can write the result in a cool way as $$ F(p) = \pi e^{-|p|}. $$ So when $|p| \to \infty$, we see $F(p) \to 0$ very quickly.
warm up:Does the function $f(x)=1$ admits Fourier transformation? Why? How about $f(x) = 1 / (1+|x|)$?
Find the Fourier transformation of the following functions. $$ f(x) = \begin{cases} 1 & 0<x<1 \cr 0 & \text{else} \end{cases} $$
$$ f(x) = \begin{cases} 1+x & -1<x<0 \cr 1-x & 0<x<1 \cr 0 & \text{else} \end{cases} $$