<s>[INST] 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!
 [/INST] 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}}$$
</s>