In plain wordsThis single identity, applied with y=2k−1x, produces the telescoping term for every summand in the problem.
Write coty−cot2y=sinycosy−sin2ycos2y=sinycosy−2sinycosy2cos2y−1=2sinycosy2cos2y−(2cos2y−1)=2sinycosy1=sin2y1, using cos2y=2cos2y−1 and sin2y=2sinycosy.