Tumgik
#octave lebesgue
mathematicianadda · 4 years
Text
Value of $\sum_{n=1}^{\infty} \dfrac{\cos (n)}{n}$ https://ift.tt/eA8V8J
I was trying to calculate the value of the series $\displaystyle \sum_{n=1}^{\infty} \dfrac{\cos (n)}{n}$ and I got an answer which I think could be right, but I'm not sure about some of the steps I took to get there. I was wondering if someone could provide some more insight so I can clear my doubts, and also check if I actually got the correct value.
First of all, I used Dirichlet's test for the convergence of the series, since $a_n = \dfrac{1}{n}$ is monotonic and $\displaystyle \lim_{n \to \infty} a_n = 0$, and the cosine partial sums can be bounded by a constant not dependent on $n$ (I'm pretty sure this is right since I looked other ways to do it, so I won't list exactly what I did to get the bound).
With that out of the way, I tried taking the expression $\dfrac{\cos(n)}{n}$ and rewriting it as something I could attempt to sum, and got this:
$$\displaystyle \int_1^{\pi} \sin(nx) \, dx = \left. -\dfrac{\cos(nx)}{n} \right|_1^{\pi} = \dfrac{(-1)^{n+1}}{n} + \dfrac{\cos(n)}{n}$$
So
$$\displaystyle \int_1^{\pi} \sin(nx) \, dx + \dfrac{(-1)^{n}}{n} = \dfrac{\cos(n)}{n}$$
And then
$$\displaystyle \lim_{n \to \infty} \displaystyle \sum_{k=1}^{n}\left(\displaystyle \int_1^{\pi} \sin(kx) \, dx + \dfrac{(-1)^{k}}{k}\right) = \displaystyle \lim_{n \to \infty} \displaystyle \sum_{k=1}^{n} \dfrac{\cos(k)}{k}$$
Then I tried separating the left side member into two sums, since
$$\displaystyle \sum_{n=1}^{\infty} \dfrac{(-1)^n}{n} = \displaystyle -\sum_{n=1}^{\infty} \dfrac{(-1)^{n+1}}{n} = -\ln (2)$$
I believe the latter equality can be derived using the alternate series test for the convergence of the series, and the Taylor expansion around $x = 0$ of $\ln {(1+x)}$ along with Abel's theorem. As for the other sum, this is the step I'm not sure about. I did
$$\displaystyle \lim_{n \to \infty} \displaystyle \sum_{k=1}^{n}\left(\displaystyle \int_1^{\pi} \sin(kx) \, dx\right) = \displaystyle \lim_{n \to \infty} \displaystyle \int_1^{\pi} \left(\displaystyle \sum_{k=1}^{n} \sin(kx)\right) \, dx$$
I'm not sure that's valid, and if it is I'm not sure why: I thought it would be fine since the partial sums could be arranged that way before taking the limit, but I suspect this thinking isn't correct, and I can't just swap the sum and the integral anytime without affecting the result. But anyways, if we take it as valid, then we can get a value for the sum by doing
$$\cos {(nx+\dfrac{x}{2})} - \cos {(nx-\dfrac{x}{2})} = -2\sin {(nx)}\sin{\left(\dfrac{x}{2}\right)}$$
So
$$\sin{(nx)} = \dfrac{\cos {(nx-\frac{x}{2})} + \cos {(nx+\frac{x}{2})}}{2\sin{\left(\frac{x}{2}\right)}}$$
And then
$$\displaystyle \sum_{k=1}^{n} \sin{(kx)} = \displaystyle \sum_{k=1}^{n} \dfrac{\cos {(kx-\frac{x}{2})} + \cos {(kx+\frac{x}{2})}}{2\sin{\left(\frac{x}{2}\right)}}$$
Which telescopes to
$$\displaystyle \sum_{k=1}^{n} \sin{(kx)} = \dfrac{\cos {\left(\frac{x}{2}\right)}-\cos {\left(\frac{2n+1}{2} \cdot x\right)}}{2\sin{\left(\frac{x}{2}\right)}}$$
Returning to the integral, we need to evaluate
$$\displaystyle \lim_{n \to \infty} \displaystyle \int_1^{\pi} \left(\displaystyle \sum_{k=1}^{n} \sin(kx)\right) \, dx = \displaystyle \lim_{n \to \infty} \displaystyle \int_1^{\pi} \frac{\cos {\left(\frac{x}{2}\right)}-\cos {\left(\frac{2n+1}{2} \cdot x\right)}}{2\sin{\left(\frac{x}{2}\right)}} \, dx$$
I again tried separating it in the sum of the integrals. The first one
$$\displaystyle \int_1^{\pi} \frac{\cos {\left(\frac{x}{2}\right)}}{2\sin{\left(\frac{x}{2}\right)}} \, dx = \displaystyle \int_{\sin {\frac{1}{2}}}^1 \dfrac{1}{u} \, du = -\ln({\sin{\frac {1}{2}}})$$
Via substitution $u = \sin{\frac{x}{2}}$
This won't change when $n$ goes to infinity. As for the second one
$$-\dfrac{1}{2} \displaystyle \int_1^{\pi} \dfrac{\cos{\left(nx+\frac{x}{2}\right)}}{\sin{\left(\frac{x}{2}\right)}} \, dx = -\dfrac{1}{2}\left(\displaystyle \int_1^{\pi} \dfrac{\cos{(nx)}\cos{\left(\frac{x}{2}\right)}}{\sin{\left(\frac{x}{2}\right)}} \, dx - \displaystyle \int_1^{\pi} \sin(nx) \, dx \right) = $$
$$= -\dfrac{1}{2}\left(\displaystyle \int_1^{\pi} \dfrac{\cos{(nx)}\cos{\left(\frac{x}{2}\right)}}{\sin{\left(\frac{x}{2}\right)}} \, dx + \displaystyle \left. \frac{\cos(nx)}{n} \right|_1^{\pi} \right)$$
Both of these integrals go to 0 as $n$ goes to infinity, applying the Riemann-Lebesgue lemma for the first one, since the function $f(x) = \cot{\left(\frac{x}{2}\right)}$ is continuous on $[1,\pi]$. Putting it all together gives
$$\displaystyle \displaystyle \sum_{n=1}^{\infty} \dfrac{\cos(n)}{n} = -\ln2-\ln{\left(\sin{\frac{1}{2}}\right)} = \boxed{-\ln{\left(2 \cdot \sin{\frac{1}{2}}\right)}} \approx 0.0420195$$
I used Octave to try and check the result: setting $n = 10^6$ gave me
$$S_{10^6} \approx 0.042020$$
Because of this, I'm inclined to think I got the correct answer, but I still doubt some of the steps I took (mainly the interchanging sum and integral one).
Thanks in advance. I'm sorry if I didn't make myself clear, english isn't my first tongue. I did some search as to find something related to this value, but couldn't find anything. Very sorry if its been answered before.
from Hot Weekly Questions - Mathematics Stack Exchange Nicolás Rezzano from Blogger https://ift.tt/2ExsyPq
0 notes