If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

RC natural response - derivation

We derive the natural response of an RC circuit and discover it has an exponential form. Created by Willy McAllister.

Want to join the conversation?

  • leaf green style avatar for user Michael S
    At about I am confused by the direction of i_c.

    Is this the direction of the current that charged the capacitor (before switching?).

    I don't understand how one can then apply KCL at . It seems to me that i_r should = i_c in size and direction.
    (17 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Jonathan B. Landham
      The direction of i_c is arbitrarily designated according to the passive sign convention; see https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/circuit-elements/v/ee-passive-sign-convention for more on the passive sign convention, because it's really important to the application of all these equations.

      As for KCL, the span between the two components still counts as a node, and so the (two) branches still have their currents sum to zero. The issue you're running into is the desire to have all the arrows drawn in the "right" orientation before you've analyzed the circuit. You are correct, the current is the same throughout the node; that's why he invoked KCL. But it is perfectly valid, or even (as in this case) useful to draw arrows in orientations you know to be impossible, and just get a negative result for some (meaning it's in the opposite direction of how you drew it).

      So, yes, the current in both ends of the node is necessarily the same amount, directed to the left. But because we drew i_c as pointing to the right, opposite the direction of i_r, it necessarily must equal the NEGATIVE of i_r. Had we drawn both pointing to the left, they would both equal +[amount], or if we had drawn them both to the right they would both be -[amount], but the all the relationships remain the same; we just lose the passive sign convention.
      (9 votes)
  • female robot grace style avatar for user Felix
    Solving the ODE:

    dv/dt + v/RC = 0
    dv/dt = -v/RC
    dv/v = -dt/RC
    ∫dv/v = -∫dt/RC
    ln(v) = -t/RC + k
    v = e^(-t/RC + k)
    = K e^(-t/RC)
    v(t) = v_0 e^(-t/RC)
    (7 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user energeticasish
    At , why it is told that -(t/RC) has to have no units before we evaluate? What is the reason behind this thing?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      The term -(t/RC) is in the exponent. Exponents have to be pure numbers with no dimensions. That's because exponents are really a shorthand notation for a multiplication operation. If I write 2^3 it means multiply 2 by itself 3 times. If I write something like 3^(4 ohms) where there are dimensions in the exponent, I can't make sense of it: multiply 3 by itself "4 ohms" times?
      (8 votes)
  • piceratops sapling style avatar for user Doug L.
    at you use the formula iC = C dv/dt

    silly question but what is 'd'?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user APDahlen
      Hello Doug,

      This is the notation of calculus - d stands for delta or change. You would think of this as "a change in voltage per unit time."

      In English the equation reads The current on the capacitor equals the product of capacitance and the speed at which the voltage is changing.

      If the voltage is changing quickly the capacitor will have a high current.

      Regards,

      APD
      (3 votes)
  • piceratops ultimate style avatar for user xiaohui Liu
    at (probably a stupid question), why don't you also account for current from the capacitor?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user Casper Eijkens
    At , I get confused. You state that according to KCL,

    i_R + i_C = 0,

    but I thought that is only the case when they are flowing at the same time. In here i_C stops flowing once you turn the switch, right? So how do you know if i_C and I_R are the same magnitude in opposite directions? Why isn't it possible for i_R to be of a different magnitude than i_C?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      In the previous video there was a battery and switch connected to the R and C. The battery provided some charge that flowed through R and got stored on the plates of C. As charge was being added to the capacitor, its voltage increased, (q = Cv) or (v = q/C). At some time in the past, the voltage on the capacitor became equal to the battery voltage. When that happened, you have 0 volts across the resistor, which means v = iR or 0 = iR, telling us i = 0. So just before we flip the switch, capacitor current = resistor current = 0.

      Now we throw the switch and the battery basically vanishes. The circuit becomes just R and C connected at both ends, and there is some charge stored on the capacitor. That's where this video starts. There is only one loop in the circuit, which means there is only one current. Just before the switch is flipped, the current is 0. Just after the switch flips, charge starts flowing out of the capacitor and into the resistor. Moving charge is a current, and it is flowing in both R and C.

      I use a notation trick that maybe causes some confusion. The point of this video is to show you how to derive an equation for what happens next. Looking ahead, I planned out how to get a nice looking equation that didn't have too many minus signs. With this foresight, I labeled the one current with two names i_R and i_C. I did this so I could use the i-v equations for R (Ohm's Law) and C (i = Cdv/dt) in the upcoming steps.

      Please let me know if this helps you understand what's going on here.
      (2 votes)
  • aqualine ultimate style avatar for user Kira Haller
    How would this circuit change if the current went through the capacitor first, then the resistor?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Milan N
    So question, around the variable e was introduced, what does it represent? K was the initial voltage. S became time/sec. I don't know where e came from or what it represents.
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Patrick Dickey
    Admittedly my Calculus is horribly rusty (I took it almost 30 years ago). At the @ mark, you say that "the S comes down..." How does that happen? I guess I'm missing a step in solving the equation that brings S from an exponent into part of the constant. I want to say it is e^s would be S(e^s-1)dx, but I'm not sure if that's correct.
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Waqar Aslam
    I could not understand how that equation is derived
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      The green equation just before is where I take the derivative of the proposed solution. Why do we want to take this derivative? Look over at the last blue equation on the left (labeled ODE). The first term is dV/dt. We are in the process of proposing a solution. In order to test our proposal we have to plug something into the first term of the ODE. And that's why we take the derivative of V.
      (2 votes)

Video transcript

- [Voiceover] Now what I want to to do for the RC circuit is a formal derivation of exactly what these two curves look like. And then we'll have a precise definition of the natural response. What I want to do now is draw our circuit again. There's R, there's C. And we have some initial voltage, we said, on the capacitor, which is V naught. And what we want to find is V of T. And there's R, and there's C. So let me also label the currents in these guys. This is the current in the resistor, and this is the current in the capacitor. So now I'm gonna write the two voltage current relationships for these two components. And Ohm's Law tells me that equals one over R times V. And the current in a capacitor, this is iR, current in a capacitor equals C times dv, dt. That's the two currents in our devices. Now, gonna use Kirchhoff's Current Law on this node right here, and that says that all the currents flying out of that node have to add up to zero. So let's do that. Let's say iC plus iR equals zero. This is KCL, Kirchhoff's Current Law. C dv, dt, plus one over R, times V, equals zero. Now I'm just gonna divide through by C just to be tidy. Dv, dt plus one over RC, times V, equals zero. So what we have here, this expression here is referred to as an ordinary differential equation. It has a derivative in it, and that's what makes it a differential equation, and you can go look up ODE and search for this in Khan Academy and elsewhere and in the mathematical videos, you'll find out different ways to solve this equation. Now we're gonna do the same thing here, and we're gonna try to find an expression for V of t. We're gonna define V of t in a way that makes this equation true. So we plug the function in here, whatever it is, and then we take its derivative and plug that in here and that has to make this whole expression true. There's a couple of different ways to do this, and the one that we're gonna use here is we're gonna guess at an answer. So what we need is, we need a function whose derivative looks kind of like itself, because this thing has to add up to zero. So that means that the function V and the function dv, dt they have to be of the same form so that they have a chance of adding up to zero. The function that I know whose derivative looks like itself is the exponential. So we're gonna propose that there's gonna be an exponential and the way we do it is say, we'll put in some constant here that we can adjust, and then we'll put some constant out here. So this is our guess. Our guess is gonna be that the solution for V of t is gonna be something of the form, some constant times e to another constant, s, times t. The way we test our guess is to put it back into the equation and see if it works. And if it does, then we made a good guess. If it doesn't work, then we have to go back and try something else. So one of the things we need, we're gonna plug v of t in right here. We're gonna need derivative of v with respect to time. So let's take a derivative here. Equals d dt of k, e to the st. And that equals K, and the S comes down. And e to the st remains. So we just took the derivative of our proposed solution and now we're gonna plug it into the equation and see what happens. So now I'm gonna plug in the derivative that we had, plus the proposed solution, and see if our equation comes out true. So dv, dt is sk, e to the st, plus one over RC stays here. And we plug in V, and V was ke to the st. And that'll all equal zero. Now I'm gonna factor out, here's the common term for each one of these, so we'll just factor that out. So now we get ke to the st, times S plus one over RC equals zero. Okay, now let's take a little peek at this. We have to make this zero by the way we pick K and S. How can we make this zero? There's three terms in here, there's three terms in the product. There's this, this, and that. Any three of these terms could be zero. The first one, K is zero, that's a boring one because it says if we have a circuit with no energy it sits there with no energy. So that's not so interesting. Now, e to the st, we can make that go to zero but that takes a long time because we have to let t go to infinity. S would have to be a negative number, and t would have to go to infinity, which is a long time to wait for something to happen, so that's not a very interesting solution either. So here's the interesting one. The interesting one is when S plus RC equals zero so the interesting solution is S plus one over RC equals zero, and that says that S equals minus one over RC. That makes this solution true. And if that's the case, now we can say v of t, we're making good progress here, k, some k, times e to the minus t over RC. Now something really interesting just happened here. Look up here where we have this RC term here. See this right here? This whole exponent has to have no units by the time we evaluate it. That means that RC has to have units of time. RC is a measure, it's in seconds. RC is the units of R times C, ohms times farads, is actually seconds. This whole exponent has to have no units by the time we evaluate it. And that means that RC has to have units of time. And it's actually ohms times farads, comes out to be seconds. Now we solve for S, and that means we only have to find K. Let's work on K now. K is a variable here, time is a variable, and voltage is a variable. If we knew V and T at the same time, we would be able to figure out K. And there's a time when we do know that. And that is t equals zero. At t equals zero we know that the battery was hooked up and there's a bunch of charge on the capacitor so we know that the voltage on the capacitor at time zero, is equal to V naught. So now we have a pair of variables here. We know v and t at the same time, so let's plug that into our proposed solution and see how k pops up. So we're gonna put these two into our proposed solution and see what happens to k. V, at time equals zero, is V naught, and that's equal to k times e to the minus t, minus zero at time zero, over RC. Now this whole expression is e to the zero, or one. So it drops out of the expression and all we get is k equals V naught. K is the starting voltage on the capacitor. And that gives us to our final answer, which is v of t equals V naught, starting voltage, e to the minus time over RC. We can go one small step further and find out what is i of t. Well, i of t is equal to v of t over R, that's just Ohm's Law, and so i of t equals V naught over R, e to the minus t over RC. That is the natural response of an RC circuit.