I have a circuit powered by a 9V battery. The circuit will be subjected to significant vibrations. I want the circuit to not power off if the battery is disconnected for a second. Would a capacitor in parallel with the 9V battery do this? How do I know what capacitance I should use? Also, would the capacitor draw too large a current when the circuit is initially powered on?
Yes, it is possible to use a capacitor to keep the device powered during black outs and brown outs. I have done various projects (some withe real time clocks, others with active events on tamper etc).
The question is the current drawn by the load, and the voltage the load will work down to. If you look up a capacitor charge/discharge graph, you can see how the capacitor's voltage will drop as current is drawn from it.
If we know that the device will draw 1mA, and that the load will operate as intended until the voltage has drooped to 6V, we just need an equation to plug the numbers into... Luckily a simple google gives you a formula, or even a calculator.
Plugging in the numbers we've already talked about: V=9 down to 6, I=1mA, with an randomly selected capacitance of 2mF (a not uncommon, but large, capacitor value), gives us a time of just under 6 seconds... Call it 5 seconds to give some head room.
Now, one point I've glossed over, high value capacitors tend to be rated to 2.7V or so. This means that for your 9V supply, we'd need four in series. Capacitance then decreases as they are put in series, Ctotal = 1/((1/C1) + (1/C2)) etc. So you'll need to factor that into your total capacitance.
Four 2mF caps in series would give us 0.5mF, so now we're down to 1.5 seconds. So pretty close to your 1 second requirement mentioned in the question.