Skip to content

Instantly share code, notes, and snippets.

@Nikolaj-K
Last active November 21, 2025 18:34
Show Gist options
  • Select an option

  • Save Nikolaj-K/3e894498bd0fd671c6af1276984183ea to your computer and use it in GitHub Desktop.

Select an option

Save Nikolaj-K/3e894498bd0fd671c6af1276984183ea to your computer and use it in GitHub Desktop.
Visualizer for Glasser transform type theorems

Script for the video

https://youtu.be/LfiIiSPg3Ms

$f$ ... Lebesgue-integrable over (all of) ${\mathbb R}$,

$\int_{-\infty}^\infty f\big(x + d\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

$\int_{-\infty}^\infty f\big(x - \dfrac{1}{x}\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

$\int_{-\infty}^\infty f\big(x + \tan(x)\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

etc.

$\int_{-\infty}^\infty f\big(u(x)\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

where

$u(x) = x + d - \sum_{n=1}^N \frac{|c_n|}{x-x_n}$

with real sequences and distinct $x_n$'s Also allow $N\to\infty$ when $\sum_{n=1}^\infty \frac{|c_n|}{1+|x_n|} < \infty$ together with our $u(x)$ converging as a series Borel a.e. (The latter is e.g. ensured by $\sum_{n=1}^\infty |c_n| < \infty$ together with $x_n$ having no accumulation point.) E.g. $\tan(x) = \sum_{n=0}^\infty\left(\dfrac{1}{x+x_n} + \dfrac{1}{x-x_n}\right)$, $x_n = (1+\tfrac{1}{2})\cdot\pi$. So

$\int_{-\infty}^\infty f\big(x + \tan(x)\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$


Consider $u(x) = x - \dfrac{1}{x}$.

$\lambda(u^{-1}(A))=\lambda(A)$ ... $A$ Borel

sketches:

  1. Consider wolfram range image

  2. Consider box plot Note for later: For fixed $y$, we can find a corresponding $x\in(-\infty, 0)$ or $x\in(0, \infty)$

  3. Consider image

${\mathbb R} = (-\infty, 0)\cup{0}\cup(0, \infty)$

$\int_{{\mathbb R}} f\big(u(x)\big),{\mathrm d}x = \int_{(-\infty, 0)} f\big(u(x)\big),{\mathrm d}x + \int_{(0, \infty)} f\big(u(x)\big),{\mathrm d}x$

E.g. $\int_{(-\infty, 0)} f\big(u(x)\big),{\mathrm d}x = \int_{{\mathbb R}} f\big(y\big),\dfrac{1}{u'(u^{-1}(y))},{\mathrm d}y$

$\dfrac{1}{u'(u^{-1}(y))}=\dfrac{1}{1+\tfrac{1}{x^2}}\left|_{x=u^{-1}(y)}\right. = \frac{1}{2} \left(y \pm \frac{y}{\sqrt{y^2+2^2}}\right)$ This is really two solutions, as there's two inverses.

Note: The sum of those fractions is actually $1$, and the integral is linear.

Regarding the generalization to the $N\to\infty$ case, this is proven via complex analyiss/contour integrals.

Solve[0 <= x + 1/(y-x) <= 1, x]

Solve[C <= x + 1/(2y-C-x) <= C+2D, x]

Solve[0 <= x + 1/(1-x) + 1/(2-x) <= 1, x]

Plot[{Tan[x], -1/(x-Pi)}, {x, -10, 10}]

[[https://en.wikipedia.org/wiki/Glasser%27s_master_theorem]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment