TITLE: The Integral of Multiple Tangent Functions
QUESTION [7 upvotes]: I need help to find the numerical values to the precision at least $50$ digits (the closed forms if possible) for the following integrals

\begin{equation}
{\large\mathscr{F}}\left(\alpha,\beta,\mu\right)=\int_0^{\Large\frac{\pi}{2}}\bigg[\tan x\arctan\big(\beta\tan (\mu\tan x)\big)-\tan x\arctan\big(\alpha\tan (\mu\tan x)\big)\bigg]\ dx\\
\end{equation}

and

\begin{equation}
{\large\mathscr{I}}=\int_0^{\Large\frac{\pi}{2}}\cot\left(\frac{\cot x}{2}\right)\cot x\ dx\\
\end{equation}

Somehow, my Mathematica $9.0$ failed to find the numerical values. It showed up warning messages like these:
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >> 

or
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in x near {x} =

I use this code to obtain the numerical value of an integral (perhaps you have a better code that you might want to share with me)
N[Integrate[(integrand), {x,a,b}], (digits precision)]

I am interested in knowing the numerical values of ${\large\mathscr{F}}\left(\alpha,\beta,\mu\right)$ for the specific values of the following variables:
\begin{array}{|c|c|c|c|}
\hline
\text{No.} & \alpha & \beta & \mu \\[7pt]
\hline
1 & 2 & 3 & 1 \\[7pt]
\hline
2 & 3 & 5 & 2 \\[7pt]
\hline
3 & \frac{3}{2} & 2 & \frac{1}{2}\\[7pt]
\hline
4 & \frac{4}{3} & \frac{5}{3} & \frac{1}{3}\\[7pt]
\hline
5 & \frac{5}{4} & \frac{3}{2} & \frac{1}{4}\\[7pt]
\hline
\end{array}
Any help would be greatly appreciated. Thank you.
Edit :
As requested by Mr. Amzoti, I used this code (I use example values no. $1$ in the table)
N[Integrate[Tan[x] ArcTan[3 Tan[Tan[x]]] - Tan[x] ArcTan[2 Tan[Tan[x]]],{x,0,Pi/2}], 50]

REPLY [7 votes]: First, one may note that
$$\int^\infty_0\frac{x\sin(ax)}{x^2+b^2}{\rm d}x=\operatorname*{Res}_{z=ib}\frac{\pi ze^{iaz}}{z^2+b^2}=\frac{\pi}{2}e^{-ab}$$
Applying the substitution $\mu\tan{x}\mapsto x$, we see that $\mathcal{I}$ is equal to
\begin{align}
\mathscr{F}(\alpha, \beta, \mu)
=&\int^\beta_\alpha\int^\infty_0\frac{x}{x^2+\mu^2}\frac{\tan{x}}{1+\lambda^2\tan^2{x}}{\rm d}x\ {\rm d}\lambda\\
=&\int^\beta_\alpha\int^\infty_0\frac{x}{x^2+4\mu^2}\frac{\sin{x}}{1+\lambda^2+(1-\lambda^2)\cos{x}}{\rm d}x\ {\rm d}\lambda\\
\end{align}
Observe that
$$\sum^\infty_{n=1}a^n\sin(nx)=\Im\sum^\infty_{n=1}(ae^{ix})^n=\Im\frac{ae^{ix}}{1-ae^{ix}}=\frac{a\sin{x}}{1-2a\cos{x}+a^2}\ \ \ \text{(for $|a|<1$)}$$
Letting $a\mapsto\frac{b}{a}$,
$$\frac{ab\sin{x}}{a^2-2ab\cos{x}+b^2}=\sum^\infty_{n=1}\left(\frac{b}{a}\right)^n\sin(nx)\ \ \ \text{(for $|b|<a$)}$$
Setting $a=\frac{\lambda+1}{\sqrt{2}}$ and $b=\frac{\lambda-1}{\sqrt{2}}$, then denoting $\xi=\frac{\lambda-1}{\lambda+1}$, we get
$$\frac{\sin{x}}{1+\lambda^2+(1-\lambda^2)\cos{x}}=\frac{2}{\lambda^2-1}\sum^\infty_{n=1}\xi^n\sin(nx)$$
Integrating termwise,
\begin{align}
\mathscr{F}(\alpha, \beta, \mu)
=&\int^\beta_\alpha\frac{2}{\lambda^2-1}\sum^\infty_{n=1}\xi^n\int^\infty_0\frac{x\sin(nx)}{x^2+4\mu^2}{\rm d}x\ {\rm d}\lambda\\
=&\int^\beta_\alpha\frac{\pi}{\lambda^2-1}\frac{e^{-2\mu}\xi}{1-e^{-2\mu}\xi}{\rm d}\lambda
=\frac{\pi}{2}\int^\frac{\beta-1}{\beta+1}_\frac{\alpha-1}{\alpha+1}\frac{{\rm d}\xi}{e^{2\mu}-\xi}\\
\end{align}
It follows that
$$\Large{\mathscr{F(\alpha,\beta,\mu)}=\frac{\pi}{2}\ln\left(\frac{e^{2\mu}-\frac{\alpha-1}{\alpha+1}}{e^{2\mu}-\frac{\beta-1}{\beta+1}}\right)}$$