# Peeter Joot's (OLD) Blog.

• ## Archives peeterjoot on Curious problem using the vari… Tom on Curious problem using the vari… peeterjoot on Cartesian to spherical change… Someone on Cartesian to spherical change… peeterjoot on Cartesian to spherical change…

• 357,350

# Posts Tagged ‘Fourier coefficient’

## Fourier coefficient integral for periodic function

Posted by peeterjoot on November 5, 2013

In phy487 we’ve been using the fact that a periodic function \begin{aligned}V(\mathbf{r}) = V(\mathbf{r} + \mathbf{r}_n),\end{aligned} \hspace{\stretch{1}}(1.1)

where \begin{aligned}\mathbf{r}_n = a_1 \mathbf{a}_1 + a_2 \mathbf{a}_2 + a_3 \mathbf{a}_3,\end{aligned} \hspace{\stretch{1}}(1.2)

has a Fourier representation \begin{aligned}V(\mathbf{r}) = \sum_\mathbf{G} V_\mathbf{G} e^{ i \mathbf{G} \cdot \mathbf{r} }.\end{aligned} \hspace{\stretch{1}}(1.3)

Here $\mathbf{G}$ is a vector in reciprocal space, say \begin{aligned}\mathbf{G}_{rst} = r \mathbf{g}_1 + s \mathbf{g}_2 + t \mathbf{g}_3,\end{aligned} \hspace{\stretch{1}}(1.4)

where \begin{aligned}\mathbf{g}_i \cdot \mathbf{a}_j = 2 \pi \delta_{ij}.\end{aligned} \hspace{\stretch{1}}(1.5)

Now let’s express the explicit form for the Fourier coefficient $V_\mathbf{G}$ so that we can compute the Fourier representation for some periodic potentials for some numerical experimentation. In particular, let’s think about what it meant to integrate over a unit cell. Suppose we have a parameterization of the points in the unit cell \begin{aligned}\mathbf{r} = u \mathbf{a}_1 + v \mathbf{a}_2 + w \mathbf{a}_3,\end{aligned} \hspace{\stretch{1}}(1.6)

as sketched in fig. 1.1. Here $u, v, w \in [0, 1]$. We can compute the values of $u, v, w$ for any vector $\mathbf{r}$ in the cell by reciprocal projection \begin{aligned}\mathbf{r} = \frac{1}{{2 \pi}} \left( \left( \mathbf{r} \cdot \mathbf{g}_1 \right) \mathbf{a}_1 + \left( \mathbf{r} \cdot \mathbf{g}_2 \right) \mathbf{a}_2 + \left( \mathbf{r} \cdot \mathbf{g}_3 \right) \mathbf{a}_3 \right),\end{aligned} \hspace{\stretch{1}}(1.7)

or \begin{aligned}\begin{aligned}u(\mathbf{r}) &= \frac{1}{{2 \pi}} \mathbf{r} \cdot \mathbf{g}_1 \\ v(\mathbf{r}) &= \frac{1}{{2 \pi}} \mathbf{r} \cdot \mathbf{g}_2 \\ w(\mathbf{r}) &= \frac{1}{{2 \pi}} \mathbf{r} \cdot \mathbf{g}_3.\end{aligned}\end{aligned} \hspace{\stretch{1}}(1.8)

Let’s suppose that $\mathbf{V}(\mathbf{r})$ is period in the unit cell spanned by $\mathbf{r} = u \mathbf{a}_1 + v \mathbf{a}_2 + w \mathbf{a}_3$ with $u, v, w \in [0, 1]$, and integrate over the unit cube for that parameterization to compute $V_\mathbf{G}$ \begin{aligned}\int_0^1 du\int_0^1 dv\int_0^1 dwV( u \mathbf{a}_1 + v \mathbf{a}_2 + w \mathbf{a}_3 ) e^{-i \mathbf{G}' \cdot \mathbf{r} }=\sum_{r s t}V_{\mathbf{G}_{r s t}}\int_0^1 du\int_0^1 dv\int_0^1 dwe^{-i \mathbf{G}' \cdot \mathbf{r} }e^{i \mathbf{G} \cdot \mathbf{r} }\end{aligned} \hspace{\stretch{1}}(1.9)

Let’s write \begin{aligned}\begin{aligned}\mathbf{G} &= r \mathbf{g}_1 + s \mathbf{g}_2 + t \mathbf{g}_3 \\ \mathbf{G} &= r' \mathbf{g}_1 + s' \mathbf{g}_2 + t' \mathbf{g}_3,\end{aligned}\end{aligned} \hspace{\stretch{1}}(1.10)

so that \begin{aligned}e^{-i \mathbf{G}' \cdot \mathbf{r} } e^{i \mathbf{G} \cdot \mathbf{r} }=e^{ 2 \pi i (r - r') u } e^{ 2 \pi i (s - s') u } e^{ 2 \pi i (t - t') u } \end{aligned} \hspace{\stretch{1}}(1.11)

Picking the $u$ integral of this integrand as representative, we have when $r = r'$ \begin{aligned}\int_0^1 du e^{ 2 \pi i (r - r') u } =\int_0^1 du= 1,\end{aligned} \hspace{\stretch{1}}(1.12)

and when $r \ne r'$ \begin{aligned}\int_0^1 du e^{ 2 \pi i (r - r') u } ={\left.{{ \frac{ e^{ 2 \pi i (r - r') u } } { 2 \pi i (r - r') }}}\right\vert}_{{u = 0}}^{{1}}=\frac{1}{{2 \pi i (r - r') }} \left( e^{ 2 \pi i (r - r') } - 1 \right).\end{aligned} \hspace{\stretch{1}}(1.13)

This is just zero since $r - r'$ is an integer, so we have \begin{aligned}\int_0^1 du e^{ 2 \pi i (r - r') u } = \delta_{r, r'}.\end{aligned} \hspace{\stretch{1}}(1.14)

This gives us \begin{aligned}\int_0^1 du\int_0^1 dv\int_0^1 dwV( u \mathbf{a}_1 + v \mathbf{a}_2 + w \mathbf{a}_3 ) e^{ -2 \pi i r' u } e^{ -2 \pi i s' v } e^{ -2 \pi i t' w } =\sum_{r s t}V_{\mathbf{G}_{r s t}}\delta_{r s t, r' s' t'}= V_{\mathbf{G}_{r' s' t'}}.\end{aligned} \hspace{\stretch{1}}(1.15)

This is our \textAndIndex{Fourier coefficient}. The \textAndIndex{Fourier series} written out in gory but explicit detail is \begin{aligned}\boxed{V( u \mathbf{a}_1 + v \mathbf{a}_2 + w \mathbf{a}_3 ) = \sum_{r s t}\left( \int_0^1 du' \int_0^1 dv' \int_0^1 dw' V( u' \mathbf{a}_1 + v' \mathbf{a}_2 + w' \mathbf{a}_3 ) e^{ -2 \pi i (r u' + s v' + t w') } \right)e^{ 2 \pi i (r u + s v + t w) }.}\end{aligned} \hspace{\stretch{1}}(1.16)

Also observe the unfortunate detail that we require integrability of the potential in the unit cell for the Fourier integrals to converge. This prohibits the use of the most obvious potential for numerical experimentation, the inverse radial $V(\mathbf{r}) = -1/\left\lvert {\mathbf{r}} \right\rvert$.

## A Fourier series refresher.

Posted by peeterjoot on May 3, 2012

# Motivation.

I’d used the wrong scaling in a Fourier series over a $[0, 1]$ interval. Here’s a reminder to self what the right way to do this is.

# Guts

Suppose we have a function that is defined in terms of a trigonometric Fourier sum \begin{aligned}\phi(x) = \sum c_k e^{i \omega k x},\end{aligned} \hspace{\stretch{1}}(2.1)

where the domain of interest is $x \in [a, b]$. Stating the problem this way avoids any issue of existence. We know $c_k$ exists, but just want to find what they are given some other representation of the function.

Multiplying and integrating over our domain we have \begin{aligned}\begin{aligned}\int_a^b \phi(x) e^{-i \omega m x} dx &= \sum c_k \int_a^b e^{i \omega (k -m) x} dx \\ &= c_m (b - a) + \sum_{k \ne m} \frac{e^{i \omega(k-m) b} - e^{i \omega(k-m)a}}{i \omega (k -m)} .\end{aligned}\end{aligned} \hspace{\stretch{1}}(2.2)

We want all the terms in the sum to be be zero, requiring equality of the exponentials, or \begin{aligned}e^{i \omega (k -m) (b -a )} = 1,\end{aligned} \hspace{\stretch{1}}(2.3)

or \begin{aligned}\omega = \frac{2 \pi}{b - a}.\end{aligned} \hspace{\stretch{1}}(2.4)

This fixes our Fourier coefficients \begin{aligned}c_m = \frac{1}{{b - a}} \int_a^b \phi(x) e^{- 2 \pi i m x/(b - a)} dx.\end{aligned} \hspace{\stretch{1}}(2.5)

Given this, the correct (but unnormalized) Fourier basis for a $[0, 1]$ interval would be the functions $e^{2 \pi i x}$, or the sine and cosine equivalents.