why will an eggshell dissolve in the acetic acid of vinegar and not the phosphoric acid of coca cola?
Acetic acid reacts with the egg shell, primarily made of calcium carbonate, CaCO3, to form CO2 and calcium acetate.
Vinegar is roughly 4-6% acetic acid. It takes some time to do this; that is, it isn't a one or two minute reaction.
I THINK (I haven't tried it) that an egg shell will dissolve in a Coca-Cola, also, if it is in a closed system so that the carbonic acid (formed from CO2 dissolved in the liquid) is trapped in the liquid. I expect some time will be required. Leaving the system open will allow the CO2 dissolved in the liquid to escape and the coke loses its fizz and much of the acid content with it. I don't think there is enough phosphoric acid in a coke to do that much damage to an egg shell. In addition, any phosphoric acid there that reacts with the surface of the egg shell will form a precipitate of Ca3(PO4)2 which will protect the egg shell surface somewhat.
You should test the expirement before you actually do it! THEN YOU WOULD BE SOMEWHAT ACCURATE!! MAYBE TRY THAT