# Limits with sums and integrals

It's one of my homework exercises that is rather problematic to me. Apparently the last thing to do is to squeeze it but I don't see yet how to do that. Could you help?

$$\lim_{n\to\infty}\frac{\displaystyle\sum_{k=1}^{n}\frac{2n}{k^2+kn+n^2}-\int_0^1\frac{1}{x^2-x+1}dx}{\displaystyle\sum_{k=1}^{n}\frac{n}{k^2+kn+n^2}-\int_0^1\frac{1}{x^2+x+1}dx}$$

-
I suppose there is a typo in the formula. – Ma Ming May 5 '13 at 20:37
Welcome to math.SE! I have tried to improve the readability of your question by improving TeX. It is possible that I unintentionally changed the meaning of your question. Please proofread the question to ensure this has not happened. For some basic information about writing math at this site see e.g. here and here. – Américo Tavares May 5 '13 at 20:37
@AméricoTavares thank you. The question is correct. – Peter Wormy May 5 '13 at 20:41
You are welcome! – Américo Tavares May 5 '13 at 20:42

We can prove easily by change of variable that $$2\int_0^1\frac{dx}{x^2+x+1}=\int_0^1\frac{dx}{x^2-x+1}=\frac{2\sqrt{3}\pi}{9}=2\alpha$$ so we have $$\lim_{n\to\infty}\frac{\displaystyle\sum_{k=1}^{n}\frac{2n}{k^2+kn+n^2}-\int_0^1\frac{1}{x^2-x+1}dx}{\displaystyle\sum_{k=1}^{n}\frac{n}{k^2+kn+n^2}-\int_0^1\frac{1}{x^2+x+1}dx}=\lim_{n\to\infty}\frac{2S_n-2\alpha}{S_n-\alpha}=2$$