01 / 20

RC Circuit
Models

Model charging and discharging circuits as first-order linear ODEs, solve them with integrating factors, and interpret time constants physically.

Differential Equations

What Is an RC Circuit?

An RC circuit contains two passive components: a resistor (resistance \( R \), in ohms) and a capacitor (capacitance \( C \), in farads), connected to a voltage source \( V(t) \). Current flows through the resistor and charges or discharges the capacitor.

\( V \)
\( R \)
\( C \)
\( i(t) \)
\( q(t) \)

Kirchhoff's Voltage Law

Around any closed loop, the sum of all voltage drops equals zero. For our RC circuit with a source \( V(t) \):

This is a linear, first-order ODE in \( q(t) \). Dividing through by \( R \):

The Time Constant \( \tau = RC \)

\( \tau = RC \)
Measured in seconds. Larger \( \tau \) means slower charging and discharging.
63.2% Rule
After one time constant, the capacitor reaches 63.2% of its final value: \( 1 - e^{-1} \approx 0.632 \).
5\( \tau \) Rule
After \( 5\tau \), the circuit is considered fully charged (over 99.3%).

Core ODE: Charging a Capacitor

With a constant voltage source \( V_0 \) and initial condition \( q(0) = 0 \), the ODE becomes:

Equivalently, the voltage across the capacitor is:

Core ODE: Discharging a Capacitor

When the voltage source is removed (\( V(t) = 0 \)) and the capacitor starts fully charged \( q(0) = CV_0 \):

The voltage decays exponentially:

Charging vs Discharging Curves

1τ 2τ 3τ 4τ 5τ V₀ t 63.2% 36.8% Charging Discharging
Charging
\( v_C = V_0(1 - e^{-t/\tau}) \) rises from 0 toward \( V_0 \).
Discharging
\( v_C = V_0\,e^{-t/\tau} \) falls from \( V_0 \) toward 0.

Key Distinction: Nonhomogeneous vs Homogeneous

Charging Discharging
Source \( V(t) = V_0 \neq 0 \) \( V(t) = 0 \)
ODE Type Nonhomogeneous Homogeneous
Method Integrating factor Separation of variables
Solution Form \( A(1 - e^{-t/\tau}) \) \( A\,e^{-t/\tau} \)
Steady State \( v_C \to V_0 \) \( v_C \to 0 \)

Solving with the Integrating Factor

1
Write standard form: \( \frac{dq}{dt} + \frac{1}{RC}\,q = \frac{V(t)}{R} \)
2
Find the integrating factor: \( \mu(t) = e^{\int (1/RC)\,dt} = e^{t/RC} \)
3
Multiply both sides by \( \mu \): \( \frac{d}{dt}\bigl[\mu\,q\bigr] = \frac{V(t)}{R}\,e^{t/RC} \)
4
Integrate both sides and solve for \( q(t) \).
5
Apply initial condition \( q(0) = q_0 \) to find the constant.

Example 1: Basic Charging

A circuit has \( R = 1000\,\Omega \), \( C = 2 \times 10^{-3}\,\text{F} \), and \( V_0 = 10\,\text{V} \). Find \( v_C(t) \) with \( v_C(0) = 0 \).

1
Compute \( \tau \): \( \tau = RC = (1000)(0.002) = \) 2 seconds
2
Write ODE: \( \frac{dv_C}{dt} + \frac{1}{2}\,v_C = \frac{10}{2} = 5 \)
3
Apply charging formula: \( v_C(t) = 10\bigl(1 - e^{-t/2}\bigr) \)

Example 2: Discharging from Partial Charge

Same circuit (\( R = 1\,\text{k}\Omega \), \( C = 2\,\text{mF} \)) but the source is removed at \( t = 0 \) when \( v_C(0) = 7\,\text{V} \). Find \( v_C(t) \).

1
Homogeneous ODE: \( \frac{dv_C}{dt} + \frac{1}{2}\,v_C = 0 \)
2
General solution: \( v_C(t) = A\,e^{-t/2} \)
3
Apply IC: \( v_C(0) = A = 7 \), so \( v_C(t) = \) \( 7\,e^{-t/2} \)

Example 3: Time-Varying Source

Suppose \( V(t) = 10\sin(t) \), \( R = 5\,\Omega \), \( C = 0.1\,\text{F} \), and \( q(0) = 0 \).

1
Standard form: \( \frac{dq}{dt} + 2q = 2\sin(t) \), since \( \tau = RC = 0.5 \)
2
Integrating factor: \( \mu = e^{2t} \). Multiply: \( \frac{d}{dt}[e^{2t}q] = 2e^{2t}\sin(t) \)
3
Integrate RHS (tabular/by-parts): \( \int 2e^{2t}\sin t\,dt = \frac{2e^{2t}}{5}(2\sin t - \cos t) \)
4
Result: \( q(t) = \frac{2}{5}(2\sin t - \cos t) + Ce^{-2t} \). IC gives \( C = \frac{2}{5} \).

Transient vs Steady-State Response

t q Total q(t) Steady-state Transient
Transient
The \( Ce^{-t/\tau} \) term. Decays exponentially, vanishes after \( \approx 5\tau \). Depends on initial conditions.
Steady-State
The particular solution. Persists forever. Matches the form of the driving function \( V(t) \).

Current \( i(t) \) in the Circuit

Since \( i(t) = C\,\frac{dv_C}{dt} \), we can differentiate our voltage solutions to find the current:

Charging Current
$$ i(t) = \frac{V_0}{R}\,e^{-t/\tau} $$ Starts at \( V_0/R \), decays to zero.
Discharging Current
$$ i(t) = -\frac{V_0}{R}\,e^{-t/\tau} $$ Negative: flows in the opposite direction.

Common Mistakes

✕ Wrong sign in exponent
Writing \( e^{t/RC} \) instead of \( e^{-t/RC} \). The exponent must be negative for physical decay.
✕ Forgetting initial conditions
The general solution has a constant \( C \). You must apply \( q(0) \) or \( v_C(0) \) to determine it.
✕ Mixing up \( q \) and \( v_C \)
Remember \( v_C = q/C \). The ODE can be written in terms of either: keep track of which variable you solve for.

Summary of RC Circuit Formulas

Charging Discharging
ODE \( \frac{dv_C}{dt} + \frac{v_C}{\tau} = \frac{V_0}{\tau} \) \( \frac{dv_C}{dt} + \frac{v_C}{\tau} = 0 \)
\( v_C(t) \) \( V_0(1 - e^{-t/\tau}) \) \( V_0\,e^{-t/\tau} \)
\( i(t) \) \( \frac{V_0}{R}\,e^{-t/\tau} \) \( -\frac{V_0}{R}\,e^{-t/\tau} \)
\( \tau \) \( RC \) (seconds)
At \( t = \tau \) 63.2% of \( V_0 \) 36.8% of \( V_0 \)
Steady State \( v_C \to V_0 \) \( v_C \to 0 \)

Question 1 of 5

An RC circuit has \( R = 500\,\Omega \) and \( C = 4\,\text{mF} \). What is the time constant \( \tau \)?

Question 2 of 5

A capacitor charges from 0 V toward \( V_0 = 12\,\text{V} \) with \( \tau = 3\,\text{s} \). What is \( v_C(3) \)?

Question 3 of 5

The ODE \( \frac{dq}{dt} + \frac{1}{RC}\,q = 0 \) models which scenario?

Question 4 of 5

To solve \( \frac{dq}{dt} + \frac{1}{RC}\,q = \frac{V_0}{R} \), the integrating factor is:

Question 5 of 5

A discharging RC circuit has \( v_C(t) = 20\,e^{-5t} \). What are \( R \) and \( C \) if \( R = 200\,\Omega \)?