Definite Integrals – Evaluate $\int_{0}^{\pi}\arctan\left(\cot\left(mt\right)\right)\arctan\left(\cot\left(nt\right)\right)dt$

calculusdefinite integralsintegration

$$\int_{0}^{\pi}\arctan\left(\cot\left(mt\right)\right)\arctan\left(\cot\left(nt\right)\right)dt\stackrel{?}{=}\frac{\pi^{3}}{12}\cdot\frac{\gcd^2\left(m,n\right)}{mn}$$

Using the techniques mentioned in this post: An Astounding Identity $\int_0^{\pi/2}\ln\lvert\sin(mx)\rvert\cdot \ln\lvert\sin(nx)\rvert\, dx$

I was able to arrive at the above identity, it does work for smaller values, though needs more confirmation.

Using these techniques we can probably get a whole lot of other identities based on $\gcd$.

Can someone prove or disprove the Identity given.

How would we go about solving these without knowing how they were made?

Best Answer

I believe that your conjecture is indeed true, by utilizing similar technique in the linked integral.
To begin with, we have $$ \mathrm{arctan} \left( \cot \left( \theta x \right) \right) =\pi \left( \left\{ -\frac{\theta x}{\pi} \right\} -\frac{1}{2} \right) $$ Now, by using the fourier expansion of the fractional part from $\left[-\pi,\pi\right]$. We may exclude the points that would be problematic for this expansion ($\left\{ x\in \mathbb{R} \mid \theta x\in \pi \mathbb{Z} \right\} $), since it's a measure-zero set and will not affect the evaluation of the integral. So $$ \pi \left( \left\{ -\frac{\theta x}{\pi} \right\} -\frac{1}{2} \right) =\pi \left( \frac{1}{2}+\frac{1}{\pi}\sum_{k=1}^{\infty}{\frac{\sin \left( 2\theta kx \right)}{k}}-\frac{1}{2} \right) =\sum_{k=1}^{\infty}{\frac{\sin \left( 2\theta kx \right)}{k}} $$ Pulgging this into the intergal, we have \begin{align*} &\int_0^{\pi}{\mathrm{arctan} \left( \cot \left( mx \right) \right) \mathrm{arctan} \left( \cot \left( nx \right) \right)}\mathrm{d}x \\ =&\int_0^{\pi}{\sum_{i=1}^{\infty}{\frac{\sin \left( 2mix \right)}{i}}\sum_{j=1}^{\infty}{\frac{\sin \left( 2njx \right)}{j}}}\mathrm{d}x \\ =&\sum_{i=1}^{\infty}{\sum_{j=1}^{\infty}{\frac{1}{ij}}}\int_0^{\pi}{\sin \left( 2mix \right) \sin \left( 2njx \right)}\mathrm{d}x \\ =&\frac{\pi}{2}\sum_{i=1}^{\infty}{\sum_{j=1}^{\infty}{\frac{1}{ij}}}\delta _{mi,nj} \end{align*} You would encounter the exact same sum when you try the same method on that linked integral. Let's evaluate it. first, we have $$ \forall i,j\in \mathbb{N} , a=ni=mj\Rightarrow \left[ m,n \right] |a\Rightarrow \frac{1}{i}=\frac{n}{a}, \frac{1}{j}=\frac{m}{a} $$ So, we can rewrite the sum in terms of $\left[ m,n \right]$. $$ \frac{\pi}{2}\sum_{i=1}^{\infty}{\sum_{j=1}^{\infty}{\begin{array}{c} \frac{1}{ij}\delta _{ni,mj}\\ \end{array}}}=\frac{\pi}{2}\sum_{k=1}^{\infty}{\frac{nm}{k^2\left[ m,n \right] ^2}}=\frac{\pi \left( m,n \right)}{2\left[ m,n \right]}\sum_{k=1}^{\infty}{\frac{1}{k^2}}=\frac{\pi ^3\left( m,n \right)}{12\left[ m,n \right]} $$ Which is your claim. At the end, we have $$ I\left( n,m \right) =\int_0^{\pi}{\mathrm{arctan} \left( \cot \left( mx \right) \right) \mathrm{arctan} \left( \cot \left( nx \right) \right)}\mathrm{d}x=\frac{\pi ^3\left( m,n \right)}{12\left[ m,n \right]} $$

Related Question