[Math] Different function with the same derivative

calculusderivatives

Today at school I entered in a problem when the professor asked us to differentiate the following function:

$$f(x)=\arctan\left(\frac {x-1}{x+1}\right)$$

With the basic rules of differentiation I came to a confusing result:

$$f'(x)=\frac 1{1+x^2}$$

And the teacher agreed, and so does Wolfram (I checked at home) but what surprised me is that it's the same derivative as

$$f(x)=\arctan x$$
$$f'(x)=\frac 1{1+x^2}$$

So I'm wondering: is that wrong in some sense ? Are the two function equals indeed ? If I integrate $\frac 1{1+x^2}$ what should I choose from the two ? Are there any other examples of different functions with the same derivative?

Best Answer

Note:

$$\tan(A-B)=\frac{\tan A - \tan B}{1+\tan A \tan B}$$

If $x=\tan A$ and $\tan B=1$, then you get:

$$\tan(A-B)=\frac{x-1}{x+1}$$

So $$\arctan x - B = \arctan\left(\frac{x-1}{x+1}\right)$$ So the functions differ by a constant.

(Well, close enough - they actually differ by a constant locally, wherever both functions are defined. The differences will be constant in $(-\infty,-1)$ and in $(-1,\infty)$, but not necessarily the entire real line.)