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?

  • 1
    $\begingroup$ What's the derivative of $f(x)=x^2+1$ and of $g(x)=x^2$? $\endgroup$
    – mathochist
    Dec 3 '15 at 13:47
  • $\begingroup$ This is a matter of constants, my case is pretty different. @mathochist $\endgroup$ Dec 3 '15 at 13:50
  • 7
    $\begingroup$ Your question has been answered, but as a word of advice, this should have immediately hinted to you that your two functions must only differ by a constant, although looking fundamentally different. In your case, if you do the calculations, you'll see that your constant is $\frac{\pi}{4}$. $\endgroup$
    – Rellek
    Dec 3 '15 at 13:53
  • 4
    $\begingroup$ @RenatoFaraone Your case seems pretty different, but it isn't! $\endgroup$
    – egreg
    Dec 3 '15 at 13:53
  • 1
    $\begingroup$ @Rellek As I note in my answer, actually, there are two constants, one when $x<-1$ and one when $x>-1$. $\endgroup$ Dec 3 '15 at 13:55


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

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


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.)

  • $\begingroup$ @AdityaAgarwal $x=\tan A$ so $A=\arctan x$. But yes, some care is needed to pick $A$. $\endgroup$ Dec 3 '15 at 13:51

Are you surprised from $3-2=10-9$? ;-) I guess you aren't.

Are you surprised from the fact that $f(x)=x^2$ and $g(x)=x^2+1$ have the same derivative? Not at all, I believe.

The same holds in this case, and it's not the only one! For instance, $f(x)=\arcsin x$ and $g(x)=-\arccos x$ have the same derivative! Also $f(x)=\log x$ and $g(x)=\log(3x)$ do.

The conclusion you can draw is that the two functions differ by a constant on each interval where they are both defined. Since $\arctan\frac{x-1}{x+1}$ is defined for $x\ne-1$, you know that there exist constants $h$ and $k$ such that $$ \begin{cases} \arctan\dfrac{x-1}{x+1}=h+\arctan x & \text{for $x<-1$}\\[12px] \arctan\dfrac{x-1}{x+1}=k+\arctan x & \text{for $x>-1$} \end{cases} $$

You can now compute $h$ and $k$, by evaluating the limit at $-\infty$ and at $\infty$: $$ \frac{\pi}{4}=\lim_{x\to-\infty}\arctan\dfrac{x-1}{x+1}= \lim_{x\to-\infty}(h+\arctan x)=h-\frac{\pi}{2} $$ and $$ \frac{\pi}{4}=\lim_{x\to\infty}\arctan\dfrac{x-1}{x+1}= \lim_{x\to\infty}(k+\arctan x)=k+\frac{\pi}{2} $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.