Relative error $\sim$ absolute error of logs: always true?

1.7k Views Asked by At

If $f(x) \sim g(x)$ have a relative error $\sim h(x)$, is it always true that $\ln f(x)$ and $\ln g(x)$ have an absolute error that it also $\sim h(x)$?

For instance, $\left(1+\frac{1}{x}\right)^x \sim e$ with relative error $\sim -\frac{1}{2x}$, and after we take the natural log of each side, the absolute error between $x\ln\left(1+\frac{1}{x}\right)$ and $1$ is also $\sim -\frac{1}{2x}$.

3

There are 3 best solutions below

0
On BEST ANSWER

Suppose that $A$ is the true value of a quantity and $B$ an approximate value of the same quantity. So, the relative error is $$R_1=\left|\frac{A-B}A\right|$$ Now, consider $$R_2=\log(B)-\log(A)=\log\left(\frac BA\right)=\log\left(\frac{A+B-A} A\right)=\log\left(1+\frac{B-A} A\right)$$ Now, remember that when $x$ is small compared to $1$, $\log(1+x)\sim x$. So, if $\frac{B-A} A$ is small compared to $1$, then $$R_2 \sim \frac{B-A} A\implies |R_2| \sim |R_1|$$

0
On

just a hint

$$f (x)\sim g (x )\iff $$ $$ f (x)=g (x)(1+\epsilon (x))\; (x\to x_0)$$

assume $g (x_0)>0$. then

$ \ln (\frac {f (x)}{g (x)})=\ln (1+\epsilon (x) )$

$\implies \ln (f (x))-\ln (g (x))\sim \epsilon (x) $ and $$f (x)-g (x)=g (x)\epsilon (x) .$$

thus your assupmtion is valide if $g (x_0)=1$ as in your example.

1
On

$$ \epsilon_{rel} = \frac{f(x)-g(x)}{g(x)} = h(x) \rightarrow f(x) = g(x)(1+h(x)) $$ $$ \ln f(x) = \ln g(x) + \ln(1+h(x)) $$ $$ \epsilon_{abs} = |\ln f(x) - \ln g(x)| = |\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n}(h(x))^n| = |h(x) + \sum_{n=2}^{\infty} \frac{(-1)^{n+1}}{n}(h(x))^n| \approx h(x) $$


Where we applied taylor for $\ln(1+h(x))$ and for the last sum, assuming the $\epsilon_{rel}$ was small the second and higher terms are negligible