1. ## Integral Section

Well, I decided to create a section so that we may collect some integrals that it seems to us, nice, hard, etc.

Integral #1

$\forall a>0$, we have that $I(a)=\int_0^{\pi/2}\frac{\ln(1+a\sin^2x)}{\sin^2x}\,dx=\pi\left(\sq rt{a+1}-1\right)$

Proof:

$I'(a)=\int_0^{\pi/2}\frac1{1+a\sin^2x}\,dx$. Let's set $u=\tan x$ and the integral becomes to

$I'(a)=\int_0^\infty\frac1{1+(a+1)u^2}\,du=\frac\pi {2\sqrt{a+1}}\,\therefore\,I(a)=\pi\sqrt{a+1}+k$. Now plug $I(0)=0\implies k=-\pi$, which finally yields

$\color{red}\boxed{\color{blue}I(a)=\pi\left(\sqrt{ a+1}-1\right)}$

2. $\int_0^{\infty} \frac{dx}{x^n+1} = \frac{\pi/n}{\sin (\pi/n)}$ for $n\geq 2 \mbox{ and }n\in \mathbb{Z}$.

3. But you need to show us the proof

4. Originally Posted by Krizalid
But you need to show us the proof
Okay, but it uses Complex Analysis.

The brilliant move here is not the computation but the contour we chose. Consider a counter $\gamma$ composed of 3 parts: $\gamma_1,\gamma_2,\gamma_3$ in the complex plane. Let $\gamma_1$ be the horizontal section on the real axis from $0\mbox{ to }R$. Let $\gamma_2$ be the counterclockwise rotation by $\frac{2\pi}{n}$. And $\gamma_3$ be the line from the ending point of $\gamma_1$ to the origin. So $\gamma$ is a piecewise smooth simple closed curve.

Thus, consider $f(z) = \frac{1}{z^n+1}$.

By the residue theorem we have,
$\int_0^R \frac{dx}{x^n+1} + \int_0^{2\pi/n} \frac{Rie^{i\theta}d\theta}{R^ne^{in\theta}+1} - \int_0^R \frac{e^{2\pi i/n}dt}{R^n e^{2\pi i/n\cdot n}+1} = 2\pi i\sum \mbox{res}$.

Now the only pole within the contour is when $z^n+1=0\implies z=e^{\pi i/n}$ by de Moiver's theorem. The residue is $\frac{1}{nz^{n-1}}\big|_{e^{\pi i/n}} = - \frac{1}{n}e^{\pi i/n}$.

Thus,
$\int_0^R \frac{dx}{x^n+1} + \int_0^{2\pi/n} \frac{Rie^{i\theta}d\theta}{R^ne^{in\theta}+1} - \int_0^R \frac{e^{2\pi i/n}dt}{R^n e^{2\pi i/n\cdot n}+1} =- \frac{2\pi i}{n}e^{\pi i/n}$.

Now, $\int_0^R \frac{e^{2\pi i/n}dt}{R^n e^{2\pi i/n\cdot n}+1} = e^{2\pi i/n}\int_0^R \frac{dt}{t^n+1}$.

And, $\left| \frac{Rie^{i\theta}}{R^ne^{in\theta}+1} \right| = \frac{|Rie^{\theta}|}{|R^ne^{in\theta}+1|}\leq \frac{R}{|R^ne^{in\theta}|-1} = \frac{R}{R^n-1} \mbox{ for big }R$.
Since $n\geq 2$ this "error term" goes to zero.

Thus, as $R\to \mbox{ME}$,
$(1-e^{2\pi i/n})\int_0^{\infty} \frac{dx}{x^n+1} = -\frac{2\pi i}{n}e^{\pi i/n}$.

Thus,
$\int_0^{\infty} \frac{dx}{x^n+1}dx = \frac{2\pi i e^{\pi i/n}}{e^{2\pi i/n}-1} = \frac{\pi /n}{\sin \pi/n}$.

The point of this is that you (Krizalid) should learn Complex Analysis as quickly as possible if you wanna do some nice integrals.