86

While browsing on Integral and Series, I found a strange integral posted by @Sangchul Lee. His post doesn't have a response for more than a month, so I decide to post it here. I hope he doesn't mind because the integral looks very interesting to me. I hope for you too. :-)

enter image description here

$$\mbox{How does one prove}\quad \int_{-\infty}^{\infty} {{\rm d}x \over 1 + \left[\,x + \tan\left(\, x\,\right)\,\right]^{2}} = \pi\quad {\large ?} $$

Please don't ask me, I really have no idea how to prove it. I hope users here can find the answer to prove the integral. I'm also interested in knowing any references related to this integral. Thanks in advance.

Peter_Pan
  • 1,836
Venus
  • 10,966

4 Answers4

84

Here is an approach.

We may use the following result, which goes back to G. Boole (1857) :

$$ \int_{-\infty}^{+\infty}f\left(x-\frac{a_1}{x-\lambda_1}-\cdots-\frac{a_n}{x-\lambda_n}\right)\mathrm{d}x=\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \tag1 $$

with $a_i>0, \lambda_i \in \mathbb{R}$ and $f$ sufficiently 'regular'.

Observe that, for $x\neq n\pi$, $n=0,\pm1,\pm2,\ldots$, we have $$ \cot x = \lim_{N\to +\infty} \left(\frac1x+\frac1{x+\pi}+\frac1{x-\pi}+\cdots+\frac1{x+N\pi}+\frac1{x-N\pi}\right)$$ leading to (see Theorem 10.3 p. 14 here and see achille's answer giving a route to prove it)

$$ \int_{-\infty}^{+\infty}f\left(x-\cot x\right)\mathrm{d}x=\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \tag2 $$

with $\displaystyle f(x)=\frac{1}{1+\left(\small{\dfrac\pi2 -x }\right)^2}$.

On the one hand, from $(2)$, $$ \begin{align} \int_{-\infty}^{+\infty}f\left(x-\cot x\right)\mathrm{d}x& =\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \\\\ &=\int_{-\infty}^{+\infty}\frac{1}{1+\left(\small{\dfrac\pi2 -x }\right)^2}\: \mathrm{d}x\\\\ &=\int_{-\infty}^{+\infty}\frac{1}{1+x^2}\: \mathrm{d}x\\\\ & =\pi \tag3 \end{align} $$ On the other hand, with the change of variable $x \to \dfrac\pi2 -x$, $$ \begin{align} \int_{-\infty}^{+\infty}\!\!\!f\left(x-\cot x\right)\mathrm{d}x & =\int_{-\infty}^{+\infty} \!\!\!f\left(\dfrac\pi2-x-\tan x\right)\mathrm{d}x \\\\ & =\int_{-\infty}^{+\infty}\frac{1}{1+\left(x+ \tan x \right)^2} \mathrm{d}x \tag4 \end{align} $$ Combining $(3)$ and $(4)$ gives

$$ \int_{-\infty}^{+\infty}\frac{1}{1+\left(x+ \tan x \right)^2} \mathrm{d}x=\pi. $$

Olivier Oloa
  • 120,989
  • This is very clever. But how does the theorem hold in the limit as $N \to \infty$? – Ron Gordon Nov 10 '14 at 21:19
  • 3
    Jesus, this is brilliant!! +1 But one question (maybe this is stupid question), like Ron G said, how to prove this one $$\cot x = \lim_{N\to +\infty} \left(\frac1x+\cdots+\frac1{x+N\pi}+\frac1{x-N\pi}\right)$$ Do you have any papers that can support that claim? – Venus Nov 11 '14 at 08:38
  • 3
    @Venus $$ \cot(x)={\Psi(1 - x/\pi) - \Psi(x/\pi) \over \pi} ={1 \over \pi},\left(1 - {2x \over \pi}\right)\sum_{n\ =\ 0}^{\infty}{1 \over \left(n + 1 - x/\pi\right)\left(n + x/\pi\right)} $$ – Felix Marin Nov 13 '14 at 19:31
  • 2
    @Venus Thanks. You may just take the logarithmic derivative of $$\displaystyle \sin x = x \prod_{n=1}^\infty \left( 1 - \frac{x^2}{(n\pi)^2} \right)$$ See here: http://dlmf.nist.gov/4.22 – Olivier Oloa Nov 13 '14 at 22:49
  • @RonGordon It seems achille has given a route for your legitimate question. Thanks. – Olivier Oloa Nov 13 '14 at 22:51
  • 1
    Thanks Oliver & @FelixMarin, very enlightening :-) – Venus Nov 14 '14 at 09:49
  • 2
    +1, This is exactly how I proved that identity, motivated by @orangekids' answer. And I am glad that finally a reference is available to me! Thank you! – Sangchul Lee Dec 08 '14 at 23:05
  • 1
    This was.so.cool. I'd give this 1k thumbs up, too bad the site can't support it – Victor Dec 31 '14 at 03:38
  • The $\cot$ expansion is also attributed to Mittag-Leffler – user170231 Jan 03 '23 at 18:49
47

Please view this as an supplement of Olivier's answer.

I will derive a sufficient condition on the meromorphic function involved which allow one to apply a result similar to that in Olivier's answer.

Let $\phi(z)$ be any meromorphic function over $\mathbb{C}$ which

  1. preserve the extended real line $\mathbb{R}^* = \mathbb{R} \cup \{ \infty \}$ in the sense: $$\begin{cases}\phi(\mathbb{R}) \subset \mathbb{R}^*\\ \phi^{-1}(\mathbb{R}) \subset \mathbb{R}\end{cases} \quad\implies\quad P \stackrel{def}{=} \phi^{-1}(\infty) = \big\{\, p \in \mathbb{C} : p \text{ poles of }\phi(z)\,\big\} \subset \mathbb{R} $$

  2. Split $\mathbb{R} \setminus P$ as a countable union of its connected components $\,\bigcup\limits_{n} ( a_n, b_n )\,$. Each connected component is an open interval $(a_n,b_n)$ and on such an interval, $\phi(z)$ increases from $-\infty$ at $a_n^{+} $ to $\infty$ at $b_n^{-}$.

  3. There exists an ascending chain of Jordan domains $D_1, D_2, \ldots$ that cover $\mathbb{C}$, $$\{ 0 \} \subset D_1 \subset D_2 \subset \cdots \quad\text{ with }\quad \bigcup_{k=1}^\infty D_k = \mathbb{C} $$ whose boundaries $\partial D_k$ are "well behaved", "diverge" to infinity and $| z - \phi(z)|$ is bounded on the boundaries. More precisely, let $$ \begin{cases} R_k &\stackrel{def}{=}& \inf \big\{\, |z| : z \in \partial D_k \,\big\}\\ L_k &\stackrel{def}{=}& \int_{\partial D_k} |dz| < \infty\\ M_k &\stackrel{def}{=}& \sup \big\{\, |z - \phi(z)| : z \in \partial D_k \,\big\} \end{cases} \quad\text{ and }\quad \begin{cases} \lim\limits_{k\to\infty} R_k = \infty\\ \lim\limits_{k\to\infty} \frac{L_k}{R_k^2} = 0\\ M = \sup_k M_k < \infty \end{cases} $$

Given such a meromorphic function $\phi(z)$ and any Lebesgue integrable function $f(x)$ on $\mathbb{R}$, we have following identity: $$ \int_{-\infty}^\infty f(\phi(x)) dx = \int_{-\infty}^\infty f(x) dx \tag{*1} $$

In order to prove this, we split our integral into a sum over the connected components of $\mathbb{R} \setminus P$. $$\int_\mathbb{R} f(\phi(x)) dx = \int_{\mathbb{R} \setminus P} f(\phi(x)) dx = \sum_n \int_{a_n}^{b_n} f(\phi(x)) dx $$ For any connected component $( a_n, b_n )$ of $\mathbb{R} \setminus P$ and $y \in \mathbb{R}$, consider the roots of the equation $\phi(x) = y$. Using properties $(1)$ and $(2)$ of $\phi(z)$, we find there is a unique root for the equation $y = \phi(x)$ over $( a_n, b_n )$. Let we call this root as $r_n(y)$. Change variable to $y = \phi(x)$, the integral becomes

$$\sum_n \int_{-\infty}^\infty f(y) \frac{d r_n(y)}{dy} dy = \int_{-\infty}^\infty f(y) \left(\sum_n \frac{d r_n(y)}{dy}\right) dy $$ We can use the obvious fact $\frac{d r_n(y)}{dy} \ge 0$ and dominated convergence theorem to justify the switching of order of summation and integral.

This means to prove $(*1)$, one only need to show $$\sum_n \frac{d r_n(y)}{dy} \stackrel{?}{=} 1\tag{*2}$$

For any $y \in \mathbb{R}$, let $R(y) = \phi^{-1}(y) \subset \mathbb{R}$ be the collection of roots of the equation $\phi(z) = y$.

Over any Jordan domain $D_k$, we have following expansion

$$\frac{\phi'(z)}{\phi(z) - y} = \sum_{r \in R(y) \cap D_k} \frac{1}{z - r} - \sum_{p \in P \cap D_k} \frac{1}{z - p} + \text{something analytic}$$

This leads to $$\sum_{r \in R(y)\cap D_k} r - \sum_{ p \in P \cap D_k} p = \frac{1}{2\pi i}\int_{\partial D_k} z \left(\frac{\phi'(z)}{\phi(z) - y}\right) dz$$

As long as $R(y) \cap \partial D_k = \emptyset$, we can differentiate both sides and get

$$\begin{align} \sum_{r_n(y) \in D_k} \frac{dr_n(y)}{dy} &= \frac{1}{2\pi i}\int_{\partial D_k} z \left(\frac{\phi'(z)}{(\phi(z) - y)^2}\right) dz = -\frac{1}{2\pi i}\int_{\partial D_k} z \frac{d}{dz}\left(\frac{1}{\phi(z)-y}\right) dz\\ &= \frac{1}{2\pi i}\int_{\partial D_k}\frac{dz}{\phi(z) - y} \end{align} $$ For those $k$ large enough such that $R_k > 2(M+|y|)$, we can expand the integrand in last line as

$$\frac{1}{\phi(z) - y} = \frac{1}{z - (y + z - \phi(z))} = \frac{1}{z} + \sum_{j=1}^\infty \frac{(y + z - \phi(z))^j}{z^{j+1}}$$ and obtain a bound

$$\left|\left(\sum_{r_n(y) \in D_k} \frac{dr_n(y)}{dy} \right) - 1\right| \le \frac{1}{2\pi}\sum_{j=1}^\infty \int_{\partial D_k} \frac{(|y| + |z-\phi(z)|)^j}{|z|^{j+1}} |dz|\\ \le \frac{(M + |y|)L_k}{2\pi R_k^2}\sum_{j=0}^\infty\left(\frac{M+|y|}{R_k}\right)^j \le \frac{M + |y|}{\pi}\frac{L_k}{R_k^2} $$ Since $\lim\limits_{k\to\infty} \frac{L_k}{R_k^2} = 0$, this leads to

$$\sum_n \frac{dr_n(y)}{dy} = \lim_{k\to\infty} \sum_{r_n(y) \in D_k} \frac{dr_n(y)}{dy} = 1$$

This justifies $(*2)$ and hence $(*1)$ is proved. Notice all the $\frac{dr_n(y)}{dy}$ are positive, there is no issue in rearranging the order of summation in last line.

Back to the original problem of evaluating

$$\int_{-\infty}^\infty \frac{1}{1+(x+\tan x)^2} dx$$

One can take $\phi(z)$ as $z + \tan z$ and $f(x)$ as $\frac{1}{1+x^2}$. It is easy to see $\phi(z)$ satisfies:

  • Condition $(1)$ - For any $y \in \mathbb{R}$ and $u + iv \in \mathbb{C} \setminus \mathbb{R}$, we have $$\begin{align} \Im (\phi(u + iv) - y ) &= v + \Im\tan(u+iv) = v + \Im\frac{\tan u + i\tanh v}{1 - i\tan u\tanh v}\\ &= v + \tanh v\frac{1 + \tan^2 u}{1 + \tan^2 u\tanh^2 v} \ne 0 \end{align}$$

  • Condition $(2)$ - obvious.

  • Condition $(3)$. - Let $D_k$ to be the square $$D_k = \big\{\, u + v i \in \mathbb{C} : |u|, |v| \le k \pi \,\big\}$$ It is not hard to show $|z - \phi(z)| = |\tan z|$ is bounded above by $\frac{1}{\tanh k\pi}$ on $\partial D_k$.

Combine these, we can apply $(*1)$ and deduce

$$ \int_{-\infty}^\infty \frac{1}{1+(x+\tan x)^2} dx = \int_{-\infty}^\infty \frac{1}{1+x^2} dx = \pi $$

achille hui
  • 122,701
  • 4
    To be honest, I don't understand almost all of your answer, but it looks very cool, so +1. :-) – Venus Nov 11 '14 at 14:21
  • as a physicist i really have to get used to this "pure math style" proof, but after doing so i have to say: Really nice work! – tired Nov 11 '14 at 15:59
  • I'm thinking this theorem to solve my homework's problem: http://math.stackexchange.com/q/1017074/146687 Is it possible? – Venus Nov 11 '14 at 17:05
  • @Venus, I don't think so. To apply this theorem, the integrand need to have the form of composition of two function $f \circ \phi$. Furthermore, $\phi(x)$ need to looks like $x + $ something... – achille hui Nov 11 '14 at 17:22
  • 1
    Oh no... I'm in trouble now :-( – Venus Nov 11 '14 at 17:24
14

This integral can also be evaluated by standard contour integration.

Denote $f(z)=i+ \tan z + z$, using the identity: $$\tan(x+yi) = \frac{\sin(2x)}{\cosh(2y)+\cos(2x)} + \frac{\sinh(2y)}{\cosh(2y)+\cos(2x)}i $$ it can be seen that $f(z) = 0$ has no root in the upper half plane.

Take $R$ to be a large half-integer (to avoid poles of $\tan x$), then $$\tag{1}\int_{-R}^R \frac{1}{f(x)} dx + \int_{C(R)} \frac{1}{f(z)} dz = 0$$ here $C(R)$ is a large semi-circle in upper-half plane with radius $R$. It is a nice exercise to show there exists an absolute constant $C$ such that $|\tan z| < C$ on all $C(R)$, so $$\lim_{R\to \infty} \int_{C(R)} \frac{1}{f(z)} dz = \lim_{R\to \infty} \int_{C(R)} \frac{1}{z} dz = \pi i$$

Taking imaginary parts of $(1)$: $$\lim_{R\to \infty} \int_{-R}^R \frac{-1}{1+(x+\tan x)^2} dx +\pi = 0$$

this concludes the proof.

pisco
  • 18,983
  • Could you please elaborate a little more on why the integrand on the last step approaches to $0$ as $n \to \infty$ ? – clbj23 Jun 20 '21 at 00:20
  • @CLBJ_23 Since the integrand is of $O(1/z^2)$, and the length of $4n$, so $$\left|\int_{S_n} \left( \frac{1}{i-\tan z -z }+\frac{1}{z} \right) dz\right| \leq 4n O(\frac{1}{n^2}) \to 0$$ – pisco Jun 20 '21 at 07:33
  • First, thanks for taking the time to reply. The part I don't quite get is how from the fact that $\tan z$ is uniformly bounded on $S_n$, we deduce that the LHS is of $O(1/z^2)$ order. Would you mind shed some light here too? Thanks a lot. – clbj23 Jun 21 '21 at 20:32
  • @CLBJ_23 $$\frac{1}{i-\tan z -z }+\frac{1}{z} = \frac{i-\tan z}{z(i-\tan z -z)}$$ note the denominator has degree $2$ in $z$, and $\tan z$ is bounded, so it's $O(1/z^2)$. – pisco Jun 21 '21 at 21:22
  • All clear now - much appreciated! – clbj23 Jun 21 '21 at 21:27
13

The Inverse Function Theorem gives us $$ \int_{-\infty}^{+\infty}f(g(x))\,\mathrm{d}x=\int_{-\infty}^{+\infty}\sum_{g(x)=\alpha}\frac1{\left|g'(x)\right|}\,f(\alpha)\,\mathrm{d}\alpha\tag{1} $$ If we integrate along squares, centered at the origin, whose sides are parallel to the $x$ and $y$ axes with length $2k\pi$, as $k\to\infty$, we get $$ \begin{align} \sum_{x+\tan(x)=\alpha}\frac1{1+\sec^2(x)} &=\frac1{2\pi i}\oint\frac{\mathrm{d}z}{z+\tan(z)-\alpha}\\[6pt] &=1\tag{2} \end{align} $$ Letting $g(x)=x+\tan(x)$, $(1)$ and $(2)$ give $$ \int_{-\infty}^{+\infty}f(x+\tan(x))\,\mathrm{d}x=\int_{-\infty}^{+\infty}f(x)\,\mathrm{d}x\tag{3} $$ Therefore, applying $(3)$ to $f(x)=\frac1{1+x^2}$ yields $$ \begin{align} \int_{-\infty}^{+\infty}\frac{\mathrm{d}x}{1+(x+\tan(x))^2} &=\int_{-\infty}^{+\infty}\frac{\mathrm{d}x}{1+x^2}\\[6pt] &=\pi\tag{4} \end{align} $$

robjohn
  • 345,667
  • 1
    Could you elaborate on the origin of the 1st line? I cannot figure out how to derive it from inverse function theorem. – pisco Aug 20 '17 at 06:58
  • Anyway, this is a very ingenious answer. It is interesting to see what happens when $g(x) = x - \tan x$, my method and your method both fail at some point, perhaps that integral does not admit a simple closed form. – pisco Aug 20 '17 at 07:03
  • @pisco125: break the real line into pieces where $g(x)$ is monotonic and apply the inverse function theorem on each piece. Each piece gives a term in the sum where $g(x)=\alpha$. – robjohn Aug 20 '17 at 15:49
  • @pisco125: Did you have a specific question using $g(x)=x-\tan(x)$? Note that $\frac1{|g'(x)|^2}=\frac1{\tan^2(x)}$. I haven't computed the corresponding sum for the integral, but I think it should be possible. It won't be $1$ in this case. – robjohn Aug 20 '17 at 21:29
  • In (1), the corresponding root of $g(x)=\alpha$ has to be real. However, $x-\tan x = \alpha$ in general has two complex roots. When using contour integration to calculate the sum in (2), those complex roots are involved. So the sum in (1) really involves the inverse of $x-\tan x$ to some extend, this complicated the matter. The above problem does not happen for $x+\tan x = \alpha$ because all its root are real. – pisco Aug 21 '17 at 03:31
  • I'm a bit confused because what you seem to be describing is a sum of transformed integrals, not an integral over the real line of a sum. – Random Variable Aug 21 '17 at 12:52
  • @RandomVariable: Note that $x+\tan(x)$ runs through the real line once every $\left(\left(k-\frac12\right)\pi,\left(k+\frac12\right)\pi\right)$. We're adding up the contributions for each of those intervals. – robjohn Aug 21 '17 at 13:28
  • @pisco125: the residues at those two zeros will need to be subtracted, which keeps the sum from being $1$. The sum of all the residues is still $1$, but the sum of the residues on the real line is not. – robjohn Aug 21 '17 at 15:27
  • @pisco125: yes, the total of all the residues is $1$, but subtracting the two singularities off the real axis gives the sum to be given by the function $$\sum\limits_{\substack{x-\tan(x)=\alpha\x\in\mathbb{R}}}\frac{1}{\tan^2(x)}=-1-\sum\limits_{\substack{x-\tan(x)=\alpha\x\not\in\mathbb{R}}}\frac1{\tan^2(x)}$$ where the sum on the right is over the two roots not on the real axis. – robjohn Aug 22 '17 at 11:16
  • If you break up the integral $\int_{-\infty}^{\infty} f \left(g(x)\right) \mathrm dx$ into a series of integrals and make the substitution $ \alpha=g(x)$ in each integral, how do you end up with an integral over the real axis of a series? Shouldn't you end up with a series of transformed integrals? – Random Variable Aug 18 '19 at 21:43
  • The left side of $(1)$ integrates $f$ over an infinite sequence of intervals $I_k=\left[\left(k-\frac12\right)!\pi,\left(k+\frac12\right)!\pi\right]$ where $g(x)$ ranges monotonically from $-\infty$ to $\infty$. The integral over $I_k$ is $$\int_{I_k}f(x),\mathrm{d}x=\int_{-\infty}^{+\infty}\left.\frac1{\left|g'(x)\right|}\right|_{\substack{g(x)=\alpha\x\in I_k}},f(\alpha),\mathrm{d}\alpha$$ – robjohn Aug 19 '19 at 00:05
  • The point of $g=x+\tan(x)$ is that $$\sum_{k\in\mathbb{Z}}\left.\frac1{\left|g'(x)\right|}\right|{\substack{g(x)=\alpha\x\in I_k}}=1$$ Summing over $k\in\mathbb{Z}$, we get $$\begin{align}\int{-\infty}^{+\infty}f(x),\mathrm{d}x &=\sum_{k\in\mathbb{Z}}\int_{I_k}f(x),\mathrm{d}x\ &=\sum_{k\in\mathbb{Z}}\int_{-\infty}^{+\infty}\left.\frac1{\left|g'(x)\right|}\right|{\substack{g(x)=\alpha\x\in I_k}},f(\alpha),\mathrm{d}\alpha\ &=\int{-\infty}^{+\infty}f(\alpha),\mathrm{d}\alpha\end{align}$$ – robjohn Aug 19 '19 at 00:05
  • My last comment was poorly worded. What I meant was that I didn't know you had placed conditions on $g(x)$ because no conditions are stated in your answer. That's why I didn't understand $(1)$. – Random Variable Aug 20 '19 at 00:09
  • @RandomVariable: just before equation $(3)$, it says: "Letting $g(x)=x+\tan(x)$, ..." – robjohn Aug 20 '19 at 00:38
  • I'm referring specifically to equation $(1)$, which is stated without any mention of conditions on $g(x)$. – Random Variable Aug 20 '19 at 01:04
  • Well, $(1)$ is valid for any $g$ as long as the reciprocal of the derivative is integrable. – robjohn Aug 20 '19 at 01:28
  • It would seem to me that a necessary condition for equation $(1)$ is that the real axis can be divided into intervals where $g(x)$ increases monotonically from $-\infty$ to $\infty$. That's not a necessary condition? – Random Variable Aug 20 '19 at 02:29
  • Not necessarily. Let $g(x)=e^{-x^2}$, then $(1)$ becomes $$ \int_{-\infty}^\infty f!\left(e^{-x^2}\right)\mathrm{d}x=\int_0^1\frac1{\alpha\sqrt{-\log(\alpha)}}f(\alpha),\mathrm{d}\alpha $$ – robjohn Aug 20 '19 at 05:38
  • But the integration limits on the right side of equation $(1)$ are ${-\infty}$ and ${\infty}$. – Random Variable Aug 20 '19 at 15:34
  • Yes, and $\frac1{|g'|}=\frac1{2|x|e^{-x^2}}=\frac1{2\alpha\sqrt{-\log(\alpha)}}$, so why do we have $\frac1{\alpha\sqrt{-\log(\alpha)}}$ in the integral? Read the sum on the righthand side carefully. – robjohn Aug 20 '19 at 16:48
  • It's because $\alpha = e^{-x^{2}}$ is not invertible on $(-\infty, \infty)$, but $\int_{-\infty}^{\infty} e^{-x^{2}} \mathrm dx = 2 \int_{0}^{\infty} e^{-x^{2}} , \mathrm dx$. Unfortunately, I don't know how that helps to explain why the interval of integration on the right side of equation $(1)$ is $(-\infty, \infty)$ regardless of what the substitution $\alpha=g(x)$ does to the limits of integration. – Random Variable Aug 20 '19 at 19:02
  • @RandomVariable: The limits of integration are $-\infty$ and $+\infty$ to accommodate a $g$ whose range is $(-\infty,+\infty)$. For a $g$ with a smaller range, the sum on the right will be an empty sum (thus $0$) for values of $\alpha$ outside the range of $g$. – robjohn Aug 20 '19 at 19:27
  • Now it makes sense. Thanks. – Random Variable Aug 20 '19 at 20:57
  • @TymaGaidash: Where are you getting $a_j$? Note that $h(a)=\sum\limits_{g(x)=a}\frac1{|g'(x)|}$ is a function of $a$. The integral we want is $\int_{-\infty}^\infty h(a)f(a),\mathrm{d}a$. – robjohn Jan 15 '23 at 06:08
  • @robjohn It is a bit hard to visualize how write out $\sum_{g(x)=a}\frac1{|g’(x)|}$, so $g(x)=a\implies x=a_j $ being the $j$th solution. By write out, it means $\sum_n w_n=w_1+\dots +w_i$. Thanks – Тyma Gaidash Jan 15 '23 at 12:12
  • 1
    @TymaGaidash: There is one $a$. There may be a set of $x_j$ so that $g(x_j)=a$, we add up $h(a)=\sum\limits_j\frac1{|g'(x_j)|}$. – robjohn Jan 15 '23 at 14:16
  • Thanks for the clarification. In that case we factor out $\frac1{|g’(x_j)|}$ from the integral since it is a constant wrt $a$. – Тyma Gaidash Jan 15 '23 at 14:56
  • @TymaGaidash: yes, $\sum\limits_{g(x)=\alpha}\frac1{|g'(x)|}=1$ for all $\alpha$. This is what is special about $g(x)=x+\tan(x)$. – robjohn Jan 15 '23 at 19:07