Carried out step by step, we derive
$\displaystyle f'(x) = \frac{d}{dx}\left(\ln\,\frac{\sqrt{2}-\cos\,x}{\sqrt{2}+\cos\,x}\right)$$\displaystyle = \frac{d}{dx}(\ln\,(\sqrt{2}-\cos\,x)-\ln\,(\sqrt{2}+\cos\,x))$
$\displaystyle = \frac{d}{dx}(\ln\,(\sqrt{2}-\cos\,x))-\frac{d}{dx}(\ln\,(\sqrt{2}+\cos\,x))$
$\displaystyle = \frac{1}{\sqrt{2}-\cos\,x}\cdot \sin\,x-\frac{1}{\sqrt{2}+\cos\,x}\cdot(-\sin\,x)$
$\displaystyle = \frac{\sin\,x}{\sqrt{2}-\cos\,x}+\frac{\sin\,x}{\sqrt{2}+\cos\,x}$
$\displaystyle = \frac{\sin\,x(\sqrt{2}+\cos\,x)+\sin\,x(\sqrt{2}-\cos\,x)}{2-\cos^2 x}$
$\displaystyle = \frac{\sqrt{2}\sin\,x+\sin\,x\,\cos\,x+\sqrt{2}\si n\,x-\sin\,x\,\cos\,x}{1+1-\cos^2 x}$
$\displaystyle =\frac{2\sqrt{2}\sin\,x}{1+\sin^2 x}.$