Given a function $f(x)$ from $\mathbb R$ to $\mathbb R$, If $f'(x)=0$ $\text{ for all } x\in \mathbb R$. Then $f(x)=C$.(This is my understanding)
Question:
I think that $C$ has to remain constant for $\text{ for all } x\in\mathbb R$. But this is not valid for $f(x)= $$\arctan x+\arctan\frac{1}{x}$. clearly $f'(x)=0$ but $C$ doesn't remain constant. For all real positive numbers its$\frac{\pi}{2}$ while for -ve real numbers its $\frac{-\pi}{2}$. I just don't understand it. Can anyone help me?
When $g'(x) = 0$ holds for all $x \in \mathbb{R}$ for a real function $g$ with domain $\mathbb{R}$, the function $g$ should be differentiable on $\mathbb{R}$. The function $f: \mathbb{R} \to \mathbb{R}$ given by $f(x) = \textrm{arctan}(x) + \textrm{arctan}\left(\frac{1}{x}\right)$ does, however, not exist in $x = 0$.