See problem at the bottom of: http://www.electronics-tutorials.ws/rc/rc_1.html
See: http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=31 for charging/discharging the capacitor.
Other References: http://hyperphysics.phy-astr.gsu.edu/hbase/electric/capchg.html#c2