$\sqrt{\frac{h^{2}}{4}+d^{2}-h d \cos x}-\sqrt{\frac{h^{2}}{4}+d^{2}+h d \cos x}$ equals $h\cos x$? Trying to simplify the expression, I observed: $y=\sqrt{\frac{h^{2}}{4}+d^{2}-h d \cos x}-\sqrt{\frac{h^{2}}{4}+d^{2}+h d \cos x}$ graphically equals $y=h\cos x$  when pluging in arbitrary values of $h$ and $d$. The result can be seen here.
I have tried but I haven't been able to prove it mathematically. Please help me prove it!

try $h=2,d=1$ and you will get $$1-\cos(x)^2=\sqrt{1-\cos(x)^2}$$ what is i.g. not true.
