Not getting the right derivative of $(x-a)\arctan\frac{(y-b)(z-c)}{(x-a)\sqrt{(x-a)^2+(y-b)^2+(z-c)^2}}$ with respect to $c$ Derivative of:
$$\left(x-a\right)\arctan\left(\dfrac{\left(y-b\right)\left(z-c\right)}{\left(x-a\right)\sqrt{\left(x-a\right)^2+\left(y-b\right)^2+\left(z-c\right)^2}}\right)$$
w.r.t. $c$ is, according to online calculator:
$$-\dfrac{\left(x-a\right)^2\left(y-b\right)}{\left(\left(c-z\right)^2+\left(x-a\right)^2\right)\sqrt{\left(x-a\right)^2+\left(y-b\right)^2+\left(z-c\right)^2}}$$

But I am getting:
$$-  \dfrac{1}{\sqrt{\left(x-a\right)^2+\left(y-b\right)^2+\left(z-c\right)^2}}  \left[ 
   \dfrac{\left(x-a\right)^2\left(y-b\right)    \left[   \left(  x-a   \right)^2+\left(y-b\right)^2   \right]}{(x-a)^2 \left[ \left(  x-a   \right)^2+\left(y-b\right)^2+\left(c-z\right)^2   \right]+     (y-b)^2 (z-c)^2 }   \right]$$

Why is this so? Are the both expressions equivalent?
 A: Make substitutions to make this more manageable.
First, note that the derivative of the inverse tangent of a quotient simplifies a bit:
$$
\biggl[ \arctan \frac{u}{v} \biggr]' 
= \frac{\bigl( \frac{u}{v} \bigr)'}{1 + \bigl( \frac{u}{v} \bigr)^2}
= \frac{\frac{u'v - uv'}{v^2}}{1 + \frac{u^2}{v^2}} 
= \frac{u'v - uv'}{u^2 + v^2}
$$
Now, set $X = x - a$, $Y = y - b$, and $Z = z - c$, and $R^2 = X^2 + Y^2 + Z^2$. Letting prime notation denote derivative with respect to $c$,
$$
X' = Y' = 0, 
\quad
Z' = -1, 
\quad\text{and}\quad 
R' = -\frac{Z}{R}
$$
You want to find
\begin{align} 
\biggl[ X \arctan \frac{YZ}{XR} \biggr]' 
&= X \, \frac{(YZ)'(XR) - (YZ)(XR)'}{(YZ)^2 + (XR)^2} \\&
= X \, \frac{-YXR + YZX\frac{Z}{R}}{(YZ)^2 + (XR)^2} \\
&= -\frac{X^2 Y}{R} \, \frac{R^2 - Z^2}{Y^2Z^2 + X^2R^2} \\
&= -\frac{X^2 Y}{R} \, \frac{X^2 + Y^2}{Y^2Z^2 + X^2R^2}. 
\end{align}
which agrees with your answer.
To recover the online calculator answer, expand $R^2$ and factor the denominator:
$$
Y^2Z^2 + X^2R^2 
= Y^2Z^2 + X^2(X^2 + Y^2 + Z^2) 
= (Z^2 + X^2)(X^2 + Y^2), 
$$
so the derivative looks like
\begin{align}
&= -\frac{X^2 Y}{R} \, \frac{X^2 + Y^2}{Y^2Z^2 + X^2R^2} \\ 
&= -\frac{X^2 Y}{R} \, \frac{X^2 + Y^2}{(Z^2 + X^2)(X^2 + Y^2)} \\ 
&= -\frac{X^2 Y}{(Z^2 + X^2)R}. 
\end{align}
