Why cannot we find a constant for function $f(x) = \operatorname{arccot} x - \arctan\frac{1}{x}$ even though its derivative is $0$?

Solution 1:

There are two commonly-used definitions of $\mathrm{arccot}:$

  1. $$\mathrm{arccot}(x)=\begin{cases} \arctan\left(\frac1x\right) &\text{ when }x\neq0;\\ \frac {\pi}2 &\text{ when }x=0. \end{cases}$$

    With Definition 1, $f(x)$ is indeed identically zero for nonzero $x.$

    enter image description here

  2. $$\mathrm{arccot}(x)=\begin{cases} \arctan\left(\frac1x\right)+\pi &\text{ when }x<0;\\ \frac {\pi}2 &\text{ when }x=0;\\ \arctan\left(\frac1x\right) &\text{ when }x>0. \end{cases}$$

    If Apostle is using Definition 2, then what's going on is this:

    enter image description here

    Even though the Zero Derivative Theorem says that $$f'(x)=0\implies f(x)=C,$$ this is with reference to $f$ being continuous on the interval in question. Since $(-\infty,0)\cup(0,\infty)$ isn't an interval, the theorem is inapplicable.