estimate ln(e^2+0.1)-ln(e^2)
2 answers
did this below
Log(e^2 + 1/10) =
Log(e^2) + Log[1+e^(-2)/10]
We can compute this using the series expansion:
Log(1+x) = x - x^2/2 + x^3/3 - x^4/4 + ...
But we can speed up the convergence of the series as follows. Replacing x by
-x in the series gives:
Log(1-x) = -x - x^2/2 - x^3/3 - x^4/4 + ...
Subtract the two series to obtain:
Log[(1+x)/(1-x)] =
2[ x + x^3/3 + x^5/5 + x^7/7 +...]
If we want to compute log(1+u) for small u, we must choose x such that:
(1+x)/(1-x) = 1+u ------>
x = u/(2+u). So, we have:
Log[1+e^(-2)/10] =
2 e^(-2)/10 / (2 + e^(-2)/10 ) +
2/3 e^(-6)/10^3 / [(2 + e^(-2)/10 )]^3
+ 2/5 e^(-10)/10^5 / [(2 + e^(-2)/10)]^5
+...
The first 3 terms will give the answer to an accuracy of 10^(-16).
Log(e^2) + Log[1+e^(-2)/10]
We can compute this using the series expansion:
Log(1+x) = x - x^2/2 + x^3/3 - x^4/4 + ...
But we can speed up the convergence of the series as follows. Replacing x by
-x in the series gives:
Log(1-x) = -x - x^2/2 - x^3/3 - x^4/4 + ...
Subtract the two series to obtain:
Log[(1+x)/(1-x)] =
2[ x + x^3/3 + x^5/5 + x^7/7 +...]
If we want to compute log(1+u) for small u, we must choose x such that:
(1+x)/(1-x) = 1+u ------>
x = u/(2+u). So, we have:
Log[1+e^(-2)/10] =
2 e^(-2)/10 / (2 + e^(-2)/10 ) +
2/3 e^(-6)/10^3 / [(2 + e^(-2)/10 )]^3
+ 2/5 e^(-10)/10^5 / [(2 + e^(-2)/10)]^5
+...
The first 3 terms will give the answer to an accuracy of 10^(-16).