Charging a capacitor through a resistor
Formulating the equations for the RC circuit under load
The circuit
Consider a series circuit consisting of a DC voltage source E, a resistor R and a capacitor of capacitance C, which is initially discharged (uc(0) = 0). At time t = 0, the switch is closed: the capacitor begins to charge.
Loop Law
Let i(t) denote the current and uc(t) the voltage across the capacitor; the law of voltage addition gives: E = R*i(t) + uc(t)
However, the capacitor relates charge and voltage via q = Cuc, and the current is i = dq/dt = C(duc/dt). Substituting these gives: E = RC(duc/dt) + uc(t)
This is a first-order linear differential equation with constant coefficients and a constant right-hand side.
The time constant τ
We set τ = RC, which is homogeneous with respect to time (verified: [R] = [V/A], [C] = [As/V], hence [RC] = s). The equation can then be written as: tau(duc/dt) + uc = E
The constant tau characterises the speed of the phenomenon: the smaller tau is, the faster the charge.
Common pitfall
Do not confuse the voltage across the capacitor uc(t), which is continuous (it cannot undergo an instantaneous jump as this would require an infinite current), with the current i(t), which MAY be discontinuous at t=0 (it jumps abruptly from 0 to E/R when the switch is closed if uc(0)=0).

