I'm trying to find the result of logx (base 10) close to exact value in two digits with these methods:
The methods below are doing by hand. I appreciate you all who already give answers for computer method.
As suggested by Praktik Deoghare's answer
If number N (base 10) is n-digit then n−1≤log10(N)<n
Then logarithm can be approximated using log10(N)≈n−1+N10n−10n−1Logarithm maps numbers from 10 to 100 in the range 1 to 2 so log of numbers near 50 is about 1.5. But this is only a linear approximation, good for mental calculation and toy projects but not that good for serious research.
This method is cool for me, but it's nearly close to exact value. log10(53) is 1.7 and with that method results 1.58.
As suggested by Pedro Tamaroff's answer
One can get very good approximations by using 12log|1+x1−x|=x+x33+x55+⋯
Say you want to get log3. Then take x=1/2. Then you get log3≈2(12+124+1140)=1.0976190…The real value is log3≈1.098065476…
This one is also cool for me, but it's to find natural logarithm, not base-10 logarithm.
As suggested by Kaleb's answer
This can be done by recourse to Taylor series. For ln(x) centered at 1, i.e. where 0<x≤2: ln(x)=∞∑n=1(x−1)nn=(x−1)−12(x−1)2+13(x−1)3+14(x−1)4+⋯
The method is for calculating ln(x), not logx. I don't know the Taylor series for calculate logx, especially when to find log result close to exact value in two digits (with similar method).
As suggested by Glenn's answer
The Wikipedia article "Generalized continued fraction" has a Khovanskiĭ-based algorithm that differs only in substituting x/y for z, and showing an intermediate step: log(1+xy)=xy+1x2+1x3y+2x2+2x5y+3x2+⋱
This method is very slow for me. When I stop at 3y, the result (log calculation) is still far from the exact value.
Anyone who can improve all of the above methods so I can precisely get log result close to exact value in two digits?
Answer
Listing a few tricks that work for mental arithmetic. Mostly to get the OP to comment, whether this is at all what they expect. I write log for log10 to save a few keystrokes.
You need to memorize a few logarithms and play with those. We all have seen log2≈0.30103 enough many times to have memorized it. Consequently by mental arithmetic we get for example the following log4=2log2≈0.602,log5=log(10/2)≈0.699,log1.6=log(24/10)≈0.204,log1.024=log(210)−3≈0.0103.
You should also be aware of the first order Taylor series approximation log(1+x)≈xln10≈x2.3≈0.434x,
As an example let's do log53 and log7. Here x=53 is 6% larger than 50, so a first order approximation would be log53≈log50+6⋅0.0043=log(102/2)+6⋅0.00434≈2−0.30103+0.0258≈1.725.
No comments:
Post a Comment