Cross post from [Maths stack exchange](https://math.stackexchange.com/questions/4495174/a-difficult-integral-for-the-chern-number?noredirect=1#comment10099463_4495174)




---


The integral
$$
I(m)=\frac{1}{4\pi}\int\_{-\pi}^{\pi}\mathrm{d}x\int\_{-\pi}^\pi\mathrm{d}y\phantom{,} \frac{m\cos(x)\cos(y)-\cos x-\cos y}{\left( \sin^2x+\sin^2y +(m-\cos x-\cos y)^2\right)^{3/2}}
$$
gives the Chern number of a certain vector bundle [1](https://math.stackexchange.com/questions/4495174/a-difficult-integral-for-the-chern-number?noredirect=1#comment10099463_4495174) over a torus. It can be shown using the theory of characteristic classes that
$$
I(m) = \frac{\mathrm{sign}(m-2)+\mathrm{sign}(m+2)}{2}-\mathrm{sign}(m) = \begin{cases}1 & -2< m < 0 \\ -1 & 0 < m < 2 \\0 & \text{otherwise}\end{cases}.
$$
Is there any way to evaluate this integral directly (i.e. without making use of methods from differential geometry) to obtain the above result?


I should mention that the above integral can be written as ($1/4\pi$ times) the solid angle subtended from the origin of the unit vector $\hat{\mathbf{n}}$,
$$
I(m)=\frac{1}{4\pi}\int\_{-\pi}^{\pi}\mathrm{d}x\int\_{-\pi}^\pi\mathrm{d}y\phantom{,} \hat{\mathbf{n}}\cdot\left(\partial\_x \hat{\mathbf{n}}\times \partial\_y \hat{\mathbf{n}}\right),
$$
where $\mathbf{n}(m)=(\sin x, \sin y, m- \cos x-\cos y)$. While this form makes it very straightforward to evaluate $I(m)$, I am interested in whether there is a way to compute this integral using more standard techniques.




---


[1](https://math.stackexchange.com/questions/4495174/a-difficult-integral-for-the-chern-number?noredirect=1#comment10099463_4495174) B. Bernevig *Topological Insulators and Topological Superconductors* Chapter 8



A difficult integral for the Chern number
If Stokes' theorem counts as a standard technique, then here's an answer:


Introduce a "vector potential"
\begin{equation}
A\_i = \frac{1-\hat n\_z}{\hat n\_x^2 + \hat n\_y^2}(\hat n\_x \partial\_i \hat n\_y - \hat n\_y \partial\_i \hat n\_x)\,,\qquad i=x,y\,,
\end{equation}
which is defined everywhere, except where $\hat n\_x^2 + \hat n\_y^2=0$, which is $(x,y)\in\{(0,0),(0,\pi),(\pi,0),(\pi,\pi)\}$ (assuming $-\pi<x,y\leq \pi$). One can check that
\begin{equation}
\Omega(x,y) \equiv \hat{\mathbf{n}}\cdot(\partial\_x \hat{\mathbf{n}} \times \partial\_y \hat{\mathbf{n}}) = \partial\_xA\_y -\partial\_y A\_x = \nabla\times \mathbf{A}\,.
\end{equation}
Now, going back to the integral, since the integrand is periodic, we can move the integration limit, such that the singular points of $\mathbf{A}$ are not at the boundary of the integration region, for instance
\begin{equation}
I(m) = \frac{1}{4\pi}\int\_{-\pi+1}^{\pi+1}\mathrm{d} x \int\_{-\pi+1}^{\pi+1}\mathrm{d} y\, \Omega(x,y)\,.
\end{equation}
We can now exclude small disks centered at the singular points from the intragral and treat them separately:
$$R = [-\pi+1,\pi+1]\times[-\pi+1,\pi+1] \\ = R' \setminus D(0,0,\epsilon)\setminus D(0,\pi,\epsilon)\setminus D(\pi,0,\epsilon)\setminus D(\pi,\pi,\epsilon)$$
where $D(x,y,r)$ is a disk centered at $(x,y)$ with radius $r$, and $0<\epsilon<1$. $R'$ is now a square with 4 holes, and the integral is written as
\begin{align}
I(m) &= \frac{1}{4\pi}\int\_{R'} \mathrm{d} x \mathrm{d} y\, \Omega(x,y)
+
\frac{1}{4\pi}\int\_{D(0,0,\epsilon)} \mathrm{d} x \mathrm{d} y\, \Omega(x,y) + \dots\\
&= \frac{1}{4\pi}\int\_{R'} \mathrm{d} x \mathrm{d} y\, \nabla\times \mathbf{A}
+ \frac{1}{4\pi}\int\_{D(0,0,\epsilon)} \mathrm{d} x \mathrm{d} y\, \Omega(x,y) + \dots\\
&= \frac{1}{4\pi}\oint\_{\partial R'} \mathrm{d} \mathbf{l}\cdot \mathbf{A}
+ \frac{1}{4\pi}\int\_{D(0,0,\epsilon)} \mathrm{d} x \mathrm{d} y\, \Omega(x,y) + \dots\\
&= \left(\frac{1}{4\pi}\oint\_{\partial R} \mathrm{d} \mathbf{l}\cdot \mathbf{A}
-\frac{1}{4\pi}\oint\_{\partial D(0,0,\epsilon)} \mathrm{d} \mathbf{l}\cdot \mathbf{A}
-\dots\right)
+ \frac{1}{4\pi}\int\_{D(0,0,\epsilon)} \mathrm{d} x \mathrm{d} y\, \Omega(x,y) + \dots\\
\end{align}
In the last two steps we used Stokes' theorem and that $\partial R' = \partial R \cup \partial D(0,0,\epsilon) \cup \dots$, and $\pm$ signs account for the orientation of the boundary. Since $\Omega(x,y)$ is finite everywhere, when $\epsilon\rightarrow 0$
\begin{equation}
\left|\int\_{D(x\_0,y\_0,\epsilon)} \mathrm{d} x \mathrm{d} y\, \Omega(x,y)\right| \leq
\pi\epsilon^2 
\max\_{x,y} |\Omega(x,y)|
\xrightarrow{\epsilon\rightarrow 0} 0
\end{equation}
Furthermore, $\oint\_{\partial R} \mathrm{d} \mathbf{l}\cdot \mathbf{A}=0$, because $\mathbf{A}$ is periodic, so the integrals over opposite sides of the square cancel out. We're left with
\begin{equation}
I(m) = 
-\frac{1}{4\pi}\lim\_{\epsilon\rightarrow 0}\oint\_{\partial D(0,0,\epsilon)} \mathrm{d} \mathbf{l}\cdot \mathbf{A}
-\dots
\end{equation}
We have
\begin{align}
\frac{1}{4\pi}\lim\_{\epsilon\rightarrow 0}\oint\_{\partial D(x\_0,y\_0,\epsilon)} \mathrm{d}\mathbf{l}\cdot\mathbf{A}
=
\frac{1}{4\pi}\int\_0^{2\pi} \mathrm{d} \phi 
\lim\_{\epsilon\rightarrow 0}
\epsilon (-\sin\phi,\cos\phi)\cdot\mathbf{A}(x\_0 + \epsilon\cos\phi, y\_0 + \epsilon\sin\phi)\,.
\end{align}
Now one just has to evaluate this for all 4 disks. The results are
\begin{align}
(0,0)&: \frac{-m+\sqrt{(m-2)^2}+2}{2\sqrt{(m-2)^2}} = \theta(-m+2)\\
(0,\pi)&: \frac{m-\sqrt{m^2}}{2\sqrt{m^2}} = -\theta(-m)\\
(\pi,0)&: \frac{m-\sqrt{m^2}}{2\sqrt{m^2}} = -\theta(-m)\\
(\pi,\pi)&: \frac{-m+\sqrt{(m+2)^2}-2}{2\sqrt{(m+2)^2}}
= \theta(-m-2)\,,
\end{align}
where $\theta$ is Heaviside step function. The total integral then is
\begin{equation}
I(m) = 2\theta(-m) - \theta(-m+2) - \theta(-m-2) = 
\begin{cases}
-1 & 0<m<2 \\
1 & -2<m<0 \\
0 & |m|>2 \\
\end{cases}\,.
\end{equation}


