i think i've got it

seperate the nine pills into three groups of three. put two groups on the scale, and hold on to the last group. when you weigh it, either one side will be heavier or they have equal weights. if one side is heavier then take those three, if they weigh the same then take the three your holding. now with the remaining thee pills weigh two of them and hold on to one. if one of the side is heavier then take that safe pill, if the pills weigh the same then you are holding the safe pill!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

whoo that took forever to explain, and i better be motherfuckin right