\subsection{RC Transients and the Time Constant}

This subsection introduces RC circuits -- circuits containing resistors and capacitors -- derives the first-order differential equation governing charge evolution during charging and discharging, solves it by separation of variables, and defines the time constant $\tau = RC$ as the characteristic timescale of the transient response.

\dfn{RC circuit and transient response}{A series \emph{RC circuit} consists of a resistor $R$, a capacitor $C$, and (optionally) a battery of emf $\mathcal{E}$, all connected in a single closed loop. When the circuit is first connected (or when the battery is disconnected), the capacitor neither holds its initial charge nor its final charge instantaneously; instead, its charge evolves over time. This time-dependent behavior is called a \emph{transient response}.}

\nt{At the instant a capacitor begins charging, it behaves like a short circuit: its voltage is zero and all of the battery voltage appears across the resistor. As the capacitor charges, its voltage increases and the current decreases. In the limit $t \to \infty$, the capacitor is fully charged to voltage $\mathcal{E}$ and the current drops to zero, so the capacitor acts like an open circuit.}

\thm{Charging a capacitor}{A capacitor of capacitance $C$ that is initially uncharged is connected in series at $t = 0$ with a resistor of resistance $R$ and a battery of emf $\mathcal{E}$, forming a single-loop circuit. The charge on the capacitor at time $t$ is
\[
q(t) = C\mathcal{E}\,\bigl(1 - e^{-t/RC}\bigr),
\]
and the current flowing through the resistor is
\[
I(t) = \frac{\mathcal{E}}{R}\,e^{-t/RC}.
\]
Here $q(0) = 0$ and $I(0) = \mathcal{E}/R$. As $t \to \infty$, $q \to C\mathcal{E}$ and $I \to 0$.}

\pf{Derivation of charging equations}{Apply Kirchhoff's voltage law around the loop. The potential drops across the resistor and capacitor sum to the battery emf:
\[
\mathcal{E} - IR - \frac{q}{C} = 0,
\]
where $I = \dfrac{dq}{dt}$ is the current (the rate at which charge accumulates on the capacitor). Substituting gives the first-order linear ODE
\[
R\,\frac{dq}{dt} + \frac{q}{C} = \mathcal{E}.
\]
Divide by $R$:
\[
\frac{dq}{dt} + \frac{1}{RC}\,q = \frac{\mathcal{E}}{R}.
\]
This is a first-order linear ODE. Use the integrating factor $\mu(t) = e^{t/RC}$:
\[
\frac{d}{dt}\!\left(q\,e^{t/RC}\right) = \frac{\mathcal{E}}{R}\,e^{t/RC}.
\]
Integrate both sides from $0$ to $t$, with $q(0) = 0$:
\[
q(t)\,e^{t/RC} - q(0) = \frac{\mathcal{E}}{R}\int_0^t e^{t'/RC}\,dt' = \mathcal{E}C\left(e^{t/RC} - 1\right).
\]
Solving for $q(t)$:
\[
q(t) = C\mathcal{E}\left(1 - e^{-t/RC}\right).
\]
The current is obtained from $I = dq/dt$:
\[
I(t) = \frac{d}{dt}\!\left[C\mathcal{E}\left(1 - e^{-t/RC}\right)\right]
     = \frac{\mathcal{E}}{R}\,e^{-t/RC}.
\]
The initial current is $I(0) = \mathcal{E}/R$, and as $t \to \infty$ the exponential vanishes, so $q \to C\mathcal{E}$ and $I \to 0$.}

\thm{Discharging a capacitor}{A capacitor of capacitance $C$ that is initially charged to charge $q_0$ is connected at $t = 0$ with a resistor of resistance $R$, forming a single-loop circuit with no battery. The charge on the capacitor at time $t$ is
\[
q(t) = q_0\,e^{-t/RC},
\]
and the rate of change of charge is
\[
\frac{dq}{dt} = -\,\frac{q_0}{RC}\,e^{-t/RC}.
\]
The negative sign indicates that charge is \emph{decreasing}: the capacitor is discharging. The magnitude of the current through the resistor is
\[
|I(t)| = \left|\frac{dq}{dt}\right| = \frac{q_0}{RC}\,e^{-t/RC}.
\]
As $t \to \infty$, both $q \to 0$ and $I \to 0$.}

\pf{Derivation of discharging equations}{With no battery in the loop, Kirchhoff's voltage law gives
\[
-\,\frac{q}{C} - IR = 0,
\]
where $I$ is the current through the resistor and $q/C$ is the voltage across the capacitor. During discharge, charge flows off the capacitor, so $I = -\,dq/dt$ (current is positive while charge is decreasing). Substituting:
\[
-\,\frac{q}{C} - R\!\left(-\frac{dq}{dt}\right) = 0,
\]
which simplifies to
\[
\frac{dq}{dt} = -\,\frac{q}{RC}.
\]
Separate variables:
\[
\frac{dq}{q} = -\frac{dt}{RC}.
\]
Integrate from $0$ to $t$, with $q(0) = q_0$:
\[
\int_{q_0}^{q(t)}\frac{dq'}{q'} = -\frac{1}{RC}\int_0^t dt',
\qquad
\ln\!\left(\frac{q(t)}{q_0}\right) = -\frac{t}{RC}.
\]
Exponentiate:
\[
q(t) = q_0\,e^{-t/RC}.
\]
Differentiating gives the rate of change of charge:
\[
\frac{dq}{dt} = -\,\frac{q_0}{RC}\,e^{-t/RC}.
\]
The current flowing through the resistor (in the direction that discharges the capacitor) is $I = -\,dq/dt$, so
\[
I(t) = \frac{q_0}{RC}\,e^{-t/RC}.
\]
The voltage across the capacitor is $V_C = q/C = (q_0/C)e^{-t/RC}$, and the voltage across the resistor is $V_R = IR = (q_0/C)e^{-t/RC}$, so $V_R = V_C$ at every instant, consistent with the loop equation.}

\nt{During charging, the current is positive and flows onto the positively charged plate of the capacitor. During discharging, the current flows off the capacitor, and the instantaneous current through the resistor has the same magnitude as the rate at which charge leaves the capacitor: $|dq/dt| = I$.}

\dfn{Time constant of an RC circuit}{The \emph{time constant} of an RC circuit is
\[
\tau = RC,
\]
where $R$ is the resistance and $C$ is the capacitance. The SI unit of $\tau$ is the second (s). The time constant sets the characteristic timescale of the transient response: at $t = \tau$, the capacitor charge during charging reaches $1 - e^{-1} \approx 63.2\%$ of its final value $C\mathcal{E}$, and during discharging the charge falls to $e^{-1} \approx 36.8\%$ of its initial value $q_0$. After $5\tau$, the transient is essentially over: $1 - e^{-5} \approx 0.993$ of the final charge has been reached during charging, and $e^{-5} \approx 0.0067$ of the initial charge remains during discharging.}

\nt{The time constant is the product of two quantities with SI units $\Omega$ (ohms) and F (farads). Since $\Omega = \mathrm{V/A}$ and $\mathrm{F} = \mathrm{C/V}$, the product is $(\mathrm{V/A})(\mathrm{C/V}) = \mathrm{C/A} = \mathrm{C/(C/s)} = \mathrm{s}$, confirming that $\tau$ has units of time. A larger resistance slows the charge flow, giving a longer time constant. A larger capacitance stores more charge per volt, also requiring more time to charge or discharge, giving a longer time constant.}

\mprop{Charging and discharging at one time constant}{For a charging capacitor, at $t = \tau = RC$:
\[
q(\tau) = C\mathcal{E}\left(1 - \frac{1}{e}\right) \approx 0.632\,C\mathcal{E},
\qquad
I(\tau) = \frac{\mathcal{E}}{R}\cdot\frac{1}{e} \approx 0.368\,\frac{\mathcal{E}}{R}.
\]
For a discharging capacitor, at $t = \tau = RC$:
\[
q(\tau) = \frac{q_0}{e} \approx 0.368\,q_0,
\qquad
|I(\tau)| = \frac{q_0}{RC}\cdot\frac{1}{e} \approx 0.368\,\frac{q_0}{RC}.
\]
After $n$ time constants ($t = n\tau$):
\[
q_{\text{charge}} = C\mathcal{E}\left(1 - e^{-n}\right)
\qquad \text{and} \qquad
q_{\text{discharge}} = q_0\,e^{-n}.
\]
Thus, after $n = 5$, charging reaches $1 - e^{-5} \approx 99.3\%$ of full charge and discharging leaves only $e^{-5} \approx 0.67\%$ of the initial charge.}

\nt{The time constant is independent of the initial conditions and of the battery emf. It depends only on the circuit geometry (through $R$ and $C$). This is a hallmark of first-order linear systems: the timescale of the exponential decay is set by the coefficients of the differential equation, not by the particular solution's initial values.}

\thm{Energy during charging}{When an initially uncharged capacitor $C$ is charged through a resistor $R$ by a battery of emf $\mathcal{E}$, the total energy supplied by the battery is
\[
U_{\text{battery}} = C\mathcal{E}^2.
\]
The energy finally stored in the capacitor is
\[
U_C = \frac{1}{2}\,C\mathcal{E}^2.
\]
The remaining half,
\[
U_R = \frac{1}{2}\,C\mathcal{E}^2,
\]
is dissipated as Joule heat in the resistor during the charging process. The fraction dissipated in the resistor is exactly $50\%$, independent of the value of $R$.}

\pf{Energy during charging}{The battery supplies energy at rate $dU_{\text{battery}}/dt = \mathcal{E}I(t)$, so the total energy delivered during charging is
\[
U_{\text{battery}} = \int_0^\infty \mathcal{E}\,I(t)\,dt = \mathcal{E}\int_0^\infty \frac{\mathcal{E}}{R}\,e^{-t/RC}\,dt.
\]
The integral is
\[
\int_0^\infty e^{-t/RC}\,dt = RC,
\]
so
\[
U_{\text{battery}} = \frac{\mathcal{E}^2}{R}\cdot RC = C\mathcal{E}^2.
\]
The energy stored in the capacitor at full charge ($q = C\mathcal{E}$) is
\[
U_C = \frac{q^2}{2C} = \frac{(C\mathcal{E})^2}{2C} = \frac{1}{2}\,C\mathcal{E}^2.
\]
By energy conservation, the energy dissipated in the resistor is
\[
U_R = U_{\text{battery}} - U_C = C\mathcal{E}^2 - \frac{1}{2}\,C\mathcal{E}^2 = \frac{1}{2}\,C\mathcal{E}^2.
\]
One can verify this directly:
\[
U_R = \int_0^\infty I(t)^2R\,dt = \int_0^\infty \frac{\mathcal{E}^2}{R}\,e^{-2t/RC}\,dt
     = \frac{\mathcal{E}^2}{R}\cdot\frac{RC}{2} = \frac{1}{2}\,C\mathcal{E}^2.
\]
The result is independent of $R$, because a larger $R$ gives less current but a proportionally longer charging time.}

\cor{Energy during discharging}{During complete discharge, the energy initially stored in the capacitor,
\[
U_{\text{initial}} = \frac{q_0^2}{2C},
\]
is entirely dissipated as Joule heat in the resistor:
\[
U_R = \frac{q_0^2}{2C}.
\]
This follows from
\[
U_R = \int_0^\infty I(t)^2R\,dt = \int_0^\infty \left(\frac{q_0}{RC}\,e^{-t/RC}\right)^{\!2}\!R\,dt
    = \frac{q_0^2}{RC^2}\int_0^\infty e^{-2t/RC}\,dt = \frac{q_0^2}{RC^2}\cdot\frac{RC}{2} = \frac{q_0^2}{2C}.
\]}

\ex{Illustrative example}{If a capacitor of capacitance $C$ is charged through a resistor $R$ by a battery of emf $\mathcal{E}$, the time at which the current has dropped to half its initial value is found from $I(t) = (\mathcal{E}/R)e^{-t/RC} = (\mathcal{E}/2R)$, giving $e^{-t/RC} = 1/2$ and $t = RC\ln(2) \approx 0.693\,\tau$. At this instant, the charge on the capacitor is $q = C\mathcal{E}(1 - 1/2) = C\mathcal{E}/2$, exactly half of its final value. The energy stored in the capacitor is $\frac{1}{2}C(\mathcal{E}/2)^2 = \frac{1}{8}C\mathcal{E}^2 = 25\%$ of the energy that will ultimately be stored, while the battery has supplied $C\mathcal{E}\cdot(\mathcal{E}/2) = \frac{1}{2}C\mathcal{E}^2$, exactly half of the total energy it will supply.}

\qs{Worked example}{A series RC circuit consists of a battery of emf
\[
\mathcal{E} = 12.0\,\mathrm{V},
\]
a resistor of resistance
\[
R = 2.00\,\mathrm{k\Omega} = 2.00 \times 10^3\,\Omega,
\]
and an initially uncharged capacitor of capacitance
\[
C = 3.00\,\mathrm{\mu F} = 3.00 \times 10^{-6}\,\mathrm{F}.
\]
At $t = 0$, a switch is closed connecting all three elements in series. Assume ideal wires and components.

Find:
\begin{enumerate}[label=(\alph*)]
\item the time constant $\tau$ of the circuit,
\item the time $t_{1/2}$ at which the capacitor reaches $50.0\%$ of its final (maximum) charge, and
\item the current $I(t_{1/2})$ at that instant.
\end{enumerate}}

\sol \textbf{Part (a).} The time constant is
\[
\tau = RC = \left(2.00 \times 10^3\,\Omega\right)\!\left(3.00 \times 10^{-6}\,\mathrm{F}\right) = 6.00 \times 10^{-3}\,\mathrm{s}.
\]
In more convenient units,
\[
\tau = 6.00\,\mathrm{ms}.
\]

\textbf{Part (b).} The charge on the capacitor during charging is
\[
q(t) = C\mathcal{E}\,\bigl(1 - e^{-t/\tau}\bigr).
\]
The final (maximum) charge is
\[
q_{\text{max}} = C\mathcal{E} = \left(3.00 \times 10^{-6}\,\mathrm{F}\right)\!\left(12.0\,\mathrm{V}\right) = 36.0 \times 10^{-6}\,\mathrm{C} = 36.0\,\mathrm{\mu C}.
\]
We want the time $t_{1/2}$ at which $q(t_{1/2}) = q_{\text{max}}/2$. Setting the charge equation equal to $q_{\text{max}}/2$:
\[
C\mathcal{E}\,\bigl(1 - e^{-t_{1/2}/\tau}\bigr) = \frac{C\mathcal{E}}{2}.
\]
Cancel $C\mathcal{E}$ and solve:
\[
1 - e^{-t_{1/2}/\tau} = \frac{1}{2},
\qquad
e^{-t_{1/2}/\tau} = \frac{1}{2}.
\]
Taking the natural logarithm:
\[
-\frac{t_{1/2}}{\tau} = \ln\!\left(\frac{1}{2}\right) = -\ln(2),
\qquad
t_{1/2} = \tau\ln(2).
\]
Substitute $\tau = 6.00\,\mathrm{ms}$:
\[
t_{1/2} = (6.00\,\mathrm{ms})\ln(2) = (6.00 \times 10^{-3}\,\mathrm{s})\,(0.6931) = 4.16 \times 10^{-3}\,\mathrm{s}.
\]
Thus,
\[
t_{1/2} = 4.16\,\mathrm{ms}.
\]

\textbf{Part (c).} The current during charging is
\[
I(t) = \frac{\mathcal{E}}{R}\,e^{-t/\tau}.
\]
At $t = t_{1/2}$, we found $e^{-t_{1/2}/\tau} = 1/2$, so
\[
I(t_{1/2}) = \frac{\mathcal{E}}{R}\cdot\frac{1}{2} = \frac{1}{2}\cdot\frac{12.0\,\mathrm{V}}{2.00 \times 10^3\,\Omega}.
\]
Compute the initial current:
\[
\frac{\mathcal{E}}{R} = \frac{12.0}{2.00 \times 10^3}\,\mathrm{A} = 6.00 \times 10^{-3}\,\mathrm{A} = 6.00\,\mathrm{mA}.
\]
Therefore,
\[
I(t_{1/2}) = \frac{6.00\,\mathrm{mA}}{2} = 3.00\,\mathrm{mA}.
\]

\textbf{Check.} At $t_{1/2} = \tau\ln(2)$, the charge is $q = q_{\text{max}}(1 - e^{-\ln 2}) = q_{\text{max}}(1 - 1/2) = q_{\text{max}}/2 = 18.0\,\mathrm{\mu C}$, and the current is $I = (\mathcal{E}/R)e^{-\ln 2} = (\mathcal{E}/R)(1/2) = 3.00\,\mathrm{mA}$. Both are consistent with the expected behavior of a charging RC circuit.

Therefore,
\[
\tau = 6.00\,\mathrm{ms},
\qquad
t_{1/2} = 4.16\,\mathrm{ms},
\qquad
I(t_{1/2}) = 3.00\,\mathrm{mA}.
\]
