Earlier today, I was in the shower. I had just finished a bottle of shampoo, and I tried balancing it on the thin railing of the shower door. I expected it to fall down, but instead it stayed there. From the side, it certainly looked like it was sticking out more than halfway over the edge. (Picture) Yet it stubbornly stayed put.
On a whim, I filled it with water and put it back. It fell over.
Wait, what? Filling it up shouldn't change the location of its center of gravity, so why would that make it fall over? I started performing more experiments. I rotated the bottle and balanced it again several times to see if there was some asymmetry causing it to have an off-center center of gravity. I thought maybe the water sloshing around could cause its center of gravity to move over the edge, so I I tried holding it there for several seconds before letting go, in order to let the water settle. I noticed the door had some wiggle room, and the weight of the bottle could be causing the door to shift to a different angle, so I tried holding it at different angles. Nothing caused any different behavior. I put it on the ledge empty and slowly filled it with water. When it got to around 1/20 full, it fell over. I found a second bottle and performed all the same tests on it; same results.
At this point I was thoroughly confused. I figured some assumption of mine must have been wrong, so I tried inspecting them. Does the center of gravity of an object really have to be over the edge in order for it to fall? I couldn't think of any situation where that wasn't true. (Generalizing from a non-exhaustive list of arbitrary examples is obviously not a great approach, but I couldn't do much better while in the shower.) Does filling it with water really not change its center of gravity? Oh wait; it does! The center of gravity doesn't move it laterally, but it does move it vertically. That assumption was wrong. (I probably wouldn't have made this mistake if I had been thinking of it as the center of mass rather than the center of gravity. Framing is important.) Unfortunately, that epiphany didn't lead to anything useful; I couldn't see how moving the center of mass vertically could affect whether it was balanced or not.
If you haven't figured it out yet, take a moment to think about it. You have all the information you need. Also, let me know in a comment if and how easily you figured it out before reading the answer below. I'm curious how well I stack up.
Answer: Cohesion between the water on the bottle and the water on the glass of the shower door.
This came to me after I noticed that when the bottle was almost, but not entirely, empty, it would seem to hesitate for a moment before falling. I didn't come to this immediately though. While I did notice the delay at the time and mentally flag it as "weird", I failed to consider how it might fit into the picture, and unconsciously dismissed it as irrelevant without giving it proper consideration. Only later did I have an independent realization that the bottle might be sticking to the door. That realization came from my unconscious mind; I didn't arrive at it though a deliberative process. Once I'd had it, it was trivial to grab a towel and confirm that when dry, the bottle would fall over even when empty.
There were several failures here, but the most important one was not going back far enough in the chain of assumptions I was making. I realized I needed to go through the process "Question Assumptions", but ended up only inspecting the irrelevant ones. I was unable to notice the assumption that actually needed questioning; that gravity was the only relevant force at play.
Properly questioning assumptions; not just going through the motions, but actually locating and inspecting all the foundational pillars of your thought process, is really hard.
Other effects I was considering.
Is the bottle rotationally symmetric? Is there say a weight of congealed shampoo in it?
If there was a slight tilt in this whole setup, the bottle could be marginally off vertical. Empty, the centre of gravity is quite high above the bar, and the slight tilt puts it slightly inward. With some water in the centre of gravity is lower. Full to the brim, the centre of gravity isn't much lower.
Before reading your solution, my guess would be that the center of gravity was always over the edge. It's just that when the bottle was empty, the adhesive forces of the water linking the bottle to the shower door were sufficient to hold it back from tipping.
Edit: It looks like we reached the same conclusion.
Yes, it's definitely a skill that we all need to develop to be able to identify all the assumptions we make in our reasoning. Thanks for the exemplifying post.
if the top flat of the door were a bit inclined, then raising the center of gravity could eventually tip the bottle over. And those doors rarely are really leveled. But sticky surfaces was my first guess.
While I agree that cohesion could explain the phenomena where is the center of gravity for the full and empty container? Most of the shampoo bottles I have seem to have thicker bottoms than sides or tops. This seems to be a case where very careful measurement is needed. Or perhaps more sampling. Do the experiment with 50 shampoo bottles of the same manufacture (and perhaps even bought at the same time to get a common production run).
I got the answer half-way through your third paragraph.
I thought about it for more than 5 minutes and had no idea :)
I didn't open the photo on first read so my mental image of the situation was a bit off (I missed that it was on a shower door, and pictured it perched on something like the rim of a bath)
But my guess before reading the answer was "there's some source of resistance that the added weight helps it to push past" (competing with "there's some small amount of off-centre shampoo in the bottom of the bottle" - although that should have been excluded by rotating it, but maybe it somehow keeps moving?). So I guess I was under-specific but not wrong.