# Why, although these functions have the same derivative, do they not differ by a constant?

I calculated the derivative of $\arctan\left(\frac{1+x}{1-x}\right)$ to be $\frac{1}{1+x^2}$. This is the same as $(\arctan)'$. Why is there no $c$ that satisfies $\arctan\left(\frac{1+x}{1-x}\right) = \arctan(x) +c$?

• Why do you say that there is no $c$? – Thomas Andrews Apr 8 '15 at 2:21
• This seems like one of those cases where trig identities involving constants are not obvious... – TravisJ Apr 8 '15 at 2:22
• Plotting the two clearly shows they don't differ by a constant but also provides a hint as to why not. – Cascabel Apr 8 '15 at 18:23
• Piecewise, they do differ by a constant. Just with a discontinuity at x=1. And we explicitly define arctan(t) to have a discontinuity at t=+/-inf – smci Apr 9 '15 at 11:38

The problem is that $\arctan \frac{1+x}{1-x}$ isn't defined at $x = 1$, and in particular isn't differentiable there. In fact, we have $$\arctan \frac{1+x}{1-x} - \arctan x = \begin{cases} \frac{\pi}{4} & x < 1, \\ -\frac{3\pi}{4} & x > 1. \end{cases}$$ So the difference is piecewise constant.

• While formally you are right in the first sentence, note that $\frac x{x^2}$ is not defined at $0$, but it has a continuation there, which is also differentiable at $0$. Here the discontinuity is not a removable one, which is why this doesn't work. – Asaf Karagila Apr 8 '15 at 11:23
• @AsafKaragila: I don't think you are talking about the function which you meant to talk about. The function you mentioned cannot be extended continuously at $x=0$. – Marc van Leeuwen Apr 8 '15 at 13:06
• @Marc: You're right, I wrote that comment from my phone, so MathJax mistakes are easy to come by. And of course, that I meant $\frac{x^2}{x}$. Thanks for pointing that out! – Asaf Karagila Apr 8 '15 at 13:13
• d00d, what a kewl constant! It's like not even constant! – bjb568 Apr 8 '15 at 21:19

Hint: $$\tan(x+y)=\frac{\tan x + \tan y}{1-\tan x\tan y}$$

What happens when $\tan y=1$?

• The problem is that $\arctan$ always returns an answer in $(-\pi/2,\pi/2)$. – Yuval Filmus Apr 8 '15 at 2:24

Piecewise, they do differ by a constant. Just with a discontinuity at x=1.

And we explicitly define arctan(t) to have that discontinuity at t=+/-inf