Why is easier to keep a bicycle upright when it is moving faster?

Why is it easier for a bicycle to stay upright when it is moving faster? And hard to stand up straight when it is moving slowly? What forces are acting on it that depend on its speed?

A bicycle is an example of an object that is unstable at rest but stable in motion. That it is unstable at rest means that it has an unstable equilibrium: when it is exactly upright, it is at equilibrium (zero net force and therefore inertial). As soon as it tips even a tiny bit, however, forces and torques arise that push it away from that equilibrium. Since it spontaneously accelerates away from equilibrium, given a chance, that equilibrium is termed “unstable.” In contrast, a tricycle has a stable equilibrium — when tipped, forces and torques arise that push it back toward equilibrium and it spontaneously accelerates toward equilibrium.

Even though an equilibrium is unstable, it is possible to keep the object at equilibrium is some other mechanism acts to return it to that equilibrium. In the case of a broom balanced on your hand, the mechanism is you — you can keep the broom in its vertical unstable equilibrium if you move your hand around properly. The bicycle does that return-to-equilibrium trick for you automatically whenever the bicycle is moving forward . The bicycle steers itself automatically back to the the unstable equilibiurm. Taster it is moving forward, the more effective its automatic steering mechanism becomes.