# Applying KCL to RC circuit and then solving DE for voltage When you derive the voltage equation for an RC circuit using KCL, they normally show both resistor current $i_r$ and capacitor current $i_c$ as leaving the same node. In reality the current is getting sourced from the discharging capacitor and flows in one direction.

However, when I use the later case I get exponential growth instead of exponential decay when i solve the DE for voltage. Why is that?

Case 1:

$$i_c + i_r = 0$$

$$C\frac{dV}{dt} + \frac{V}{R} = 0$$

$$v~dv = -\frac{1}{RC}~dt$$

$$\int \limits_{v(0)}^{v(t)} \frac{1}{v} ~dv = -\frac{1}{RC}~\int \limits_{0}^{t}d\tau$$

$$ln(v_1/v_0) = \frac{-1}{RC}(t - 0)$$

$$v(t) = v(0)e^{-t/(RC)}$$

exponential delay. good.

Case 2:

$$i_c - i_r = 0$$

$$C\frac{dV}{dt} - \frac{V}{R} = 0$$

$$v~dv = \frac{1}{RC}~dt$$

$$\int \limits_{v(0)}^{v(t)} \frac{1}{v}~dv = \frac{1}{RC}~\int \limits_{0}^{t}d\tau$$

$$ln(v_1/v_0) = \frac{1}{RC}(t - 0)$$

$$v(t) = v(0)e^{t/(RC)}$$

??Exponential growth?? bad.

I remember in school many years ago they said you can assign the current arrows anyway you want, its just the sign comes out minus if you assign the direction wrong, and it corrects itself.

I'm wondering how to make case 2 have exponential delay, the same as case 1.

• First sort out the equations, there are lots of errors, e.g. $\int\: v\:dv =\frac{v^2}{2}$ – Chu Jan 10 '20 at 0:05
• @TonyStewartSunnyskyguyEE75, Yes, but the maths is arbitrary and the OP needs to formulate the problem properly. – Chu Jan 10 '20 at 0:09
• yes of course. I agree now The convention for voltage polarity must follow chosen direction of convention for current and if reversed so must negate polarity for voltage. – Tony Stewart EE75 Jan 10 '20 at 0:14
• see this answer: electronics.stackexchange.com/questions/296866/… – Big6 Jan 10 '20 at 16:17
• take a look at this one too (your same question): electronics.stackexchange.com/questions/253433/… – Big6 Jan 10 '20 at 16:18

## 1 Answer

In case 2, you reversed the direction of the capacitor current. Thus, the current is no longer given as CdV/dt but is now -CdV/dt. When you make that correction, the equation becomes the same as for case 1 and hence has the same solution, as it should. Remember, you can assign the current directions any way you want but then you must follow the circuit laws when calculating voltages.

• case 2: Are you getting the sign for i_c from the polarity of v(t) on the diagram? that is, its minus because the current is pointing in the direction of a voltage rise... what if I arbitrarily choose the polarity of v(t) on the diagram as a voltage drop? would the signs automatically work out in that case? then, I suppose in that case the voltage across the resistor is a voltage rise and i_r is pointing in the direction of the voltage rise so its negative. – pico Jan 10 '20 at 11:30
• So for KCL, you write inputs to the node on one side of equation, and outputs on the other side...that is: sum(input currents to node) = sum(output currents to node)... and the sign that you write for the current terms on each side depends on if the current points in the direction of a voltage drop (positive current) or voltage rise (negative current)? generally the registers are a voltage drop unless the voltage is explicitly written on the diagram then you need to consider the direction of the current to determine its sign... – pico Jan 10 '20 at 11:33