Art Scroll and a few other Machzorim (Nusach Ashkenaz) have a notation for the piyut לאל עורך דין on the 2nd day of Rosh Hashanna. They place in it both Shacharit with a notation saying that some congregations recite this during Musaph, instead.
I have attended shuls where I have seen both done - some do in Shacharit, others in Musaph.
What is this debate based on and why is this debate only on the 2nd day but on the first day, it seems that everyone does it during Shacharit?