Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is for an introductory numerical analysis class. The answer shouldn't be too complicated, but if you have one, feel free to post it.

Figure out what $n$ should be such that $$\sum_{k=n+1}^\infty {1\over k^2}<10^{-8}.$$


My Simple Algebraic Attempt

We know that

$$\sum_{k=1}^\infty {1\over k^2} = \sum_{k=1}^n {1\over k^2} + \sum_{k=n+1}^\infty {1 \over k^2} \implies \sum_{k=n+1}^\infty {1 \over k^2} = \sum_{k=1}^\infty {1\over k^2} - \sum_{k=1}^n {1\over k^2}$$

And

$$\sum_{k=1}^\infty {1\over k^2} = \zeta(2)={\pi^2 \over6}$$

So,

$$\sum_{k=n+1}^\infty {1 \over k^2} = {\pi^2 \over6} - \sum_{k=1}^n {1\over k^2}$$

Then,

$$\sum_{k=n+1}^\infty {1 \over k^2} < 10^{-8} \implies {\pi^2 \over6} - \sum_{k=1}^n {1\over k^2} < 10^{-8} \implies \sum_{k=1}^n {1\over k^2} > {\pi^2 \over6} - 10^{-8}$$

I'm currently trying to brute force an answer to the last expression, but is there a better way to do this?

share|improve this question
    
Is there any additional information to the question? In particular, is it sufficient to find any $n$ such that the inequality holds, or must we find the minimal $n$ ? –  Ragib Zaman Sep 9 '12 at 17:25
    
Hm, it doesn't say to find a minimal $n$. The assignment doesn't give much more information. –  highphi Sep 9 '12 at 17:30
add comment

3 Answers 3

up vote 5 down vote accepted

Since $\displaystyle \frac{1}{k^2} < \frac{1}{(k-1)k } = \frac{1}{k-1} - \frac{1}{k}$ we can bound your term by a telescoping sum: $$\sum_{k=n+1}^{\infty} \frac{1}{k^2} < \left(\frac{1}{n} - \frac{1}{n+1} \right)+\left(\frac{1}{n+1} - \frac{1}{n+2} \right)+\left(\frac{1}{n+2} - \frac{1}{n+3} \right) + \cdots = \frac{1}{n}$$ so $n=10^8$ works. The estimate we used isn't too weak, and this $n$ shouldn't be much worse than the minimal $n.$

share|improve this answer
    
Hm, sure. I also tried bounding it by an integral and got $n=10^8$. –  highphi Sep 9 '12 at 17:36
    
I was going to use this method, but I was too slow. :-) –  robjohn Sep 9 '12 at 17:38
    
@robjohn I was going to add the integral method in an edit, but I was too slow as well! –  Ragib Zaman Sep 9 '12 at 17:39
    
Actually, I think you can bound the difference between this approximation and the real answer by $\frac{1}{n^2}$ which would make the minimal $n$ $10^8-1$. –  anonymous Sep 9 '12 at 17:42
add comment

Hint: $$ \sum_{k=n+1}^\infty\frac1{k^2}\le\int_n^\infty\frac1{x^2}\mathrm{d}x=\frac1n $$

share|improve this answer
    
This is what I initially tried, but I wasn't sure about it. Thanks for verifying! –  highphi Sep 9 '12 at 17:38
2  
$\sum_{k=n+1}^\infty\frac1{k^2} \ge \int_{n+1}^\infty\frac1{x^2}\mathrm{d}x=\frac{1}{n+1}$ so you can bound from both sides –  Henry Sep 9 '12 at 17:42
    
@Henry: nice. Add that to your answer and undelete it :-) –  robjohn Sep 9 '12 at 17:45
add comment

A simple idea is to replace the remainder of the series by the corresponding integral : $$\sum_{k=N+1}^\infty \frac 1{k^2}\sim \int_{N+1}^\infty \frac {dk}{k^2}$$ or get the inequality : $$\sum_{k=N+1}^\infty \frac 1{k^2}< \int_N^\infty \frac {dk}{k^2}=\frac 1N$$

If you wish more precision you may use Euler Maclaurin formula and get (for $x=2$ in your case) : $$\zeta(x)-\sum_{k=1}^N \frac 1{k^x} \sim \frac 1{(x-1)N^{x-1}}-\frac 1{2\,N^x} + \frac x{12\,N^{x+1}} - \frac {x\,(x+1)(x+2)}{720\,N^{x+3}} +\frac {x\,(x+1)(x+2)(x+3)(x+4)}{30240\,N^{x+5}} +...$$ (the constants $\ \frac 1{2},\ \frac 1{12},\ \frac 1{720}$ are $\frac {|B_n|}{n!}$ with $B_n$ a Bernoulli number)

This is an asymptotic expansion and the error made corresponds to the first term omitted.

share|improve this answer
2  
For the exponent $2$, I did this very thing in this answer. –  robjohn Sep 9 '12 at 18:03
    
@robjohn: I like this method (much simpler to implement than Riemann-Siegel and with a much more direct error term) and the numerical details that you showed in your answer (+1: I fear I missed that thread...). This formula has the interesting feature of becoming exact for negative integer $x$ (only the first terms are not $0$). –  Raymond Manzoni Sep 9 '12 at 18:15
1  
Yes, because the EMS formula terminates for polynomials. More generally, I showed in this answer that if the Fourier transform of a function is supported within $[-1,1]$, then the EMS formula converges for that function. –  robjohn Sep 9 '12 at 22:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.