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?
You don't want to use the Taylor series when $x$ is large. Better to use the law of exponents to write $\log(x+1) - \log (x)=\log(1+\frac 1x)$ and use the Taylor series from there.
This is the usual approach. You want to analytically subtract the large parts of the two numbers, reducing the cancellation.