Skip to main content
Physics LibreTexts

5.19: Charging a Capacitor Through a Resistor




This time, the charge on the capacitor is increasing, so the current, as drawn, is \(+\dot Q\).


\[E-\dot QR-\frac{Q}{C}=0\label{5.19.1}\]


\[\int_0^Q \frac{dQ}{EC-Q}=\frac{1}{RC}\int_0^t dt.\label{5.19.2}\]

[Note: Don’t be tempted to write this as \(\int_0^Q \frac{dQ}{Q-EC}=-\frac{1}{RC}\int_0^t dt\). Remember that, at any finite t, Q is less than its asymptotic value \(EC\), and you want to keep the denominator of the left hand integral positive.]

Upon integrating, we obtain

\[Q=EC \left ( 1-e^{-t/(RC)} \right ).\label{5.19.3}\]

Thus the charge on the capacitor asymptotically approaches its final value \(EC\), reaching 63% (1 - e-1) of the final value in time RC and half of the final value in time RC ln 2 = 0.6931 RC.

The potential difference across the plates increases at the same rate. Potential difference cannot change instantaneously in any circuit containing capacitance.

How does the current change with time? This is found by differentiating equation \ref{5.19.3} with respect to time, to give \(I=\frac{E}{R}e^{-t/(RC)}\). This suggests that the current grows instantaneously from zero to \(ER\) as soon as the switch is closed, and then it decays exponentially, with time constant RC, to zero. Is this really possible? It is possible in principle if the inductance (see Chapter 12) of the circuit is zero. But the inductance of any closed circuit cannot be exactly zero, and the circuit, as drawn without any inductance whatever, is not achievable in any real circuit, and so, in a real circuit, there will not be an instantaneous change of current.  Chapter 10 Section 10.15 will deal with the growth of current in a circuit that contains both capacitance and inductance as well as resistance.

Energy considerations

When the capacitor is fully charged, the current has dropped to zero, the potential difference across its plates is E  (the EMF of the battery), and the energy stored in the capacitor (see Section 5.10) is \(\frac{1}{2}CE^2=\frac{1}{2}QE\). But the energy lost by the battery is \(QE\). Let us hope that the remaining \(\frac{1}{2}QE\) is heat generated in and dissipated by the resistor. The rate at which heat is generated by current in a resistor (see Chapter 4 Section 4.6) is \(I^2R\). In this case, according to the previous paragraph, the current at time t is \(I=\frac{E}{R}e^{-t/(RC)}\), so the total heat generated in the resistor is \(\frac{E^2}{R}\int_0^{\infty}e^{-2t/(RC)}=\frac{1}{2}CE^2\), so all is well. The energy lost by the battery is shared equally between R and C.

Neon lamp

Here’s a way of making a neon lamp flash periodically. 

In figure V.25\(\frac{1}{2}\) (sorry about the fraction – I slipped the figure in as an afterthought!), the thing that looks something like a happy face on the right is a discharge tube; the dot inside it indicates that it’s not a complete vacuum inside, but it has a little bit of gas

FIGURE V.25\(\frac{1}{2}\)

inside. It will discharge when the potential difference across the electrodes is higher than a certain threshold. When an electric field is applied across the tube, electrons and positive ions accelerate, but are soon slowed by collisions. But, if the field is sufficiently high, the electrons and ions will have enough energy on collision to ionize the atoms they collide with, so a cascading discharge will occur. The potential difference rises exponentially on an RC time-scale until it reaches the threshold value, and the neon tube suddenly discharges. Then it starts all over again.


Here is a problem that will give practice in charging a capacitor, applying Kirchhoff’s rules, and solving differential equations.

In the above circuit, while the switch is open, \(I_1=I_2=E/(2R)\) and \(I_3=0\). This will also be the situation long after the switch is closed and the capacitor is charged. But we want to investigate what happens in the brief moments while the capacitor is being charged. And what will be the final charge in the capacitor?

We apply Kirchhoff’s rules:

\[E=I_1R+I_2R \label{5.19.4}\]



Here Q is the charge on the capacitor at some time.

Eliminate \(I_1\) and \(I_2\) to get a single equation in \(I_3\).


But \(I_3=\frac{dQ}{dt}\), so we have differential equation in Q and the time t.


This is of the form \(\frac{dy}{dx}+ay=b\), and those experienced with differential equations will have no difficulty in arriving at the solution


With the initial condition that Q =  0 when t = 0, this becomes

\[Q=\frac{1}{2}EC\left (1-e^{-\frac{2t}{3RC}}\right ).\label{5.19.10}\]

Thus the final charge in the capacitor is \(\frac{1}{2}EC\).

The current \(I_3\) is found by differentiating equation \ref{5.19.10} with respect to time, and the other currents are found from Kirchhoff’s rules (equations \ref{5.19.4}-\ref{5.19.6}). I make them:

\[I_1=\frac{E}{2R}\left ( 1+\frac{1}{3}e^{-\frac{2t}{3RC}}\right ) \label{5.19.11}\]

\[I_2=\frac{E}{2R}\left ( 1-\frac{1}{3}e^{-\frac{2t}{3RC}}\right ) \label{5.19.12}\]

\[I_3=\frac{E}{3R}e^{-\frac{2t}{3RC}} \label{5.19.13}\]

Thus \(I_1\) goes from initially \(\frac{2E}{3R}\) to finally  \(\frac{E}{2R}\).

\(I_2\) goes from initially \(\frac{E}{3R}\) to finally  \(\frac{E}{2R}\).

\(I_3\) goes from initially \(\frac{E}{3R}\) to finally 0.

Before the switch was opened, these currents were \(\frac{E}{2R}\) ,  \(\frac{E}{2R}\) and zero respectively. Readers might wonder whether the currents can change instantaneously as soon as the switch is closed. The answer is yes, provided that the circuit has no inductance (see Chapter 10, especially Sections 10.12-15, which deal with the growth of current in a circuit that has inductance). In practice no circuit can be entirely free from inductance; apart from the inductance of any circuit components, any circuit that forms a closed loop (as all circuits must) must have a small inductance. The inductance may be very small, which means that the change of current at the instant when the switch is closed is very rapid. It is not, however, instantaneous.

Here are graphs of the currents and of Q as a function of time. Currents are expressed in units of E /R, Q in units of E C, and time in units of \(\frac{3}{2}RC\).

There is a similar problem involving an inductor in Chapter 10, Section 10.12.

Integrating and differentiating circuits.

We look now at what happens if we connect a resistor and a capacitor in series across a voltage source that is varying with time, and we shall show that, provided some conditions are satisfied, the potential difference across the capacitor is the time integral of the input voltage, while the potential difference across the resistor is the time derivative of the input voltage.

We have seen that, if we connect a resistor and a capacitor in series with a battery of EMF E, the charge in the capacitor will increase according to \(Q=EC\left (1-e^{-\frac{t}{RC}}\right )\), asymptotically approaching  \(QEC\), and reaching \(1-e^{-1}=0.632\) of this value in time RC.  Note that, when \(t<<RC\), the current will be large, and the charge in the capacitor will be small. Most of the potential drop in the circuit will be across the resistor, and relatively little across the capacitor. After a long time, however, the current will be low, and the charge will be high, so that most of the potential drop will be across the capacitor, and relatively little across the resistor. The potential drops across R and C will be equal at a time \(t=RC\ln 2 = 0.693RC\).

Suppose that, instead of connecting R and C to a battery of constant EMF, we connect it to a source whose voltage varies with time, \(V(t)\). How will the charge in C vary with time?

The relevant equation is \(V=IR+Q/C\), in which I, Q and V are all functions of time.

Since \(I=\dot Q\), the differential equation showing how Q varies with time is


The integration of this equation is made easy if we multiply both sides by \(e^{\frac{t}{RC}}\).  (Those who are experienced in solving differential equations will readily think of this step. Those who are less experienced might not immediately think of it, but will soon see that it is a useful step.) We then obtain

\[r^{\frac{t}{RC}}\frac{dQ}{dt}+\frac{1}{RC}e^{\frac{t}{RC}}Q=\frac{d}{dt}\left (Qe^{\frac{t}{RC}}\right ) = \frac{V}{R}e^{\frac{t}{RC}}\label{5.19.15}\]

Thus the answer to our question is

\[Q=\frac{e^{-\frac{t}{RC}}}{R}\int Ve^{\frac{t}{RC}}\,dt.\label{5.19.16}\]

If V = E  and is independent of time, this reduces to the familiar \(Q=EC\left ( 1-e^{-\frac{t}{RC}}\right )\).

The potential difference across C increases, of course, as

\[V_c=\frac{e^{-\frac{t}{RC}}}{RC}\int Ve^{\frac{t}{RC}}\,dt.\label{5.19.17}\]

While t is very much shorter than the time constant RC, by which I mean short enough that \(e^{\frac{t}{RC}}\) is very close to 1, this becomes

\[V_c=\frac{1}{RC}\int V\,dt \label{5.19.18}\]

That is why this circuit is called an integrating circuit. The output voltage across C is \(1/(RC)\) times the time integral of the input voltage V. This is also true if the input voltage is a periodic function of time with a period that is very much shorter than the time constant.

By way of example, suppose that \(V=at^2\).  If we put this in the right hand side of equation \ref{5.19.17} and integrate, with initial condition VC =  0  when t = 0, (do it!), we obtain

\[V_c=aR^2C^2\left ( \frac{t^2}{R^2C^2}-\frac{2t}{RC}+2-2e^{-\frac{t}{RC}}\right ).\label{5.19.19}\]

For example, suppose the input voltage varies as \(V=5t^2\) volts, where t is in seconds. If R = 500 \(\Omega\) and C = 400 \(mu\)F, what will be the potential differnece across the capacitor after 0.3 s? We immediately see that RC = 0.2 s and \(t/(RC) = 1.5\).   Substitute SI numbers in equation \ref{5.19.19} to obtain VC = 0.161 V.

If I write \(y=\frac{V_c}{aR^2C^2}\)  and \(x=\frac{t}{RC}\) equation \ref{5.19.19} in dimensionless form becomes


If you Taylor expand this as far as x3 (do it!), you get \(y=\frac{1}{3}x^3\), which is just what you would get by using equation \ref{5.19.18}, the equation which is an approximation for a time that is short compared with RC. The approximation is good as long as \(\left ( \frac{t}{RC}\right )^4\) is negligible. I show equation \ref{5.19.20} and \(y=\frac{1}{3}x^3\) in the graph below, in which VC  is in units of \(aR^2C^2\) and T is in units of RC.

Equation \ref{5.19.17} (or, for short time intervals, equation \ref{5.19.18}) gives us the voltage across C as a function of time. What about the voltage across R? That is evidently

\[V_R=V-\frac{e^{-\frac{t}{RC}}}{RC}\int Ve^{\frac{t}{RC}}\,dt.\label{5.19.21}\]

Differentiate with respect to time:

\[\begin{align}\frac{dV_r}{dt}&=\frac{dV}{dt}-\frac{1}{RC}\left ( e^{-\frac{t}{RC}}Ve^{\frac{t}{RC}}-\frac{e^{-\frac{t}{RC}}}{RC}\int Ve^{\frac{t}{RC}}\,dt\right ) \\ &=\frac{dV}{dt}-\frac{1}{RC}(V-V_C)=\frac{dV}{dt}-\frac{V_R}{RC} \\ \end{align}\label{5.19.22}\]

If the time constant is small so that \(\frac{dV_R}{dt}<<\frac{V_R}{RC}\), this becomes


so that the voltage across R is RC times the time derivative of the input voltage V. Thus we have a differentiating circuit.

Note that, in the integrating circuit, the circuit must have a large time constant (large R and C) and time variations in V are rapid compared with RC. The output voltage across C is then \(\frac{1}{RC}\int V\,dt\). In the differentiating circuit, the circuit must have a small time constant, and time variations in V are slow compared with RC. The output voltage across R is then \(\frac{dV}{dR}\).