5

Professor gave me the problem that calculates below real integral using complex analysis.

$$\int_0^{2\pi} \tan \frac{\theta}8 d\theta $$

Actually this integral can easily be calculated just substituting $t=\cos\frac{\theta}8$, but the professor requested me to calculate this integral using complex analysis.

As far as I know, if we want to calculate a real integral that consists of trigonometric functions, we can substitute $z=e^{i\theta}$ then $\cos\theta=\dfrac{z+\frac 1z}2$ and $\sin\theta=\dfrac{z-\frac 1 z}{2i}$ where the contour is the unit circle.

But $\frac \theta 8$ holds me back. How can I treat this? I tried to substitute $z^{1/8}=e^{i\theta/8}$, but still challenging.

TheSimpliFire
  • 28,628
  • 10
  • 66
  • 140
Krang Lee
  • 195

2 Answers2

7

As you have identified the issue of branch cuts when taking a fractional power, the problem may be easier to handle using a line integral rather than a closed contour: \begin{align}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\int_0^{2\pi}\tan\frac\theta8\,d\theta&=4\int_0^{\pi/2}\tan\frac t2\,dt\tag{$\theta=4t$}\\&=-4i\int_0^{\pi/2}\frac{e^{it}-1}{e^{it}+1}\,dt\tag{complex expansion}\\&=-4\int_\gamma\frac{z-1}{z(z+1)}\,dz\tag{$\gamma(t)=e^{it},t\in[0,\pi/2]$}\\&=-4\int_\gamma\left(\frac2{z+1}-\frac1z\right)\,dz\tag{partial fractions}\\&=-4\left[2\log(z+1)-\log z\right]_{e^{i0}}^{e^{i\pi/2}}\tag{FTC for line integrals}\\&=-4(2\log(1+i)-\log i-2\log2)\\&=4\log 2\end{align}

TheSimpliFire
  • 28,628
  • 10
  • 66
  • 140
0

Long comment This can indeed be accomplished with the help of the residue theorem, although it requires a lot of massaging of the starting integral. We can begin by rewriting

$$\begin{align*} I &= \int_0^{2\pi} \tan\frac t8 \, dt \\ &= 4 \int_0^\tfrac\pi2 \tan\frac t2 \, dt & t\to4t;\text{ symmetry} \\ &= 4 \int_0^\infty \tan\left(\frac12 \arctan u\right) \, \frac{du}{1+u^2} & u=\tan t \\ &= 2\pi - 4 \underbrace{\int_0^\infty \overbrace{\frac{\arctan u}{\sqrt{1+u^2} \left(1+\sqrt{1+u^2}\right)}}^{f(u)} \, du}_J & \text{by parts} \end{align*}$$

The integral of $f$ can be done by considering $f(u)\log u$ on an appropriate keyhole contour. On the other hand, we may slightly simplify the integrand by partially evaluating as follows (although the resulting integral's evaluation via residues is a bit more complicated due to introduced poles):

$$\begin{align*} J &= \int_0^\infty \int_0^1 \frac u{1+u^2v^2} \, \frac{dv\,du}{\sqrt{1+u^2} \left(1+\sqrt{1+u^2}\right)} \\ &= \int_0^1 \int_1^\infty \frac{dU\,dv}{(U+1) \left(1+\left(U^2-1\right)v^2\right)} & \text{Fubini; }U=\sqrt{1+u^2} \\ &= \int_0^1 \left[\frac{v\arccos v}{\sqrt{1-v^2}} - \log(2v)\right] \, dv \\ &= 1 - \log2 + \int_0^\infty \frac{w \left(\frac\pi2-\arctan w\right)}{\left(1+w^2\right)^{3/2}} \, dw & w=\frac v{\sqrt{1-v^2}} \\ &= 1 - \log2 + \int_0^\infty \overbrace{\frac{\arctan w}{\left(1+w^2\right)^{3/2}}}^{g(w)} \, dw & w\to\frac1w \end{align*}$$

Again we may consider the integral of $g(w)\log w$; see here and here for similar exercises.

Either way, this particular procedure generates more tricky integrals. Applying the residue theorem to the two cases above leads to the following integral identities that IMO are more trouble than they're worth:

$$\begin{align*} \int_0^\infty f(u)\,du &= 1 + \frac1\pi \int_0^1 \frac{u \log u \log\frac{1+u}{1-u}}{\sqrt{1-u^2}} \, du = \frac\pi2-\log2 \\[2ex] \int_0^\infty g(w)\,dw &= \frac1\pi \int_0^1 \frac{w \log w \log\frac{1-w}{1+w}}{\left(1-w^2\right)^{3/2}} \, dw = \frac\pi2-1 \end{align*}$$

user170231
  • 27,172