3

A friend of mine is struggling with the following integral: $$ \int_{-\infty}^{\infty} \operatorname{sinc}^2(x/4) \, g(x) \, \frac{\sin^2(N\pi x)}{\sin^2(\pi x) } \, dx $$ for an integer N, $g(x)$ a trigonometric function, in this example $$ g(x) = \frac{1 + \cos{\frac{\pi x}{2}}}{2} $$ but there are two more $g(x)$, with a similar looking linear combinations of trigonometric functions we'd have to do this for, namely:

$$g_2(x) = [3 + 4 \cos(\pi x / 2) + 2 \cos (\pi x)]/9$$ $$g_3(x) = [4 + 6 \cos(\pi x / 2) + 4 \cos (\pi x) + 2 \cos(3 \pi x / 2) ]/16$$

and where $$ \operatorname{sinc}(x) = \frac{\sin(\pi x)}{\pi x} $$ when $x \neq 0$, and $1$ at $x = 0$.

All we know is that this can be done somehow, likely numerically — but I haven't been able to find a reasonable way to do so.

Numerically, I've tried scipy.integrate.quad, but it seems like the $\sin^{-2}(\pi x)$ term causes convergence issues. The integrand blows up at every integer $x$.

Can you point us both towards some trick or concept that would make this tractable?

Zacky
  • 27,674
  • 1
    This kind of thing should be amenable to a Fourier transform or contour integral approach: in this case it might be a little tedious though – FShrike May 06 '23 at 16:32
  • 1
    Is $N$ an integer? – John Barber May 07 '23 at 03:00
  • This by no means constitutes a proof, but some experimentation in Mathematica suggests that this integral evaluates to $2\pi |N|$. – John Barber May 07 '23 at 16:11
  • Have you tried some numerical approaches? – Accelerator May 07 '23 at 23:13
  • N is indeed an integer. It may indeed converge to 2piN for this particular g(x), but I need a general approach for a few different, similar g(x) functions. John, if you could share your Mathematica code, I'd happily consider that a helpful answer. I've tried numerical approaches such as scipy.integrate.quad, but the sin(x)^-2 behavior makes those problematic. – Dominik Stańczak May 08 '23 at 06:14
  • So far, I have conjectured that the integral equals $2|N|$ using your definition of $\operatorname{sinc}(x)$ and $g(x)$, but it'd take me a while to write an answer. What kind of similar $g(x)$ functions are you looking for exactly? – Accelerator May 08 '23 at 06:38
  • I've added the other $g(x)$ functions in an edit. – Dominik Stańczak May 08 '23 at 06:48
  • The limit of the integrand as $x$ approaches any integer converges and thus those integers are removable discontinuities, so you don't have to worry about the integrand blowing up anywhere. – Accelerator May 08 '23 at 06:51

2 Answers2

5

We can use the Lobachevsky integral formula, which gives:

$$\int_0^\infty \frac{\sin^2 x}{x^2}f(x)dx=\int_0^\frac{\pi}{2}f(x)dx$$

Assuming that $f(x)$ is $\pi$ periodic.


$$\int_{-\infty}^\infty \frac{\sin^2\left(\frac{\pi x}{4}\right)}{\left(\frac{\pi x}{4}\right)^2}\frac{1+\cos\left(\frac{\pi x}{2}\right)}{2}\frac{\sin^2(n\pi x)}{\sin^2(\pi x)}dx = \frac14\int_{-\infty}^\infty \frac{\sin^2\left(\frac{\pi x}{2}\right)}{\left(\frac{\pi x}{4}\right)^2}\frac{\sin^2(n\pi x)}{\sin^2(\pi x)}dx$$

$$\overset{\large \frac{\pi x}{2}\to x}=\frac{4}{\pi}\int_{0}^\infty \frac{\sin^2x}{x^2}\frac{\sin^2(2nx)}{\sin^2(2x)}dx=\frac{4}{\pi}\int_0^\frac{\pi}{2}\frac{\sin^2(2nx)}{\sin^2(2x)}dx=2|n|$$

The last integral can be found here.


Similarly, for $g_2(x)$ we get: $$\int_{-\infty}^\infty \frac{\sin^2\left(\frac{\pi x}{4}\right)}{\left(\frac{\pi x}{4}\right)^2}\frac{g_2(x)\sin^2(n\pi x)}{\sin^2(\pi x)}dx\overset{\large \frac{\pi x}{4}\to x}=\frac{8}{9\pi}\int_0^\infty \frac{\sin^2(3x)}{x^2}\frac{\sin^2(4n x)}{\sin^2(4x)}dx$$ $$=\frac{8}{9\pi}\int_0^\infty \frac{\sin^2 x}{x^2}\left(3-4\sin^2 x\right)^2\ \frac{\sin^2(4n x)}{\sin^2(4x)}dx$$ $$= \frac{8}{9\pi}\int_0^\frac{\pi}{2}\left(3-4\sin^2 x\right)^2\ \frac{\sin^2(4n x)}{\sin^2(4x)}dx= \frac{4|n|}{3}$$


The last one is also the easiest:

$$\require{cancel}\int_{-\infty}^\infty \frac{\sin^2\left(\frac{\pi x}{4}\right)}{\left(\frac{\pi x}{4}\right)^2}\frac{g_3(x)\sin^2(n\pi x)}{\sin^2(\pi x)}dx=\int_{-\infty}^\infty \frac{\cancel{\sin^2(\pi x)}}{(\pi x)^2}\frac{\sin^2(n\pi x)}{\cancel{\sin^2(\pi x)}}dx=|n|$$

Zacky
  • 27,674
1

Let $\displaystyle I=\int_{-\infty}^{\infty}\operatorname{sinc}^{2}\left(\frac{x}{4}\right)g(x)\frac{\sin^{2}\left(N\pi x\right)}{\sin^{2}\left(\pi x\right)}$. For this solution, we will assume that $g(x) = \displaystyle \frac{1+\cos\left(\frac{\pi x}{2}\right)}{2}$, $\operatorname{sinc}(x) = \displaystyle \frac{\sin\left(\pi x\right)}{\pi x}$ is the normalized sinc function, and $N \in \mathbb{Z}$. Notice how $\sin^{2}\left(N\pi x\right)=\sin^{2}\left(\left|N\right|\pi x\right)$. For simplicity's sake, let $|N| = K$.

We can use the fact that $\displaystyle \Re\left(\frac{1-e^{2K\pi ix}}{2}\right) = \sin^2(K\pi x)$. Rewriting $I$ gives

$$I = \frac{2}{\pi^{2}}\operatorname{PV}\Re\int_{-\infty}^{\infty}\frac{1-e^{2K\pi ix}}{x^{2}\left(\exp\left(-\frac{i\pi}{2}x\right)+\exp\left(\frac{i\pi}{2}x\right)\right)^{2}}dx$$

(where we somewhat abuse the Cauchy Principal Value definition since $\operatorname{PV}$ mainly concerns one singularity).

Let $f(z) = \displaystyle \frac{1-e^{2K\pi iz}}{z^{2}\left(\exp\left(-\frac{i\pi}{2}z\right)+\exp\left(\frac{i\pi}{2}z\right)\right)^{2}}$. There are second-order poles at $z=0$ and $z=2n+1$ for any $n \in \mathbb{Z}$ that I colored in blue in the picture down below.

Contour

Let $\Gamma$ be the huge semicircle of radius $R$ where $R$ is a large even integer so that it's bounded away from the small semicircle. Let $\gamma_{2n+1}$ represent the sequence of small semicircles enclosing their respective poles and let $\gamma_{0}$ be the small semicircle enclosing the pole at the origin. Each semicircle has a sufficiently small radius $\epsilon$ such that the semicircles don't intersect each other.

Using Cauchy's Residue Theorem, we get

$$ \begin{align} 0 &=\sum\int_{\text{orange}} f(z)dz + \sum_{n=-R/2}^{R/2-1}\int_{\gamma_{2n+1}}f(z)dz + \int_{\gamma_0}f(z)dz + \int_{\Gamma}f(z)dz \\ \end{align} $$

where $\displaystyle \sum \int_{\text{orange}} f(z)dz$ is the sum of the integrals over the orange line segments. Applying $\displaystyle \frac{2}{\pi^2}\Re\operatorname{PV}\lim_{R \to \infty}\lim_{\epsilon \to 0^+}$ to the equation above and doing some algebra, we get

$$I = \frac{2}{\pi}\Re i \sum_{n \in \mathbb{Z}} \operatorname{Res}(f(z), z = 2n+1) + \frac{2}{\pi} \Re i \operatorname{Res}(f(z), z=0) + 0$$

where we can prove that $\displaystyle \lim_{R \to \infty}\int_{\Gamma}f(z)dz = 0$ using the Estimation Lemma.

The first expression is

$$ \begin{align} I_1 &:= \frac{2}{\pi}\Re i \sum_{n \in \mathbb{Z}} \operatorname{Res}\left(\frac{1-e^{2K\pi iz}}{z^{2}\left(\exp\left(-\frac{i\pi}{2}z\right)+\exp\left(\frac{i\pi}{2}z\right)\right)^{2}}, z = 2n+1\right) \\ &= \frac{2}{\pi}\Re i \sum_{n \in \mathbb{Z}} \frac{1}{(2-1)!}\lim_{z \to 2n+1} \frac{d^{2-1}}{dz^{2-1}}\frac{\left(z-\left(2n+1\right)\right)^{2}\left(1-e^{2K\pi iz}\right)}{z^{2}\left(\exp\left(-\frac{i\pi z}{2}\right)+\exp\left(\frac{i\pi z}{2}\right)\right)^{2}} \\ &= \frac{2}{\pi}\Re i \sum_{n \in \mathbb{Z}} \left(-\frac{2Ki}{\pi\left(2n+1\right)^{2}}\right) \\ &= \frac{4K}{\pi^2}\sum_{n \in \mathbb{Z}} \frac{1}{(2n+1)^2} \\ &= \frac{4K}{\pi^2} \cdot \frac{\pi^2}{4} \\ &= K. \end{align} $$

Similarly, you can apply the same kind of process to prove $\displaystyle \frac{2}{\pi} \Re i \operatorname{Res}(f(z), z=0) = K$.

We add those two results together and get $I = 2K = 2|N|$.

Accelerator
  • 4,923
  • Note: I didn't try this method for your $g_2(x)$ and $g_3(x)$. I'm assuming the same kind of method works for both of those functions, but just more tedious. This answer is more of a guide for your friend than a full answer. – Accelerator May 08 '23 at 09:11
  • Putting aside your having apparently lost a factor of $\pi$, doesn't the semi-residue lemma require first-order poles? – J.G. May 08 '23 at 09:15
  • @J.G. Yeah, I just realized that the semi-residue lemma requires first-order poles and not higher-order poles or essential singularities. I'll edit my post and try to salvage it somehow, but I thought the work seemed correct according to here. Also, I don't see where I'm missing a factor of $\pi$? – Accelerator May 08 '23 at 09:21
  • I'm going off @JohnBarber's comment. – J.G. May 08 '23 at 09:22
  • @J.G. I see. Thank you very much for catching my errors though. I've learned quite a bit from the answers you've posted on this site. – Accelerator May 08 '23 at 09:26
  • 1
    Now I think about it, because of the $1-e^{2K\pi iz}$ factor (which vanishes at any integer) the poles are actually only first-order. – J.G. May 08 '23 at 13:12
  • Thank you! It's been a while since I've done any contour integrals, and I think my attempts were simply missing this formal way of handling residues at all integer K. Written out, it looks pretty obvious now! – Dominik Stańczak May 08 '23 at 16:41
  • @DominikStańczak Despite some of my mistakes, I'm glad this post helped you out. Now that I think about it, I'm not sure if using the residue formula for higher-order poles applies here, even though it leads to the right answer, because $f(z)$ apparently has first-order poles. For each pole, it might be easier to just expand $f(z)$ as a Laurent series centered at the pole and find the coefficients of $\frac{1}{z-\text{pole}}$. Everything else in the post should be fine, after rereading the post. – Accelerator May 09 '23 at 02:21