sin 1 + sin 3 + sin 5 + sin 7 + sin 9 + ...
Any ideas? PD: The angle is in radians.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Name |
---|
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, .