Well, Iíve always found that hitting a bottle of ketchup almost always has one of two undesirable consequences. The most usual outcome is that nothing happens and I have to hit the bottle again (sometimes I smash my hamburger in the process). The more rare outcome is that a great glob of ketchup comes rushing out, soaking my hamburger and also innocent bystanders, causing me to grin sheepishly and apologize. Only in rare instances does the desired amount of ketchup come out of the bottle (and why should it? The bottle doesnít know how much ketchup I want on my hamburger). Iím going hold off on explaining Newtonís laws to the end because I have better advice, gained from many tries at this problem (and not calculating anything).
The best technique Iíve found through trial and error and a little bit of sense is to tip the ketchup bottle at about a 30-degree angle with respect to the horizontal, the neck pointing at my hamburger. I then shake the bottle up and down, in a mostly vertical direction (or even mostly rotating it, see below). At the end of a downwards shake, I make sure the acceleration in the upwards direction is large, stopping the bottleís downward motion, helping to dislodge the ketchup.
The reason to do it this way is that in order for ketchup to come out of the bottle, air has to go in. A full bottle of ketchup usually has the surface of the ketchup in a thin horizontal disk in the neck, when the ketchup bottle is upright. The ketchup in the disk may even be a little thicker, due to evaporation, than elsewhere, plugging up the neck. Getting the ketchup out and the air in past this plug in the thin neck is the hard part.
If you hold the ketchup bottle exactly vertical, upside down, and expect ketchup to fall out, air has to squeeze in on one side of the neck and ketchup down the other. Which side of the neck is chosen is a question of "spontaneous symmetry breaking" (although details of which part of the ketchup in the neck is the runniest will make a difference). If the ketchup has a hard time picking which part will flow down and which part will give way to the air, it will make for a harder time getting your ketchup out. The main goal is to break the symmetry deliberately, allowing both gravity and the external acceleration to force the ketchup in the plug down one side of the bottleís neck in preference to the other -- hence the angle between the bottle and the shaking direction. I find that far less shaking is needed in order to get ketchup to move when you make it run down the side of the neck in this way, and therefore it is much easier to get the desired amount of ketchup out. In fact, shaking the whole bottle is usually not necessary -- you may shake the bottle by rotating it about its center of mass, and only the neck really has to accelerate much here -- accelerating the rest of the bottle wastes your effort at best and makes ketchup go everywhere at worst.
Now to answer the question you asked, about hitting the ketchup bottle, and Newtonís laws. If you hit a bottle of ketchup, you push on the bottle with your hand and both the bottle and the ketchup inside accelerate in the same direction -- towards your food. This by itself wonít make ketchup come out (see outcome #1) because ketchup is forced back inside the bottle if you hit the bottom. And who wants to hit the top? What eventually makes ketchup come out (sometimes -- outcome #2) is that you are holding the bottle with your other hand, and to keep the bottle from flying at your food after you hit it, you have to slow it down. Your other hand imparts another force to the bottle and to the ketchup, in the opposite direction to the original hitís impulse. While the original hit came from the closed side of the bottle, the force needed to accelerate the ketchup in the opposite direction has to be supplied by the sides of the bottle walls and part of the bottleís neck. Thereís also suction from the back side due to the fact that no air usually gets in (see above), which really isnít a force, itís the difference between the force due to ambient air pressure at the neck and the lack of air pressure at the bottom of the bottle. The open neck cannot push on the ketchup, so the ketchup should fall out in this deceleration process. But itís usually plugged up, and forces are usually not the problem. Getting a plug of ketchup unstuck and air to flow in usually is the problem.
(published on 10/22/2007)