15

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

I made some useful progress, but that integral seems strangely wild and difficult.

By the way the $\frac{\pi}{e}$ on the right hand side has a very lovely integral representation, but I don't know how that might be useful.

I got stuck at evaluating this very cool looking series, that is highly related to a series representation of cotangent, derived using Euler's product formula

If that series evaluates to some composition of trigonometric functions, the integral will be solved.

Martin.s
  • 1
  • 1
  • 22

3 Answers3

19

Let $I = \int_{-\pi/2}^{\pi/2} \sin(\tan(\tan(x)))\tan(x) \, \mathrm{d}x$ denote OP's integral. Then

\begin{align*} I &= \int_{-\infty}^{\infty} \frac{x \sin(\tan x)}{1+x^2} \, \mathrm{d}x \tag{$\tan x \mapsto x$} \\ &= \lim_{N\to\infty} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \biggl[ \sum_{|k|\leq N} \frac{x+k\pi}{1+(x+k\pi)^2}\biggr] \sin(\tan x) \, \mathrm{d}x \\ &= \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \operatorname{Re}[\cot(x+i)] \sin(\tan x) \, \mathrm{d}x \\ &= \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{(1-a^2)\tan x}{x^2 + a^2} \sin(\tan x) \, \mathrm{d}x, \end{align*}

where $a = \tanh 1 = \frac{e^2 - 1}{e^2 + 1}$ and we invoked the partial fraction decomposition of the cotangent in the third step. Further substitution $\tan x \mapsto x$ then gives

\begin{align*} I &= \int_{-\infty}^{\infty} \frac{(1-a^2)x \sin x}{(x^2+1)(x^2 + a^2)} \, \mathrm{d}x \\ &= \int_{-\infty}^{\infty} \left( \frac{1}{x^2 + a^2} - \frac{1}{x^2 + 1} \right) x \sin x \, \mathrm{d}x \\ &= \pi \left( e^{-a} - e^{-1} \right), \end{align*}

where we utilized the formula $\int_{-\infty}^{\infty} \frac{x \sin x}{x^2 + b^2} \, \mathrm{d}x = \pi e^{-b}$ for $b \geq 0$ in the last line.

Sangchul Lee
  • 167,468
13

Assume that a function $f(z)$ has a Maclaurin series expansion that converges absolutely on the unit circle (excluding perhaps at some isolated points).

Then for $\alpha \ge 0$ we have

$$ \begin{align} \int_{-\infty}^{\infty} \frac{x}{\alpha^{2}+x^{2}} \, \left(f(e^{ix})-f(e^{-ix}) \right) \, \mathrm dx &= 2i \int_{-\infty}^{\infty} \frac{x}{\alpha^{2}+x^{2}} \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} \, \sin(nx) \, \mathrm dx \\ &= 2i \int_{-\infty}^{\infty} \frac{x}{\alpha^{2}+x^{2}} \sum_{n=\color{red}{1}}^{\infty} \frac{f^{(n)}(0)}{n!} \, \sin(nx) \, \mathrm dx \\ &= 2i \sum_{n=1}^{\infty} \frac{f^{(n)}(0)}{n!} \int_{-\infty}^{\infty} \frac{x}{\alpha^{2}+x^{2}} \, \sin(nx) \, \mathrm dx \\ &= 2\pi i \sum_{n=1}^{\infty} \frac{f^{(n)}(0)}{n!} \, e^{-\alpha n} \\ &= 2\pi i \left( f(e^{-\alpha})-f(0) \right). \end{align}$$

(A way to justify switching the order of summation and integration can be found here.)

If we assume that $$f(z) = \exp \left(\frac{z^{2}-1}{z^{2}+1} \right)$$ is such a function, then

$$ \begin{align} I &= \int_{-\pi/2}^{\pi/2}\sin \left((\tan(\tan x) \right))\tan(x) \, \mathrm dx \\ &= \int_{-\infty}^{\infty} \frac{u}{1+u^{2}} \, \sin \left(\tan u \right) \, \mathrm du \\ &= \frac{1}{2i} \int_{0}^{\infty}\frac{u}{1+u^{2}} \, \left(\exp \left(\frac{e^{2iu}-1}{e^{2iu}+1} \right) - \exp \left(\frac{e^{-2iu}-1}{e^{-2iu}+1} \right) \right) \, \mathrm du \\ &= \pi \left(\exp \left(\frac{e^{-2}-1}{e^{-2}+1} \right) - \frac{1}{e} \right) \\ &= \pi \left(\exp \left(- \frac{e^{2}-1}{e^{2}+1} \right)-\frac{1}{e} \right), \end{align}$$ which according to Sangchul Lee's answer is the correct value.

Unfortunately, I'm not sure how the Macluarin series of $\exp \left(\frac{z^{2}-1}{z^{2}+1} \right) $ behaves on its boundary of convergence since I don't know the explicit formula for its coefficients.

  • Great answer thanks alot – Martin.s Oct 12 '23 at 03:33
  • 2
    If it could help you $$\exp \left(\frac{t-1}{t+1} \right)=\sum_{n=0}^\infty a_n,t^n$$ with $$a_n=-\frac{n-2}{n}\left(2a_{n-1}+a_{n-2}\right) \qquad a_0=\frac 1e \qquad a_1=\frac 2e $$ – Claude Leibovici Oct 12 '23 at 10:14
  • 1
    @ClaudeLeibovici A recursive formula for the coefficients might be enough to determine the behavior on the boundary. I'm not sure. – Random Variable Oct 12 '23 at 11:49
  • 1
    I wrote this because I like your answer and suppose that this could be of some use. Cheers :-) – Claude Leibovici Oct 12 '23 at 11:52
  • I think it has some problem in the integral you write above, you will notice that the denominator in the term

    $\dfrac{e^{2iu}-1}{e^{2iu}+1}$

    that appears, is 0 an infinite number of times, specifically in $u=k\pi + \frac {\pi}{2}$

    – Martin.s Jan 04 '24 at 05:17
  • @Willbyers The real and imaginary parts of $\exp \left(\frac{e^{2iu}-1}{e^{2iu}+1} \right) = \exp (i \tan u) = \cos(\tan u) + i \sin(\tan u) $ remain bounded between $-1$ and $1$ as you approach one of those points. – Random Variable Jan 04 '24 at 06:33
0

Consider the substitution $ u=\tan x $, then the original integral becomes

$$ I = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin\tan\tan x \cdot \tan x \, dx = \int_{-\infty}^{\infty} \frac{u\sin\tan u}{1+u^2} \, du. $$

This integral can be handled using the residue theorem. Consider the complex variable function $ f(z) = \frac{ze^{i\tan z}}{1+z^2} $ integrated along the rectangular contour shown below.

$\textbf{Contour for}$ $ f(z) $ $\textbf{integral}$

enter image description here This rectangular contour has height $ a = \sqrt{R} $, and small circular arcs of radius $ \epsilon $ around all the poles $ z = (k+\frac{1}{2})\pi $, where $ k $ is an integer. Let $ z = x+iy $, then directly calculate

$$ e^{i\tan z} = e^{i\tan(x+iy)} = \exp\left(-\frac{(1+\tan^2x)\tanh y}{1+\tan^2x\tanh^2y}+i\frac{(1-\tanh^2y)\tan x}{1+\tan^2x\tanh^2y}\right) = \exp\left(-\frac{\sinh 2y}{\cos 2x+\cosh 2y}+i\frac{\sin 2x}{\cos 2x+\cosh 2y}\right). $$

In the upper half-plane $ y \ge 0 $, we have

$$ |e^{i\tan z}| = \exp\left(-\frac{\sinh 2y}{\cos 2x+\cosh 2y}\right) \le 1. $$

This means that as $ R \to +\infty $, the integrals along the two sides $ z = \pm R + iy $ of the rectangular contour satisfy

$$ \left|\int_{\pm} f(z) \, dz\right| \le \int_{\pm} |f(z)| \, |dz| \le \int_0^{\sqrt{R}} \left| \frac{z}{1+z^2} \right| \, dy \sim \frac{1}{\sqrt{R}} \to 0. $$

And all the integrals along the small circular arcs tend to 0 as $ \epsilon \to 0^+ $.

Now, the integrals along the bottom edge $ y = 0 $ of the rectangle and the top edge $ y = \sqrt{R} $ remain to be analyzed:

In the limit $ R \to +\infty $, the former (in the sense of Cauchy principal value) gives $ \mathscr{P} \int_{-\infty}^{\infty} \frac{xe^{i\tan x}}{1+x^2} \, dx $.

And the latter (using $ y = \sqrt{R} \to +\infty $, the previous result gives $ e^{i\tan z} \to 1/e $)

$$ \lim_{R\to+\infty} \int_{y=\sqrt{R}} f(z) \, dz = -\frac{1}{e} \lim_{R\to+\infty} \int_{-R}^{R} \frac{x+i\sqrt{R}}{1+(x+i\sqrt{R})^2} \, dx. $$

Applying the residue theorem to the entire contour, we obtain

$$ \mathscr{P} \int_{-\infty}^{\infty} \frac{xe^{i\tan x}}{1+x^2} \, dx - \frac{1}{e} \lim_{R\to+\infty} \int_{-R}^{R} \frac{x+i\sqrt{R}}{1+(x+i\sqrt{R})^2} \, dx = 2\pi i \operatorname{Res}_{z=i} f(z). $$

Where $ \operatorname{Res}_{z=i} f(z) = e^{-\tanh 1}/2 $.

Wait a moment! We still don't know the second term on the left-hand side—right! So, let's introduce $ g(z) = \frac{z}{1+z^2} $ and repeat the same calculation on a completely similar rectangular contour (excluding the small circular arcs).

$\textbf{Contour for}$ $ g(z) $ $\textbf{integral}$

enter image description here Based on the same analysis (let's skip that), we obtain the residue theorem

$$ \mathscr{P} \int_{-\infty}^{\infty} \frac{x}{1+x^2} \, dx - \lim_{R\to+\infty} \int_{-R}^{R} \frac{x+i\sqrt{R}}{1+(x+i\sqrt{R})^2} \, dx = 2\pi i \operatorname{Res}_{z=i} g(z). $$

Where $ \operatorname{Res}_{z=i} g(z) = 1/2 $, and the principal value integral of the first term on the left-hand side is 0 since it's an odd function.

Now, using the equations obtained from the two residue theorems to eliminate the unknown terms, we finally get

$$ \mathscr{P} \int_{-\infty}^{\infty} \frac{xe^{i\tan x}}{1+x^2} \, dx = i\pi \left( e^{-\tanh 1} - e^{-1} \right). $$

Taking the imaginary part yields the desired integral

$$ I = \int_{-\infty}^{\infty} \frac{x\sin\tan x}{1+x^2} \, dx = \pi \left( e^{-\tanh 1} - e^{-1} \right). $$

It's easy to verify that this result is consistent with the problem statement, given $ \tanh 1 = \frac{e-e^{-1}}{e+e^{-1}} = \frac{e^2-1}{e^2+1} $.

Sbsty
  • 413
  • 11