How do I differentiate this? (logarithm & chain) I keep getting wrong results when trying to differentiate this:
${\partial \over \partial x} \ln{(x - \sqrt{x^2+a^2})}$
Thanks for hints!
 A: There may be a typo in the question, since the thing inside the logarithm is $\le 0$. So we solve a different problem, finding the derivative of $\ln(|x-\sqrt{x^2+a^2}|)$, or more simply of $\ln(\sqrt{x^2+a^2}-x)$.
Differentiate, using the Chain Rule (twice). We get
$$\frac{\frac{x}{\sqrt{x^2+a^2}}-1}{\sqrt{a^2+x^2}-x}.$$
Bring the top to a common denominator, and simplify. We get
$$-\frac{1}{\sqrt{x^2+a^2}}.$$
Another variant  that makes sense in the reals is finding the derivative of $\ln(x-\sqrt{x^2-a^2})$. The same method yields $-\frac{1}{\sqrt{x^2-a^2}}$. 
A: You should be getting, firstly
$$\frac{\partial }{{\partial x}}\ln \left( {x - \sqrt {{x^2} + {a^2}} } \right) = \frac{{\frac{\partial }{{\partial x}}\left( {x - \sqrt {{x^2} + {a^2}} } \right)}}{{x - \sqrt {{x^2} + {a^2}} }}$$
Then 
$$\frac{\partial }{{\partial x}}\left( {x - \sqrt {{x^2} + {a^2}} } \right) = \frac{\partial }{{\partial x}}x - \frac{\partial }{{\partial x}}\sqrt {{x^2} + {a^2}} $$
For
$$\frac{\partial }{{\partial x}}\sqrt {{x^2} + {a^2}}  = \frac{\partial }{{\partial x}}{\left( {{x^2} + {a^2}} \right)^{\frac{1}{2}}}$$
use the power rule and the chain rule:
$$\frac{\partial }{{\partial x}}u{\left( {x,a} \right)^n} = nu{\left( {x,a} \right)^{n - 1}}u'\left( {x,a} \right)$$
I think you should be having either 
$$\ln \left( {x + \sqrt {{x^2} + {a^2}} } \right)$$
or 
$$\ln \left( {\sqrt {{x^2} + {a^2}}  - x} \right)$$
as the original function, since your function is complex valued for any $x$. Anyways, the result will remain the same.
A: An other method: $y=\ln |x- \sqrt{x^2+a^2}|$  gives :
$$\begin{align*}  e^y  &= x-\sqrt{x^2+a^2}\\ (e^y-x)^2 &=x^2+a^2   \\ 2(e^y-x) \left(e^y\frac{dy}{dx} -1\right) &=2x \\  e^y\frac{dy}{dx}&= 1+\frac{x}{e^y-x}=\frac{e^y}{e^y-x}\end{align*}$$
Since : $e^y-x=-\sqrt{x^2+a^2}$, this  gives :
$$\frac{dy}{dx}= - \frac{1}{\sqrt{x^2+a^2}}$$
