# Evaluate $\displaystyle\lim_{n\to \infty} \sum\limits_{i=1}^n\left(\cos^2\left(\frac{\pi i}{n}\right)\right)\frac{\pi i}{n}$

Evaluate $$\displaystyle\lim_{n \to \infty} \sum\limits_{i=1}^n\left(\cos^2\left(\frac{\pi i}{n}\right)\right)\frac{\pi i}{n}$$

My answer is $$\int\limits_0^1{\pi x\cos^2(\pi x)dx}$$ but I do not know how to solve this. If integrating by parts, should I differentiate $\cos^2(\pi x)$ or $\pi x$? Because differentiating the former leaves one with a long integral with $x^2$ and two trig identities, and differentiating the latter is complicated because of the x that needs to go with it in $uv - \int v du$. I did not get much success either with substituting $u=\pi x$

• There's no $x$ in the original sum... Perhaps you mean $n$ in the limit? – apnorton Jun 29 '14 at 16:33
• to use Riemann sums you need another $\frac{b-a}{n}$ term – Alex Jun 29 '14 at 16:36
• Would my integral be correct if the second term in the sum was $\frac{\pi}{n}$? – ahorn Jun 29 '14 at 17:05
• yes if you didn't have the argument $i$ it would be correct. – Alex Jun 29 '14 at 17:13
• If I let $\cos^2\left(\frac{\pi i}{n}\right)= \frac{1}{2}\left(1+\cos{\frac{2\pi i}{n}}\right)$ then I get $\displaystyle\lim_{n \to \infty}\sum\limits_{i=1}^n \frac{\pi i}{2n}\left(1+\cos{\frac{2\pi i}{n}}\right)=\frac{\pi}{2} \displaystyle\lim_{n \to \infty}\sum\limits_{i=1}^n \frac{i}{n}+\frac{\pi}{2} \displaystyle\lim_{n \to \infty}\sum\limits_{i=1}^n \frac{i}{n} \cos\left(\frac{2\pi i}{n}\right)=\frac{\pi}{2} \displaystyle\lim_{n \to \infty}\frac{n(n+1)}{2n}+?$ – ahorn Jun 29 '14 at 18:07

Hint: Rewrite $\cos^2(\pi x)$ by $\frac{1}{2}(1+\cos(2\pi x))$ (see: double angle identities for where this comes from if you're not sure) and then integrate by parts.

• how did you get the integral from the OP's sum? – Alex Jun 29 '14 at 17:13

If you ever get stuck on an integration by parts question, remember this pseudonym:

LIATE

Logarithmic, Inverse Trig, Algebra, Trig, and Exponential.

This can be used for deciding which function should be $u$ and which one should be $dv$. The function that comes first in the acronym is your $u$, and the other is $dv$.

In the problem above, $x$ is algebra and $\cos^2(\pi x)$ is trignometry.

Therefore, when you go to integrate: $$\int\limits_0^1{\pi x\cos^2(\pi x)dx}$$

$$u = x$$ and $$dv = \cos^2(\pi x)$$

Now, when you go to integrate this, remember your double angle formula:

$$\cos^2(\pi x) = \frac{1}{2}(1+\cos(2\pi x))$$

Then $v = \frac{1}{2}(1+\cos(2\pi x))$ in your integration by parts formula.