1. ## Series terms

The goal is to show how many terms of the series 1/n*2^n are needed to approximate ln 2 with 6 digit accuracy.

So I set
1/(2^(n+1)*(n+1)<10^-6

And now this means

2^n*(n+1)>500,000

I know the answer is supposed to be 17, but the brain fade is in solving this inequality (unless I'm doing the whole problem wrong). I know it should be easy, but I'm at a little loss here.

Thanks.

2. You don't need to solve it do you ?
It isn't as if you need to know the value of n to say 3 decimal places.
You're looking for an integer value for n, so a simple crude trial and error substitution will do.

3. Originally Posted by zhupolongjoe
The goal is to show how many terms of the series 1/n*2^n are needed to approximate ln 2 with 6 digit accuracy.
So I set
1/(2^(n+1)*(n+1)<10^-6
And now this means
2^n*(n+1)>500,000
I know the answer is supposed to be 17, but the brain fart is in solving this inequality (unless I'm doing the whole problem wrong). I know it should be easy, but I'm at a little loss here.
Thanks.

$\displaystyle 10^{-6} = 0.000001$
6 digit accuracy requires rounding, so half of the above is 0.0000005

$\displaystyle \dfrac{1}{n*2^n} < 0.0000005$

invert
$\displaystyle n*2^n > 2000000$

$\displaystyle \ln(n) + n \ln(2) > \ln(2000000)$

$\displaystyle \dfrac{ \ln(2000000) - l(n)}{\ln(2)} < n$

ln(2000000)=14.5087
ln(2) = 0.6931

$\displaystyle \dfrac{ 14.5087 - log(n)}{ 0.6931} < n$

Here is "a simple crude trial and error substitution" method.

n=1 : ln(n)= 0.00 :: $\displaystyle \dfrac{ 14.5087 - 0.00}{ 0.6931} = 20.93$

n=20.93 : ln(20.93)=3.04 :: $\displaystyle \dfrac{ 14.5087 - 3.04}{ 0.6931} = 16.55$

n=16.55 : ln(16.55)=2.81 :: $\displaystyle \dfrac{ 14.5087 - 2.81}{ 0.6931} = 16.88$

n=16.88 : ln(16.88)=2.83 :: $\displaystyle \dfrac{ 14.5087 - 2.83}{ 0.6931} = 16.85$

n=16.85 : ln(16.85)=2.824 :: $\displaystyle \dfrac{ 14.5087 - 2.824}{ 0.6931} = 16.858$

The required value of n (rounded to whole number) is 17.

$\displaystyle \dfrac{1}{16*2^{16}}= 0.000000953 > 0.0000005$ : $\displaystyle \dfrac{1}{17*2^{17}}= 0.000000448 < 0.0000005$

.