Don't they? I've not looked too closely but I think you may have forgotten that e^(ix) = cosx + isinx, so you've summed cos(kx) + i sin(kx), so you ought to be taking just the imaginary part of that sum you've got, that will probably mess about with it suitably well as to make it look similar.