what is the good approximate so that it works for a large range of values. My purpose is to calculate logarithm of likelihood ratios.
$ \log \left( {\frac{{e^{ - x_1 ^2 } + e^{ - x_3 ^2 } }} {{e^{ - x_2 ^2 } + e^{ - x_4 ^2 } }}} \right) $. I am going to calculate with the help of MATLAB. so doesn't matter how complex it gets.
First, write $$\log\left(\frac{e^{-x_1^2}+e^{-x_2^2}}{e^{-x_4^2}+e^{-x_1^4}}\right)=\log\left(e^{-x_1^2}+e^{-x_2^2}\right)-\log\left(e^{-x_1^2}+e^{-x_2^2}\right)$$Let's focus on either term, say the first one. Then, write $$\log\left(e^{-x_1^2}+e^{-x_2^2}\right)=-x_1^2+\log \left(1+e^{-(x_2^2-x_1^2)}\right)$$ We will examine two cases.
Case 1: Assume that $x_2>> x_1$ and $x_2$ is "large" in some sense. Then, $$\log \left(1+e^{-(x_2^2-x_1^2)}\right)=O(e^{-(x_2^2-x_1^2)})$$and $$\log\left(e^{-x_1^2}+e^{-x_2^2}\right)=-x_1^2+O(e^{-(x_2^2-x_1^2)})$$which is approximately $-x_1^2$ for large $x_2$ and $x_2>>x_1$.
Case 2: Assume that $x_2>x_1$, but $x_1$ and $x_2$ are "close" in some sense. Let $t=x_2^2-x_1^2$. Then, we have $$\log \left(1+e^{-t}\right)=\log\left(1+1-t+\frac12 t^2+O(t^3)\right)$$ $$=\log(2)+\log\left(1-\frac12 t+\frac14 t^2+O(t^3)\right)$$ $$=\log(2)-\frac12 t +\frac18 t^2 +O(t^3)$$ $$=\log(2)-\frac12 (x_2^2-x_1^2)+\frac18 (x_2^2-x_1^2)^2+O\left((x_2^2-x_1^2)^3\right)$$ Thus, $$\log\left(e^{-x_1^2}+e^{-x_2^2}\right)=\log(2)-\frac12 (x_2^2+x_1^2)+\frac18 (x_2^2-x_1^2)^2+O\left((x_2^2-x_1^2)^3\right)$$