A function is given as $$f(x) = \arctan \frac{x-1}{x+1} + \arctan \frac{x+1}{x-1}, x \neq -1,1$$ and I am supposed to calculate the derivative and sketch the graph.
I calculate the derivative like $$ \frac{d}{dx} \arctan \frac{x-1}{x+1} = \frac{1}{\left( \frac{x-1}{x+1} \right)^2 + 1} \cdot \frac{2}{(x+1)^2} = \frac{1}{x^2+1}\\ \frac{d}{dx} \arctan \frac{x+1}{x-1} = \frac{1}{\left( \frac{x+1}{x-1} \right)^2 +1} \cdot \left( -\frac{2}{(x-1)^2} \right) = -\frac{1}{x^2+1}\\ \frac{d}{dx} \arctan \frac{x-1}{x+1} + \arctan \frac{x+1}{x-1} = \frac{1}{x^2+1} - \frac{1}{x^2+1} = 0$$
And understand that the function has zero slope. How would I go about sketching its graph?
Since it is undefined in $x = -1,1$ I think that I am supposed to treat it as three cases, and calculate the $y$-value of all 3, then just draw 3 straight lines. Is this correct? How can I motivate it?
Your result (zero slope) is correct everywhere as an identity
Alternately we attempt to simplify, sketch the graph and then calculate derivative.
Let $ y= \tan^{-1}\dfrac{x-1}{x+1} $
$$f(x)=y+\dfrac{1}{y}= \tan^{-1}\dfrac{...} {0} = \tan^{-1}\infty=\dfrac {\pi}{2} + k \pi$$
which includes co-terminal angles which are odd multiples of $\pi/2.$ The constant function $ y=f(x)$ is sketched.
All the $f(y)$ are constants. Accordingly all derivatives vanish.
Either way result is the same.