# Homework Help: Deriving Capacitor Voltage for a Discharging Capacitor

1. Apr 7, 2016

### Potatochip911

1. The problem statement, all variables and given/known data
I'm trying to derive the voltage waveform across the capacitor for a discharging capacitor that has been fully charged by a DC power supply $v_0$, i.e. $v_c(t=0)=v_0$ and then at $t=0$ the switch is flipped and the capacitor starts to discharge.

2. Relevant equations

3. The attempt at a solution

From KVL we obtain
$$v_c=\frac{q}{c}=iR$$
Taking the time derivative of this and since capacitor is discharging $-\frac{dq}{dt}=i$... $$-\frac{i}{RC}=\frac{di}{dt}\\ -\int_0^t \frac{dt}{RC}=\int_{i_0}^{i}\frac{di}{i}\\ -\frac{t}{RC}=\ln (\frac{i}{i_0})\\ i=i_0e^{-\frac{t}{RC}}$$
Now to solve for $i_0$ at t=0 $\frac{q}{c}=i_0Re^{-\frac{t}{RC}}$ becomes $$\frac{v_0}{c}=i_0R\\ i_0=\frac{v_0}{RC}\Longrightarrow i=\frac{v_0}{RC}e^{-\frac{t}{RC}}$$
Finally from KVL $$v_c=iR=\frac{v_0}{C}e^{-\frac{t}{RC}}$$

which is not the correct answer.

2. Apr 8, 2016

### cnh1995

Of course it isn't. You can see it is dimensionally incorrect.(Vo/C doesn't give voltage).
Where does this come from?

3. Apr 8, 2016

### Potatochip911

I got that from the KVL equation (q/c=ir) and at t=0 so $\frac{q(0)}{c}=i(0)R$

4. Apr 8, 2016

### ehild

Q/C=Vo, not Vo/C .

5. Apr 8, 2016

### Potatochip911

Whoops, after making the proper substitution then we get $i_0=\frac{v_0}{R}\Longrightarrow i=\frac{v_0}{R}e^{-\frac{t}{RC}}\Longrightarrow V_c=iR=v_0e^{-\frac{t}{RC}}$ which is the correct expression :)

6. Apr 8, 2016

### ehild

It is useful to check the dimensions during a derivation.