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

Natural response of an RC circuit. The product of R and C is called the time constant. Written by Willy McAllister.
The Resistor-Capacitor (RC) circuit is one of the first interesting circuits we can create and analyze. Understanding the behavior of this circuit is essential to learning electronics. Forms of this circuit can be found everywhere. Sometimes you will create this circuit on purpose, and other times it appears all on its own.
This is one of the first circuits we come across where we have to account for time. To develop a precise understanding requires methods from calculus. We use derivatives to describe the RC circuit.
We want to understand the natural response of this circuit.
Schematic 1.

What we're building to

A resistor-capacitor circuit, where the capacitor has an initial voltage V0, the voltage will diminish exponentially according to:
v(t)=V0et/RC
Where V0 is the voltage at time t=0. This is called the natural response.
The time constant for an RC circuit is τ=RC

The circuit we will study is a resistor in series with a capacitor. How does this circuit respond to an applied voltage?
Schematic 1.

First, use intuition to predict what happens

The circuit we explore in this section is:
Schematic 2.
We want to know what happens to vC, the capacitor voltage, when we flip the switch back and forth.
We’ll analyze these questions one at a time:
What is vC, the voltage across the capacitor,
  • before the switch flips up?
  • after the switch flips up?
  • after the switch flips back down?

Before the switch flips up

We begin our analysis by determining the initial state of the circuit, before anything changes. With the switch in the down position we can draw the following equivalent circuit. vin is 0 volts, and the left end of R is connected to the bottom of C.
Schematic 3
Let's assume for the moment the circuit has been sitting in this state for a long time, so any charge that may have been stored on the capacitor in the past has long since drained away through the resistor, leaving qC=0. From this we know the voltage across the capacitor must be 0 volts, because vC=q/C=0/C=0.
Since the capacitor has 0 volts across it, so must the resistor, so the current through R (and the current through the capacitor) must be 0 amps. The circuit is said to be ‘in steady-state’ or ‘quiescent’ or ‘at an equilibrium’. We've answered the first question, "What is the voltage across C before the switch flips."

After the switch flips up

Now flip the switch up. The voltage vin becomes VBAT, and something is about to change.
Schematic 4
Current begins flowing out of the positive terminal of the battery, through R and C. Charge accumulates on the capacitor. The accumulating charge generates a rising voltage across the capacitor (vC=q/C). The time period where voltage vC is changing is called a transient period.
What keeps vC from rising forever? Charge accumulates on the capacitor until vC rises to the same value as the battery voltage: vC=VBAT. At that point, the voltage across the resistor is 0 volts, so current in the resistor stops flowing (Ohm's Law). That also means current (charge) stops flowing into the capacitor. The amount of charge on the capacitor stops changing and therefore the capacitor voltage becomes constant: vc=VBAT. The transient period has ended.
We've answered the second question, "What is the voltage across C after the switch flips up?" After a transient period, the circuit assumes a new steady state with vC=VBAT. It remains there until something comes along to disturb its bliss.

After the switch flips back down

Now we’ll flip the switch again, returning it back to the negative terminal of the battery (vin=0). What happens now?
Schematic 3
This is the same circuit we started with, but this time C is storing some charge, so there's a starting voltage across it. Because of this, R now has a voltage difference across its terminals. The voltage is vC=VBAT at the moment the switch flips down. Therefore, a current must start to flow in R (so says Ohm's Law). The charge providing this current comes from the charge stored in C. Charge will continue to flow until all the charge originally stored in C is depleted. vC gradually falls to zero volts. The voltage difference across R also falls to zero. The circuit has returned to its original equilibrium state. And finally, we've answered the third question, "What is the voltage across C after the switch flips back down?"

Summary

Using just our intuition, we know the capacitor voltage, vC, starts at 0 volts, rises to VBAT, and then goes back to 0 volts again. Said another way, vC goes from an initial steady state, through a transient to a new steady state, then through a second transient back to its original state. We know the exact starting and ending voltage of each transient. Not bad, but ... What do we not know? We don’t know how long the transients last or their shape. It’s time to break out some calculus to get a precise and useful solution.

Formal derivation of the RC natural response

We start with the simplest possible case. The circuit is just R and C connected together. By "find the response" we mean find v and i as a function of time.
To make the circuit do something (other than just sit there), we place an initial charge on the capacitor. This is done by an external unseen circuit. After adding this energy, we let go and see what the circuit does naturally. Imagine the capacitor was charged to some initial voltage V0 by an external circuit, which was disconnected just a moment ago.
The result we are about to derive is called the natural response of an RC circuit. The natural response is what the circuit does when there is an initial condition, but nothing else is driving the circuit.

Model the components

The R and C components in the circuit can be described by their characteristic voltage-current equations.
For the resistor, we pick a form of Ohm’s Law:
iR=vR
The corresponding voltage-current relationship for the capacitor is:
iC=Cdvdt

Model the circuit

We can write an equation using Kirchhoff's Current Law for the two currents flowing out of the top node.
iC+iR=0
Cdvdt+1Rv=0

Solve the circuit

The previous equation is a first-order ordinary differential equation (ODE). We have the math skills to solve this kind of equation.
The solution to a differential equation is some sort of function, in our case, some function of voltage with respect to time, v(t). v(t) is a solution if it makes the differential equation true.
Cdvdt+1Rv=0
(differential equation)
Where do ODE solutions come from? One way is to make an informed guess at a solution, and try it out.
While gazing at the differential equation, consult your mental trash bin of knowledge about functions.
The two terms in the equation have to add up to zero. This suggests the first derivative of the function needs to have the same form or shape as the function itself. Search your memory for any function whose first derivative looks just like the function itself. Hmm...
A function that fits the bill is some form of the exponential, ex, because the derivative of an exponential is another exponential.
ddteαt=αeαt
To solve our differential equation, we are going to make a bold proposal for the form of the solution. (This part takes courage.) Then we will plug our solution into the equation and work out a few constants specific to the circuit. (This part takes math.) If we find constants that make the equation true, then the proposed function is a solution to the equation, and we win.
Our proposed solution is an exponential function decorated with adjustable parameters, K and s.
v(t)=Kest
  • t is time
  • v(t) is voltage as a function of time
  • K and s are constants we have to figure out
    • K is an amplitude factor that makes the voltage bigger or smaller.
    • s is in the exponent. It has to have units that cancel out time. So the units of s are 1/t.
Let’s check to see if our proposed solution works...
Substitute v(t)=Kest, into the differential equation:
Cddt(Kest)+1R(Kest)=0
Work out the derivative in the first term
ddt(Kest)=sKest
Put sKest back into the differential equation:
sCKest+1RKest=0
Now we can factor out Kest
(sC+1R)Kest=0
This equation represents our specific circuit, with the proposed solution. Almost there. Next, we work out two constants and see if the equation is true.
How many ways can we make the left side equal zero? Three ways: any of the three terms could be zero, K or est or (sC+1/R).
A trivial solution is K=0. That’s equivalent to setting the initial charge on the capacitor to 0 and the circuit just sits there doing nothing. That’s so boring.
Another trivial solution is to make est=0. Set s to any negative value and let t go to +. The exponential e completely dies out, which means we sit around for infinity time waiting for the capacitor to fully discharge. Again, not too interesting.
A more thought-provoking solution comes from the third choice:
sC+1R=0
This equation is true if:
s=1RC
So far, our proposed solution looks like:
v(t)=Ket/RC
Nearly done. All that's left is to figure out K. Examine the initial conditions of the circuit. Recall the capacitor was initially charged to voltage V0. If we call that moment t=0, then
v(0)=V0=Ke0RC
Which evaluates to K=V0.
We found an s and K to make the differential equation true. We are all done. Drum roll, please...
The general solution for the natural response of an RC circuit is,
v(t)=V0et/RC

Time Constant

An exponent cannot have units. This means the product RC in et/RC has to have units of time, to cancel time t in the numerator. This means ohmsfarads = seconds, something you might not have guessed.
The product of R and C is called the time constant of this circuit, and it usually has the Greek letter name τ (tau).
τ=RC
And we write the solution as:
v(t)=V0et/τ
When t is equal to the time constant, the exponent of e becomes 1, and the exponential term is equal to 1/e, or about 0.37. The time constant determines how fast the exponential curve comes down to zero. After 1 time constant has passed, the voltage is down to 37% of its initial value.

Example 1

For the natural response circuit,
let R=3kΩ, C=1μF, and V0=1.4V.
a. Write the expression for v(t)
b. What is v(t) when t=RC ?
c. Plot v(t)

Solution to example 1

a. Write the expression for v(t)
v(t)=V0et/RC
v(t)=1.4et3kΩ1μF
v(t)=1.4et3×1031×106
v(t)=1.4et3×103
v(t)=1.4et3ms
b. What is v(t) when t=RC ?
The RC product has units of seconds.
τ=RC=3×1031×106
τ=3×103=3ms
v(3ms)=1.4e3ms3ms
v(3ms)=1.4e1
v(3ms)=1.40.3679
v(3ms)=0.515volts (circled in the plot below)
c. Plot v(t)
The circle shows the answer from part b: v(t)=0.515V when t=RC=3ms.

A useful rule of thumb:

When time equals the time constant, RC, the voltage is down from its initial value by a factor of 1/e, or down to roughly 37% of its starting value. This is true for any initial voltage, and any RC product.

Example 2

Let R=1kΩ, C=1pF, and V0=1.0V.
a. Write the expression for v(t).
b. What is the time constant?
c. Plot v(t).
d. How many times constants does it take the voltage to drop by 95% from its initial value?

Solution to example 2

a. Write the expression for v(t).
v(t)=V0et/RC
v(t)=1.0et1kΩ1pF
v(t)=1.0et1×109
v(t)=1.0et1ns
b. What is the time constant?
τ=RC=1kΩ1pF
τ=1×10+31×1012
τ=1×109=1ns
c. Plot v(t).
The circle shows the answer for part d.
d. How many times constants does it take the voltage to drop by 95% from its initial value?
Reading the plot above, we see the voltage falling to (10.95)1V=0.05 volts at around 3 nsec, which corresponds to 3 time constants. This point is marked by the circle.

Another rule of thumb

Any RC transient is just about finished after 3 time constants. This is true for any initial voltage, and any RC product.

Summary

The natural response of an RC circuit is an exponential:
v(t)=V0et/RC
Where V0 is the voltage at time t=0.
The time constant for an RC circuit is τ=RC

Epilogue

function ex

The function ex either grows (x>0) or decays (x<0) at some rate, depending on x. There are plenty of other functions with this same general shape. Any function that looks like yx has the same curved shape. If we can get the same shape with different values of y, like 2x or 10x, what's the big deal about this irrational number e? The reason we love e more than any other choice is that e is the one and only number for which the derivative of yx is the same as the function. That is, the slope of ex at any point x equals the value of ex.
xdexxdxx=ex
No muss, no fuss, exactly the same thing.

Exponentials occur in nature

The problem we just solved, the natural response of an RC circuit, is representative of things that occur often in nature. The exponential function is a very good mathematical model for describing how things grow or decay. Uranium decay, population growth, mortgage payments, heating and cooling, and other real-world processes. In the broadest terms: Exponentials arise in situations where the amount of change is proportional to the amount of stuff. For our RC circuit, the rate of change of voltage is proportional to the voltage. The curve is steep when the voltage is high, and shallows out as voltage drops.

Want to join the conversation?

  • aqualine ultimate style avatar for user Jorge R. Martinez Perez-Tejada
    Are differential equations truly necessary? Couldn't this material become more accessible (to lower math backgrounds) if things were introduced in the frequency domain rather than the time domain? Then we would be using only algebra and not calculus. The transformations back to time domain could be introduced later.
    (21 votes)
    Default Khan Academy avatar avatar for user
  • mr pink red style avatar for user manavpandya31
    Why was the current in resistor and current in capacitor taken in opposite directions in derivation of RC natural response ?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      Good question. This is one of the tricky parts of the analysis that most textbooks skip over.

      In the section titled "Model the components" I define two current arrows for the resistor and capacitor currents. I use two current arrows because I want to be sure I get the signs right when I use Ohm's Law for the resistor and i = Cdv/dt for the capacitor. Notice that these equations do not have a negative sign. That's because both of them respect the Sign Convention for Passive Components. (Resistor current flows into the positive voltage terminal of the resistor. Capacitor current flows into the positive voltage terminal of the capacitor.)

      If I had defined a single current arrow, I would have to write one of those equations with a negative sign. I find it awkward to insert negative signs into i-v equations, so I did it the two-arrow way.

      But now I have two current arrows I have to deal with... In the next section, "Model the circuit", the two currents participate in a KCL equation that gives us the differential equation to be solved. It is a pretty simple KCL equation. The signs on the two terms in the resulting equation came out correct, which is the reward for doing the two-current-arrows-then-KCL method.

      You should try this: Define just a single current arrow named i. Then model the components with i-v equations, then model the circuit. This time you equate i in the resistor to i in the capacitor. When you derive the differential equation do you get the same thing? It takes some care to get this right. If it works for you, make that your favorite method.
      (11 votes)
  • male robot donald style avatar for user Ryan Pate
    how many different parts of a circuit are there
    (7 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Aaditya Joshi
    If we are asked to find the current in the resistor of Example 1 . What to do ?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      In example 1, we solved the voltage across the resistor, v(t). Since you know the voltage, and you know the resistor value, you can use Ohm's Law to get the current, i(t). Incidentally, that's also the answer for the current in the capacitor. The same current flows in both R and C.

      Before t=0, the current in the resistor depends on the details of how the "helping" circuit (the switch) was operated. In the case of the specific circuit we started with, the current was 0 before the switch flipped.
      (6 votes)
  • blobby green style avatar for user Avinash Kr Singh
    How to find equivalent resistance of a complex circuit
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf blue style avatar for user Samuel Fuller
      There are several different ways to to do this. I would recommend that first you should convert any Inductors and capacitors in your circuit into impedances. For inductors use Z = jwl. (Where j represents the imaginary impedance, similar to i in mathematics). w is the angular frequency. l is the inductance. For capacitors use Z = 1/jwc (also, -j/wc which can be obtained by multiplying both the numerator and the denominator by j). c is the capacitance. Resistors stay the same (the ohms are purely real). Now combine all of these impedances as if they were a large resistor network. You will likely need a calculator that is capable of doing complex numbers. Good Luck and I hope that helps!
      (4 votes)
  • aqualine sapling style avatar for user Ken Opheim
    In the first part of the lecture, we are asked what is Vc before the switch is flipped up, after the switch is flipped up, and finally after the switch is flipped back down, For the second part (What is Vc after the switch is flipped up) it states that the capacitor voltage(Vc) will rise to the same voltage as the battery. This is incorrect because there is also a voltage drop across the resistor so Vc would be Vbatt - Vr. KVL equation would be Vbatt - Vr - Vc = 0.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user qrrqtx
      As the capacitor is charging, current is flowing and there is some voltage drop across the resistor. But, the longer the current flows, the more charge accumulates on the capacitor. Eventually, the charge on the capacitor reaches the point where the voltage of the capacitor (q/C) is equal and opposite that of Vbatt. At that point (time), current stops flowing. There is no voltage drop across the resistor because there is no current when the capacitor is fully charged. Vr = IR, but I = 0. The charging behavior of capacitors is just the opposite of the discharging behavior that is illustrated so well in this lesson. Another good resource is Prof. Nave's Hyperphysics site. There are pages that show both the charge and discharge behavior of capacitors, along with the math.
      (3 votes)
  • mr pants teal style avatar for user nejc.kukenberger
    Regarding the circut with the battery (constant voltage source).
    How can I calculate the time it takes to charge a capacitor? Just rearange the final RC response equation to find t? What about in a circuit without a resistor? What role does a resistor play when charging a capacitor, anyway (max. current perhaps)?
    Thanks
    (1 vote)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user APDahlen
      Hello Nejc,

      Yes, you can solve by manipulating the equation as you stated. You could use a rule of thumb and assume 66% charge in one time constant and fully charged in about 5 time constants.

      In the real world there is no such thing as "no resistance." All wires have some resistance, the capacitor has an internal resistance, the voltage source (battery) has an internal resistance.

      You are correct about the max current. As an example consider a lithium ion battery storage system connected to a DC to AC inverter. In many of these systems you will find a capacitor on the DC side between the battery and the inverter. Connecting this capacitor directly to the batter would cause an excessive current flow. A "current limiting resistor" is used to charge the capacitor. After the capacitor is fully charged to the DC batter voltage it can be directly connected to the battery.

      Please leave a comment below if you would like to continue the conversation.

      Regards,

      APD
      (2 votes)
  • blobby green style avatar for user JOHANN WEGMANN
    1.-Can we use an Euler formula to solve RC natural response?
    2.-If a baterry chargig DC Vs,is feeding an C R C circuit,being capacitances,opposed or not opposed polarities,may the circuit starts Resonance?
    3.-Any CAP plate metals in LC switches charges and polarity.
    4.-Yesterday I wonder deriving Eulers formula,with Taylor or Maclaurinn series expansion.Thanks and regards Johann Wgmann
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user energeticasish
    So if I am not wrong, v(t) is voltage across resistor? Am I right or Am i missing something? v(t) is just mentioned as natural response. But I want to know whether this v(t) is voltage across resistor or capacitor? As voltage across capacitor is V(0) (V naught), so I believe v(t) is just voltage across resistor with changing time!
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user deena wanika
    can someone help me with this type of questions ?
    Question 1 of EEE20002 Quiz 2 is on the analysis of the first order RL circuit in Figure 2.1, where R1 = R2 = R3 = 10 LaTeX: \Omega Ω and L is an inductor.

    Figure21.png

    Question 1 is to test students’ knowledge and problem solving in the natural response of the first order RL circuit. A possible question may like:

    If L = 10 mH and the initial condition of the current I(t) at t = 0 is I(0) = 1.0 A, the current I1(t) at t = 1.0 ms is ______.
    (1 vote)
    Default Khan Academy avatar avatar for user