sin 1 + sin 3 + sin 5 + sin 7 + sin 9 + ...
Any ideas? PD: The angle is in radians.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Название |
---|
If you have no clue about a summation, Wolfram Alpha will save your butt. Link
Apperently a closed formular for the first
n + 1
elements is:sin(n+1)^2/sin(1)
. I guess you can prove this formular using induction and a few trigonometrical identities.sin α = Re(eiα)
Lol, I have written my previous post 4 days ago, got 22 upvotes and nobody pointed out, that there should be Im instead of Re :P. Btw even given that equality, I still don't know how to compute that sum : D.
You have a sum of geometric progression inside Im, you may calculate its sum in O(1) as some fraction and explicitly express its imaginary part by carefully dividing numerator by the denominator.
OK, that geometric progression is what I had in my mind when I was writing first post, but somehow I got stuck when computing imaginary part of [tex_crapped_on_cf]\frac{e^{(2n+1)i} — e^i}{e^{2i} — 1}[\tex_crapped_on_cf], but of course it can be done.
It is good idea to multiply this by or (because, for example, and there will be a lot of summands that "kill" each other, it is general way to simplify such sums) to get telescopic series, let's multiply (for example, , it works better in this case):
So, .