TITLE: Determining complex $c$ for which $\tan^{-1}(e^{\pi/c})+\cot^{-1}(e^{\pi /c})$ yields $\frac\pi2$ or $-\frac\pi2$
QUESTION [5 upvotes]: This expression
$$\tan^{-1}\left(e^{\pi/c}\right)+\cot^{-1}\left(e^{\pi /c}\right)$$
is equal to $\frac{\pi}{2}$ for real $c$.
But when $c\in\mathbb C$, it gives either $\frac{\pi}{2}$ or $-\frac{\pi}{2}$.
For an example, for $c=\frac{1}{2}-\frac{i}{2}$, it gives $-
\frac{\pi}{2}$; and for $c=1-i$, it gives $\frac{\pi}{2}$.

I am trying to find the ranges for values that give two of these answers. How do I find that?

REPLY [2 votes]: Claim. Let $k\in[1/(4r-1),1/(4r+1)]$ and $\ell\in[1/(4r+1),1/(4r+3)]$ where $r\in\Bbb Z$. Then\begin{align}\arctan e^{\pi/c}+\operatorname{arccot}e^{\pi/c}=\begin{cases}\pi/2,&\quad|c-ik|=k\\-\pi/2,&\quad|c-i\ell|=\ell\end{cases}.\end{align}
Proof. It is easy to show that for principal values, \begin{align}\arctan z+\operatorname{arccot}z=\begin{cases}\pi/2,&\quad\Re z\ge0\\-\pi/2,&\quad\Re z<0\end{cases}.\end{align} Let $c=x+iy$. Then $\arctan e^{\pi/c}+\operatorname{arccot}e^{\pi/c}=\pi/2$ if and only if $$\Re\exp\left(\frac{\pi(x-iy)}{x^2+y^2}\right)=\exp\left(\frac{\pi x}{x^2+y^2}\right)\cos\frac{\pi y}{x^2+y^2}\ge0.$$ Let $r\in\Bbb Z$ so the inequality is equivalent to $$\frac y{x^2+y^2}\in2r+\left[-\frac12,\frac12\right].$$ Writing $y=n(x^2+y^2)$ where $n\in2r+[-1/2,1/2]$, we see that this is the equation of a circle $$x^2+(y-k)^2=k^2$$ centred at $(0,k)$ of radius $k$ where $k=1/(2n)\in[1/(4r-1),1/(4r+1)]$.
Similarly, $\arctan e^{\pi/c}+\operatorname{arccot}e^{\pi/c}=-\pi/2$ if and only if $$x^2+(y-\ell)^2=\ell^2$$ where $\ell\in(1/(4r+1),1/(4r+3)).$