Jason Yuhas

2021-12-31

Find the value of ${\int }_{-\pi }^{\pi }\left(4\mathrm{arctan}\left({e}^{x}\right)-\pi \right)dx$
Ive

Mary Goodson

Expert

Let $f\left(x\right)=4\mathrm{arctan}\left({e}^{x}\right)-\pi$. Then since $\mathrm{arctan}u+\mathrm{arctan}\frac{1}{u}=\frac{\pi }{2}$ (∗):
$-f\left(-x\right)=-4{\mathrm{arctan}e}^{-x}+\pi =-4\left(\frac{\pi }{2}-{\mathrm{arctan}e}^{x}\right)+\pi =4{\mathrm{arctan}e}^{x}-\pi =f\left(x\right)$
(∗) can be proved geometrically: $\mathrm{arctan}u$ is the angle with opposite side u and adjacent side 1, and $\mathrm{arctan}\frac{1}{u}$ is the other acute angle in the right triangle. Their sum must thus be $\frac{\pi }{2}$. Alternatively, differentiate the left-hand side and show it is constant, then choose a convenient value for u since any u works, say u=1.

autormtak0w

Expert

Write the integral as
$I={\int }_{-\pi }^{0}4\mathrm{arctan}\left({e}^{x}\right)-\pi dx+{\int }_{0}^{\pi }4\mathrm{arctan}\left({e}^{x}\right)-\pi dx$
Upon making the substitution u=−x, we find that
$I=-{\int }_{\pi }^{0}4\mathrm{arctan}\left({e}^{-u}\right)-\pi du+{\int }_{0}^{\pi }4\mathrm{arctan}\left({e}^{x}\right)-\pi dx$
$={\int }_{0}^{\pi }4\mathrm{arctan}\left({e}^{-x}\right)-\pi dx+{\int }_{0}^{\pi }4\mathrm{arctan}\left({e}^{x}\right)-\pi dx$
$={\int }_{0}^{\pi }4\left(\mathrm{arctan}\left({e}^{x}\right)+\mathrm{arctan}\left({e}^{-x}\right)\right)-2\pi dx$
Note that

In this case, $x\in \left[0,\pi \right]$, so $u={e}^{x}>0$ and $\mathrm{arctan}\left(u\right)+\mathrm{arctan}\left(\frac{1}{u}\right)=\frac{\pi }{2}$, meaning that the integrand is the zero function. Hence, I=0.

karton

Expert

The answer expands on my comment, which remarked that the integrand of the given integral is twice the Gudermannian function, gd, which appears most famously in the equation governing the Mercator projection in cartography.
NSK
Differentiating the integrand gives
$\frac{d}{dx}\left[4\mathrm{arctan}\left({e}^{x}\right)-\pi \right]=4\cdot \frac{1}{1+\left({e}^{x}{\right)}^{2}}\cdot {e}^{x}=\frac{4}{{e}^{x}+{e}^{-x}}=2\mathrm{sec}hx$
In particular, this derivative is even. Since evaluating the integrand at x=0 gives $4\mathrm{arctan}{e}^{0}-\pi =0$ the integrand is odd; since the integral is taken over an interval symmetric around 0, by symmetry
${\int }_{-a}^{a}\left[4\mathrm{arctan}\left({e}^{x}\right)-\pi \right]dx=0$
for any a: In particular, the occurrence of $\pi$ in the limits of the integral is something of a red herring.

Do you have a similar question?

Recalculate according to your conditions!