Show that f only takes two values

Hi

Question:

Show that $\displaystyle f(x) = arctan(\frac{1}{x}) + arctan(x) \, , x\neq 0 $ only takes two values. Show this, and decide these values.

Is this a **correct/complete** solution?

My solution:

$\displaystyle f'(x) = -\frac{1}{1+x^{2}} + \frac{1}{1+x^{2}} = 0 $ , so $\displaystyle f $ is a constant function on $\displaystyle \mathbb{R} - [0] $

Then take any $\displaystyle x<0 $ , say $\displaystyle x = -1 $ .

$\displaystyle f(-1) = -\frac{\pi}{2} $ . This is the only value f takes on the interval $\displaystyle x<0 $ since f is constant on this interval.

In the same way, we show that for $\displaystyle x>0 $ , $\displaystyle f = \frac{\pi}{2} $ .

Thus the values are $\displaystyle -\frac{\pi}{2} \mbox{ and } \frac{\pi}{2} $

Thx for your input