It appears several people are not aware of the culture flip formula, so here it is (this is from Sorenson, who is responsible for this programming):
P=((F+T)*Cc*H*(Cte/Cty) - G)/(2000 * D)
where:
P = probability that it will flip this turn
F = # foreignors, with resistors counting double
T = # working tiles under foreign control (out of the max of 21, no matter what the cultural boundaries are atm)
Cc = 2 if foreign civ has more local culture than you, 1 otherwise
H = .5 for WLTKD, 2 for disorder, 1 otherwise
Cte = Total culture of the foreign civ
Cty = Total culture of your civ
G = # garrison units
D = relative distance to capitals
Reorganizing this gives the required garrison guarenteed to stop a flip as:
G = (F+T)*Cc*H*(Cte/Cty)
As you can see there is a nice set of extra factors there. Now when you take a city Cc is likely to be 2 for a long while. And then there is the culture ratio. And this is a true ratio so it could be 1.1:1, 2:1, 5:1 depending on how much culture each of you has.
Government type is not relevent at all, and adding units as garrison in the city reduces the chance of flip.
If you check this
Flip Calc out you can put in the numbers and see exactly what effect moving troops in has on flip chance. Sometimes the difference is minute and all you are realistically doing is putting your units at risk if it does flip. Putting armies in cities is absolute madness IMO (since armies a rare breed).
My preferred method of controling it is to starve cities and retake them if they flip. If I am going to wipe out a civ within 10 turns or so I will just leave the city without leaving troops in, and quell the resistance when the civ is dead (so no flip chance).
Also worth noting is that cities do not flip the turn you capture them, so you can leave as many troops in as you can the first turn to quell resistance.