Assume $x$ is any real number and $z > 0$. I have the following function
$f_1 = tan^{-1} \left( \dfrac{b-x}{z} \right) - tan^{-1} \left( \dfrac{a-x}{z} \right)$
which I combine using the trigonometric identity
$tan^{-1} q - tan^{-1} r = tan^{-1} \left( \dfrac{q-r}{1+qr} \right)$
giving
$f_2 = tan^{-1} \left( \dfrac{z(b-a)}{(a-x)(b-x)+z^2} \right)$
However, plotting each of these functions shows that the two functions do not yield the same result. Assigning some dummy numbers, say $a = 0$, $b = 10$, and $z=10$.
The issue appears to be when $x$ is equal to either $a$ or $b$. Why is the trig identity not working in this case?
