Rewrite the following to avoid loss of significant
$\ln(x+1)-\ln(x)$ where $x>>1$
$\cos^2(x)-\sin^2(x)$ where $x\approx \frac{\pi}{4}$
$\sqrt{x^2+1}-x$ where $x>>1$
$\sqrt{\frac{1+\cos x}{2}}$
Using taylor expansion we get $$x-\frac{x^2}{2}+\frac{x^3}{3}-[(x-1)-\frac{(x-1)^2}{2}+\frac{(x-1)^3}{3}]=1+\frac{(x-1)^2-x^2}{2}+\frac{x^3-(x-1)^3}{3}$$
Using taylor expansion we get $$(1-\frac{x^2}{2!}+\frac{x^4}{4!})^2-(x-\frac{x^3}{3!}+\frac{x^5}{5!})^2$$
$$\sqrt{x^2+1}-x=(\sqrt{x^2+1}-x)\cdot (\frac{\sqrt{x^2+1}+x}{\sqrt{x^2+1}+x})=\frac{1}{\sqrt{x^2+1}+x}$$
$$\sqrt{\frac{1+\cos x}{x}}\approx \sqrt{\frac{1+1-\frac{x^2}{2!}+\frac{x^4}{4!}}{2}}$$
Is this valid?