Welcome!
Some math code copy-pasted for reference. - Ramprax (talk) 11:42, 4 February 2020 (UTC)[reply]
![{\displaystyle D_{n}(x)=\sum _{k=-n}^{n}e^{2\pi ikx}={\frac {\sin \left(\left(2n+1\right)\pi x\right)}{\sin(\pi x)}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d08b874f1c86bd21e46787f6bd2626a4a5dadddb)
be the Dirichlet kernel.
This is clearly symmetric about zero, that is,
![{\displaystyle D_{n}(-x)=D_{n}(x)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3f99ba1dac4671424fef8c3888a0c602960a088a)
![{\displaystyle 0=\int _{\gamma }g(z)\,dz=\int _{-R}^{R}{\frac {e^{ix}}{x+i\varepsilon }}\,dx+\int _{0}^{\pi }{\frac {e^{i(Re^{i\theta }+\theta )}}{Re^{i\theta }+i\varepsilon }}iR\,d\theta .}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6a15b209dcb33a5afd59735f4c444dae7aca89f1)
The second term vanishes as R goes to infinity. As for the first integral, one can use one version of the Sokhotski–Plemelj theorem for integrals over the real line: for a complex-valued function f defined and continuously differentiable on the real line and real constants
and
with
one finds
![{\displaystyle \lim _{\varepsilon \to 0^{+}}\int _{a}^{b}{\frac {f(x)}{x\pm i\varepsilon }}\,dx=\mp i\pi f(0)+{\mathcal {P}}\int _{a}^{b}{\frac {f(x)}{x}}\,dx,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c09d1ac11a9c31b37eb55f49bc14ee407f91dfe0)
where
denotes the Cauchy principal value. Back to the above original calculation, one can write
![{\displaystyle 0={\mathcal {P}}\int {\frac {e^{ix}}{x}}\,dx-\pi i.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/573b063399ff886b7c2603dd69ff80c6231a1bc9)
![{\displaystyle {\vec {r}}\cdot {\hat {n}}=d={\vec {a}}\cdot {\hat {n}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/36a4de9f3cc59ad19ba9405e8241e17e3ce1d9e3)
![{\displaystyle \int e^{kx}\sin(nx)\,dx={\frac {e^{kx}}{k^{2}+n^{2}}}\left(k\sin(nx)-n\cos(nx)\right)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4f6e0ab07be8ca0f66d712dca812bc13c8c2d714)
![{\displaystyle \int e^{kx}\cos(nx)\,dx={\frac {e^{kx}}{k^{2}+n^{2}}}\left(k\cos(nx)+n\sin(nx)\right)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5a66a2902ff22fa78480a51d7ceb51c40ddc2d10)
Ramprax (talk) 11:42, 4 February 2020 (UTC)[reply]