---
title: "Integral of the month: $\\displaystyle\\int_{-\\infty}^{\\infty} \\frac{\\sin^4 x}{x^4}\\,dx$"
draft: true
categories: ["Math"]
tags: ["Integral", "Residue Calculus", "Parseval", "Integral of the month"]
date: '2026-09-26'
link-citations: true
always_allow_html: true
endnote: no
keywords: Integral, Fourier transform, Residue Calculus
biblio-style: apsr
thanks1: "email: quarktetra@gmail.com  \n"
csl: ../../bibAndStyle/ieee.csl
bibliography-style: numeric
abstract: "We evaluate $\\int_{-\\infty}^{\\infty} \\sin^4(x)/x^4\\,dx$ in several independent ways. A Parseval argument reduces the problem to the $L^2$ norm of a triangular convolution of two rectangles. A real-variable route starts from $\\int (1-\\cos(ax))/x^2\\,dx=\\pi|a|$ and uses algebra for $(1-\\cos(2x))^2$. Finally, a complex contour computation with an indented fourth-order pole reproduces the same number."
bibliography: ../../bibAndStyle/bibliography.bib
image: "fig-sinnxcj-1.svg"
format:
  html:
    code-tools: false
    code-fold: true
    include-in-header:
      - text: |
          <script> window.JSdebugMode = false;</script>
    include-after-body:
      - ../../bibAndStyle/tooltipsterm2025.html

    html-math-method:
      method: mathjax
      url: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG"
      typeset: false  # Add this line to disable automatic typesetting

  pdf:
    output-file: "integral_sinx4_over_x4.pdf"
    csl: ../../bibAndStyle/ieee.csl
    include-in-header:
      - text: |
          \usepackage{cancel}
          \usepackage{amsmath}
          \newcommand{\bnabla}{\boldsymbol{\nabla}}
          \newcommand{\fslash}[1]{#1\!\!\!/}
          \DeclareMathOperator{\Tr}{Tr}

editor:
  markdown:
    wrap: 72

---



<!-- quarto render posts/integral_sinx4_over_x4/index.qmd --to pdf -->

::: {.content-visible when-format="html"}
$\require{cancel}$
:::

```{r}
#| echo: false
#| output: asis
#| include: false
post_path <- normalizePath(knitr::current_input(), winslash = "/", mustWork = TRUE)
```

```{r child = '../../sharedContent/globalSettings.txt'}
```


```{=latex}
blog: \href{https://tetraquark.vercel.app/posts/integral_sinx4_over_x4/?src=pdf}{link}

email: \href{mailto:quarktetra@gmail.com}{quarktetra@gmail.com}
```

```{r}
#| echo: false
#| message: false
#| warning: false

library("knitr")
library("kableExtra")

# Set table format based on output type
if (knitr::is_latex_output()) {
  knitr.table.format <- "latex"
} else {
  knitr.table.format <- "html"
}
```


<style>
      #scatter .modebar-group {  background: lightgray;}
      #scatter.modebar-container{top:80px!important}
</style>


Let
\begin{equation}
  I \;\equiv\; \int_{-\infty}^\infty \frac{\sin^4 x}{x^4}\,dx .
  \label{eq:goal}
\end{equation}
The integrand is nonnegative, even, and decays like $1/x^4$, so $I$ is finite. The methods below all produce the closed form $I=2\pi/3$.

# Parseval and a triangular self-convolution

We use the symmetric Fourier convention already convenient for the $\mathrm{sinc}$ family:
\begin{eqnarray}
  F(\omega)&=&\frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty dt\, e^{-i\omega t}f(t),\nonumber\\
  f(t)&=&\frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty d\omega\, e^{i\omega t}F(\omega).
  \label{eq:fourier}
\end{eqnarray}
Parseval's identity for this normalization reads
\begin{equation}
  \int_{-\infty}^\infty |f(t)|^2\,dt
  = \int_{-\infty}^\infty |F(\omega)|^2\,d\omega .
  \label{eq:parseval}
\end{equation}

Take the rectangular pulse (indicator on $[-1,1]$ with height $\sqrt{\pi/2}$),
\begin{equation}
  f(t)=\sqrt{\frac{\pi}{2}}\,\mathbf{1}_{(-1,1)}(t).
  \label{eq:rect}
\end{equation}
A direct integration gives
\begin{equation}
  F(\omega)=\frac{\sin \omega}{\omega},
  \label{eq:sincpair}
\end{equation}
so
\begin{equation}
  \frac{\sin^2 \omega}{\omega^2} = |F(\omega)|^2,
\end{equation}
which matches the $\sin^2 x/x^2$ baseline via \eqref{eq:parseval}.

To reach fourth powers, recall the convolution theorem (same normalization):
\begin{equation}
  \widehat{f*f}(\omega)
  = \sqrt{2\pi}\,F(\omega)^2
  = \sqrt{2\pi}\,\frac{\sin^2\omega}{\omega^2}.
  \label{eq:conv}
\end{equation}
Equivalently the inverse transform identifies $h\equiv f*f$ as the function whose spectrum is $\sqrt{2\pi}\,(\sin\omega/\omega)^2$.

The convolution of two boxes of width $2$ is a triangle supported on $[-2,2]$:
\begin{equation}
  (f*f)(t)=\int_{-\infty}^{\infty}f(\tau)f(t-\tau)\,d\tau
  = \frac{\pi}{2}\bigl(2-|t|\bigr)\,\mathbf{1}_{(-2,2)}(t).
  \label{eq:triangle}
\end{equation}
Apply \eqref{eq:parseval} to $h=f*f$:
\begin{equation}
  \int_{-\infty}^{\infty} |h(t)|^2\,dt
  = \int_{-\infty}^{\infty} \bigl|\sqrt{2\pi}\,F(\omega)^2\bigr|^2\,d\omega
  = 2\pi \int_{-\infty}^{\infty} \frac{\sin^4\omega}{\omega^4}\,d\omega
  = 2\pi\,I .
  \label{eq:linkI}
\end{equation}
The left side is elementary:
\begin{eqnarray}
  \int_{-\infty}^{\infty} |h(t)|^2\,dt
  &=&2\left(\frac{\pi}{2}\right)^2\int_{0}^{2} (2-t)^2\,dt
   = \frac{\pi^2}{2}\left[\frac{(2-t)^3}{-3}\right]_{0}^{2}
   = \frac{4\pi^2}{3}.
\end{eqnarray}
Substituting into \eqref{eq:linkI} yields $2\pi I = 4\pi^2/3$, i.e.
\begin{equation}
  I=\frac{2\pi}{3}.
  \label{eq:parsevalResult}
\end{equation}

*Remark (B-spline viewpoint).* The triangle in \eqref{eq:triangle} is the order-$2$ cardinal B-spline obtained by convolving two rectangles; squaring its spectrum produces the quartic $\mathrm{sinc}$, matching the standard ``square of a triangle'' picture in signal-processing language.

# Parameter track via cosine integrals and trig identities

Start from the absolutely convergent template (parameter $a\in\mathbb{R}$)
\begin{equation}
  J(a)\equiv \int_{-\infty}^{\infty}\frac{1-\cos(ax)}{x^2}\,dx
  = \pi\,|a|.
  \label{eq:Jdef}
\end{equation}
Differentiating under the integral sign for $a>0$ recovers the Dirichlet integral
\begin{equation}
  J'(a)=\int_{-\infty}^{\infty}\frac{\sin(ax)}{x}\,dx = \pi .
  \label{eq:Jprime}
\end{equation}

First rewrite the target sine power,
\begin{equation}
  \sin^4 x = \frac{\bigl(1-\cos(2x)\bigr)^2}{4},
\end{equation}
so
\begin{equation}
  I = \frac{1}{4}\,K(2),
  \qquad
  K(a)\equiv \int_{-\infty}^{\infty}\frac{\bigl(1-\cos(ax)\bigr)^2}{x^4}\,dx .
  \label{eq:Kdef}
\end{equation}

**Scaling.** Substitute $x=y/|a|$ (for $a\neq 0$) to obtain
\begin{equation}
  K(a)=|a|^3 K(1) ,
  \label{eq:Kscale}
\end{equation}
so it suffices to evaluate $K(1)$.

**A squared ``notch'' integral and one $a$-derivative.** Consider the absolutely convergent ($x^{-2}$) relative of $K$:
\begin{equation}
  P(a)\equiv \int_{-\infty}^{\infty}\frac{\bigl(1-\cos(ax)\bigr)^2}{x^2}\,dx .
  \label{eq:Pdef}
\end{equation}
Near $x=0$ the integrand behaves like $(a^2x^2/2)^2/x^2=\mathcal{O}(x^2)$, so there is no singularity. Moreover $P(a)=|a|\,P(1)$ by the same scaling argument as for $K$, and $P(1)$ can be evaluated in closed form---for instance by expanding the square and using standard cosine transforms---with the result $P(1)=\pi$. Hence
\begin{equation}
  P(a)=\pi\,|a|.
  \label{eq:Pclosed}
\end{equation}

For $a>0$ we may differentiate under the integral:
\begin{equation}
  P'(a)
  =\int_{-\infty}^{\infty}\frac{2\bigl(1-\cos(ax)\bigr)\,x\sin(ax)}{x^2}\,dx
  =2\int_{-\infty}^{\infty}\frac{\bigl(1-\cos(ax)\bigr)\sin(ax)}{x}\,dx
  =\pi .
  \label{eq:Pprimepiece}
\end{equation}
Expanding $\bigl(1-\cos(ax)\bigr)\sin(ax)=\sin(ax)-\tfrac{1}{2}\sin(2ax)$ and using the Dirichlet integral $\int_{-\infty}^{\infty} \sin(kx)/x\,dx=\pi$ for $k>0$ gives $2\pi-\pi=\pi$, i.e.\ the derivative of the squared notch is carried entirely by the two sine frequencies $a$ and $2a$.

**Integration by parts for $K(1)$.** Integrate by parts in
\begin{equation}
  K(1)=\int_{-\infty}^{\infty}\frac{\bigl(1-\cos x\bigr)^2}{x^4}\,dx
\end{equation}
with $u=(1-\cos x)^2$, $dv=dx/x^4$, $du=2(1-\cos x)\sin x\,dx$, and $v=-1/(3x^3)$. The boundary term vanishes at $0$ and $\pm\infty$, whence
\begin{equation}
  K(1)=\frac{2}{3}\int_{-\infty}^{\infty}\frac{(1-\cos x)\sin x}{x^3}\,dx .
  \label{eq:Kibp}
\end{equation}
A short dominated-convergence argument with the Laplace factor $e^{-\varepsilon|x|}$ shows the integral in \eqref{eq:Kibp} equals $\pi/2$, so $K(1)=\pi/3$ (agreeing with \eqref{eq:parsevalResult}).

Combining \eqref{eq:Kscale} with $K(1)=\pi/3$ yields
\begin{equation}
  K(a)=\frac{\pi}{3}\,|a|^3 ,
  \label{eq:Kclosed}
\end{equation}
and therefore
\begin{equation}
  I=\frac{1}{4}\,K(2)=\frac{1}{4}\cdot\frac{\pi}{3}\cdot 8
   =\frac{2\pi}{3}.
\end{equation}

*Remark.* Alternatively, read $K(1)=\pi/3$ from \eqref{eq:parsevalResult} using $K(2)=4I$.

# Complex contour with a fourth-order pole

We follow the split-exponential spirit of the $\sin^2$ example but track one extra factor of $1/z^2$. Use
\begin{equation}
  \sin^4 z
  = \frac{1}{(2i)^4}\bigl(e^{iz}-e^{-iz}\bigr)^4
  = \frac{e^{4iz}-4e^{2iz}+6-4e^{-2iz}+e^{-4iz}}{16}.
\end{equation}
Hence on the real axis,
\begin{equation}
  \frac{\sin^4 x}{x^4}
  = \frac{1}{16x^4}\Bigl( e^{4ix}-4e^{2ix}+6-4e^{-2ix}+e^{-4ix} \Bigr).
  \label{eq:sin4exp}
\end{equation}
Rather than pairing five exponential pieces from \eqref{eq:sin4exp} explicitly, compress the contour algebra into a single function whose real part is half of $\sin^4 x/x^4$ and whose imaginary part is odd. Set
\begin{equation}
  H(z)=\frac{3-4e^{2iz}+e^{4iz}}{16 z^4}.
  \label{eq:Hdef}
\end{equation}
For $x\in\mathbb{R}$, $H(-x)=\overline{H(x)}$, and
\begin{equation}
  \mathrm{Re}\,H(x)=\frac{3-4\cos(2x)+\cos(4x)}{16x^4}=\frac{\sin^4 x}{2x^4}.
\end{equation}
Hence
\begin{equation}
  I=\int_{-\infty}^{\infty}\frac{\sin^4 x}{x^4}\,dx
  =2\int_{-\infty}^{\infty}\mathrm{Re}\,H(x)\,dx
  =2\,\mathrm{Re}\!\int_{-\infty}^{\infty}H(x)\,dx,
\end{equation}
with the last integral understood in the principal-value sense plus the same small semicircular indentation at $x=0$ featured in the quadratic $\sin^2$ baseline.

Close $H$ in the upper half plane with $C_R$ of @fig-sinnxc. On the large arc, $|e^{2iz}|$ and $|e^{4iz}|$ decay when $\mathrm{Im}\,z>0$, so that contribution vanishes as $R\to\infty$. Near $z=0$,
\begin{equation}
  N(z)=3-4e^{2iz}+e^{4iz}
  = -4iz-\frac{16i}{3}z^3+8z^4+\mathcal{O}(z^5),
\end{equation}
so
\begin{equation}
  H(z)=-\frac{i}{4z^3}-\frac{i}{3z}+\frac{1}{2}+\mathcal{O}(z).
\end{equation}
The simple pole contributes $\mathrm{Res}(H,0)=-i/3$, and for the closed contour $\Gamma=C_R\cup(-R,-\varepsilon)\cup C_\varepsilon\cup(\varepsilon,R)$,
\begin{equation}
  \oint_{\Gamma} H(z)\,dz
  = 2\pi i\,\mathrm{Res}(H,0)
  = \frac{2\pi}{3}.
\end{equation}
Matching the contour pieces (vanishing large arc, symmetric real axis, standard indentation) yields $\mathrm{Re}\int_{-\infty}^{\infty}H(x)\,dx=\pi/3$ and therefore $I=2\pi/3$, consistent with \eqref{eq:parsevalResult}.

{{< include ../../sharedContent/integralUpperContour.txt >}}

# Another complex contour integration (shifted baseline)

The same pole bookkeeping can be reorganized with the downward-shifted geometry of @fig-sinnxcj, isolating the entire fourth-order contribution on a single enclosed contour instead of sharing it between two half-planes. The Laurent calculation above is unchanged; only the geometry of the indentation differs.

{{< include ../../sharedContent/integralShiftedContour.txt >}}


# Scaling sanity check

The dimensionless integral is invariant under $x\mapsto \lambda x$ together with compensating powers of $\sin$, so $\int_{-\infty}^{\infty} \sin^4(\lambda x)/x^4\,dx = |\lambda|^3 I$. Setting $\lambda=1$ recovers \eqref{eq:goal}; comparing with the half-line value $\int_0^\infty (\sin x/x)^4 dx=\pi/3$ (even integrand, total $I=2\pi/3$) serves as a quick numerical cross-check.

There you have it: Parseval via a triangle, a cosine-parameter algebraic route, and a complex contour with an indented quartic pole all land on the same value.

```{r eval=is_html, child = '../../sharedContent/utterranceComment.txt'}
```

```{r child = '../../sharedContent/postCSS.css'}
```



<script>
// Set up a mutation observer to detect theme changes
function setupThemeChangeListener() {
  // Create a function to refresh plots when theme changes
  function refreshPlots() {
    if (typeof doubleWeibullPlotter === 'function') {
      doubleWeibullPlotter();
    }
    // Add any other plot refresh functions here
  }

  // Create an observer to watch for class changes on the body element
  const observer = new MutationObserver(mutations => {
    mutations.forEach(mutation => {
      if (mutation.attributeName === 'class') {
        refreshPlots();
      }
    });
  });

  // Start observing the body element for class changes
  observer.observe(document.body, { attributes: true });

  // Also listen for your toggle button click if you have a specific ID
  const themeToggle = document.querySelector('.navbar-toggler') ||
                      document.querySelector('.quarto-color-scheme-toggle') ||
                      document.getElementById('quarto-theme-toggle');

  if (themeToggle) {
    themeToggle.addEventListener('click', () => {
      // Wait a short moment for the DOM to update
      setTimeout(refreshPlots, 100);
    });
  }
}

// Initialize the observer after the document is loaded
document.addEventListener('DOMContentLoaded', setupThemeChangeListener);
</script>
