# Homework Help: Charging and discharging capacitor, differential equation

1. Oct 19, 2015

### BOAS

1. The problem statement, all variables and given/known data
A circuit consists of a voltage source, voltage $V$ , a resistor, resistance $R$, and a capacitor, capacitance $C$, in series.

(i) Show that the charge $Q(t)$ in the capacitor satisfies the equation $R Q' (t) + Q(t)/C = V$.

(ii) Suppose that $R$, $C$ and $V$ are constant and that $Q$ is initially zero. Find an expression for $Q(t)$. Sketch the solution.

(iii) Suppose instead that $V = V_{0}$ for $t < T$ and $V = 0$ for $t > T$, where $V_{0}$ is constant and $Q$ is again initially zero. Find the new expression for $Q(t)$, both for $t < T$ and $t > T$.

2. Relevant equations

3. The attempt at a solution

I have managed to answer part 1 and 2. I used kirchoff's loop rule to show that the charge in the capacitor satisfies the given equation, and solved it to find $Q(t)$.

I found that $Q(t) = vc(1 - e^{\frac{-t}{RC}})$ which is a pretty standard result and satisfies the condition that $Q(0) = 0$.

I am stuck with part 3. I know that discharging capacitors obey $Q = Q_{T} e^{-\frac{t}{RC}}$, where $Q_{T}$ is the charge on the capacitor when the voltage is set to zero. (By solving the same differential equation with V = 0)

I have tried writing the charge on the capacitor as a piecewise function for t < T and t > T, but each expression does not equal the other at t = T.

Am I supposed to find a single expression that encapsulates this behaviour?

2. Oct 19, 2015

### Staff: Mentor

Vo adds charge as a decaying exponential to the capacitor throughout time interval T. Then, starting with this value of charge, it drains away in a falling exponential.

3. Oct 19, 2015

### BOAS

$Q_{t < T} = CV_{0}(1 - e^{-\frac{t}{RC}})$

$Q_{t=T} = CV_{0}(1 - e^{-\frac{T}{RC}})$

$Q_{t > T} = Q_{t=T} e^{-\frac{t}{RC}}$

Like this?

4. Oct 19, 2015

### Staff: Mentor

That looks right.