I have been trying to find the derivative of the following functions,
$\varphi(x) = \dfrac{-ipb}{2(\mu_1-\mu_2)}\dfrac{a-i\mu_1b}{x+\sqrt{x^2-(a^2+\mu_1^2b^2)}}$
where $i$ is imaginary and everything else is constants. I would like to find its first derivative with respect to $x$. The reason I am asking is that I am a bit skeptical with the one written in a paper, which says,
$\dfrac{d\varphi}{dx} = \dfrac{-i}{2(\mu_1-\mu_2)}\cdot\dfrac{pb}{a+i\mu_1b}\left[1-\dfrac{x}{\sqrt{x^2-(a^2+\mu_1^2b^2)}} \right]$
while, using an online symbolic derivative solver, I got
$\dfrac{d\varphi}{dx} =\dfrac{-i}{2(\mu_1-\mu_2)}\dfrac{pb}{\sqrt{x^2-(a^2+\mu_1^2b^2)}}\dfrac{1}{x+\sqrt{x^2-(a^2+\mu_1^2b^2)}}$
I am not able to get as per the one mentioned in the paper. Can anyone please assist me to prove it?
Let
$\displaystyle A=\frac{-ipb}{2(\mu_1-\mu_2)}$
$\displaystyle B=a-i\mu_1b$
$\displaystyle C=a^2+(\mu_1b)^2$
$\displaystyle\varphi(x)=\frac{AB}{x+\sqrt{x^2-C}}\frac{x-\sqrt{x^2-C}}{x-\sqrt{x^2-C}}=\frac{ABx-AB\sqrt{x^2-C}}{C}=\frac{AB}{C}\left(x-\sqrt{x^2-C}\right)$
$$\frac{d\varphi(x)}{dx}=\frac{AB}{C}\left(1-\frac{x}{\sqrt{x^2-C}}\right)$$
$\displaystyle\frac{AB}{C}=\frac{-\mu_1pb^2-ipba}{2(\mu_1-\mu_2)\left(a^2+(\mu_1b)^2\right)}=pb\frac{-\mu_1b-ia}{2(\mu_1-\mu_2)\left(a^2+(\mu_1b)^2\right)}$
$\displaystyle\frac{AB}{C}=pb\frac{-\mu_1b-ia}{2(\mu_1-\mu_2)\left(a+i\mu_1b\right)\left(a-i\mu_1b\right)}=pb\frac{-i(a-i\mu_1b)}{2(\mu_1-\mu_2)\left(a+i\mu_1b\right)\left(a-i\mu_1b\right)}$
$$\frac{d\varphi(x)}{dx}=\frac{-ipb}{2(\mu_1-\mu_2)(a+i\mu_1b)}\left(1-\frac{x}{\sqrt{x^2-\left(a^2-\left(\mu_1b\right)^2\right)}}\right)$$