 What we're going to do today is sort of a capstone issue for circuits. We're going to combine resistors, EMFs, batteries, capacitors, all into one circuit, and play around with them a little bit. Then I'll begin by motivating why this is an important thing to understand. This is going to be a little tricky. There's a new bit of technology that I'm going to introduce today, only briefly and in passing. This is not a course in mathematics, nor do I expect you to do the thing I'm going to mention today. I just expect that you'll be able to use the solution, but I will talk a little bit about differential equations, what they are, and the magical way that you solve them, which still to this day I have a student who took this class and she wound up working with me on research afterward, and she had to solve differential equations to do that research, and she was still in denial at the end of her research time that the way that you set up and solve differential equations largely involves a guess. So you thought there must be some more rigorous trick to this, and I kept trying to explain to her, no. When basically once you learn the basic rules of thumb with differential equations, you guess a solution, you try it, and you see if it works. If it works, it's a solution. There might be others that are equally valid, but in many ways, when you learn to set up and solve these things, you're basically learning to guess in an intelligent way. So today we're going to talk about resistor capacitor circuits. Which would normally be a pretty seemingly dry subject, but actually there's some interesting storytelling here that can motivate why it's useful to learn about this stuff. And the storytelling begins with these two individuals. Sir Alan Hodgkin and Sir Andrew Huxley. Does anybody know these two people? One of them died very recently, 2012. The other one died when I went to grad school in 19... They got the Nobel Prize in Physiology or Medicine in 1963. And they got it for applying physics to biology. So what they won, they won with another gentleman, Sir John Eccles, in 1963. And the Nobel announcement lists the award as being given for their discoveries concerning the ionic mechanisms involved in excitation and inhibition in the peripheral and central portions of the nerve cell membrane. Basically, they figured out how ions move in a nerve cell, which now is the fun, it's a very fundamental piece of knowledge. And current goes in, current goes out. There's a time profile related to that. You have to assess what amount of stimulus is required before a current will flow. Things like all this very basic stuff, all this very basic science. But that basic science is now really the foundation of the model of the way in which the brain not only takes in information, but learns, stores information and transmits information within itself. So this is really important work. And if you go to the Wikipedia article, for instance, for Alan Lloyd Hodgkin, you'll see that at least that he worked on experimental measurements and developed an action potential theory. So the action potential that you guys learn about in biology comes from the work that these people did, as recently as 1963. So they were doing their work in the two decades prior to getting the prize. But the prize was awarded fairly recently and fairly soon after they did their work. So basically they came up with a way to represent one of the earliest applications of technique and electrophysiology, that is the combination of electricity and magnetism and physiology, known as the voltage clamp, which I'll demonstrate a little bit later. The second critical element of their research was the use of the giant axon of the veined squid. Human neurons are very tiny. And at the time that these gentlemen were doing their research, there was no technological way to actually measure what they wanted to measure. They wanted to measure the ionic currents, the potassium flow, the sodium flow, and so forth, in and out of the membranes of the neurons, specifically the axon. So what they did was instead of waiting for technology to get sensitive enough and tiny enough that they could do that work on mice or humans or something like that, they sought out an animal that actually had very large neurons, and one of those animals is in fact this veined squid. Its neurons are very long. You can go look at pictures of them on the internet if you like. Make them very amenable to being measured with the techniques of the time. So they were actually then able to do sort of the first accurate measurements of ionic currents in and out of these cells, which is an impressive feat in and of itself. So as it says here, they really weren't able to do this in almost any other neuron because those cells are just too small. So what was it that they were trying to do? Well, they were trying to do, we have the benefit of historical perspective now. So we have a tremendous amount of technology that's allowed us to look very deeply inside of cells, inside of the brain to see what it's composed of and how those structures function together. And this is one of the basic structures of the brain. So you have the dendrites that take in stimulus, the nucleus of the cell here, the cell body for the neuron. Then it's got this long structure called the axon. These little pinching places here are the nodes of Ranvier. And then finally you have the axon terminal bundle, which itself then connects into the dendrites of neighboring neurons. And so this functions as part of a larger thing called a neural network. Computational scientists have been using neural networks now for decades to do something called machine learning. Machine learning is when you don't know what the mathematical function is that describes a process in nature. So you do what a human being does. You expose a computer over and over again to the process you want to describe and things that can fake the process that you want to describe. And by doing this, you actually re-weight the little nodes in your computational network. And over time, if you do this a thousand times, 10,000 times, these networks can be trained to identify one pattern and reject others. So I mean, you and I take for granted, maybe this is easier. When we look at this and we see stapler, right? We have a word that we associate with this object. We learned it when we were quite young. I also learned when I was quite young not to put my finger here and hit the stapler, but that's a different story, okay? We learned by stimulus and that stimulus can be pain. That stimulus can be visual information coupled with audio information. There's a whole variety of ways in which our brain is wired into our ears, tongue, eyes, nerve cells in our fingers, toes, and so forth, okay? We've taken a tremendous amount of stimulus. And that stimulus comes in as electric potential changes to the dendrites, which can induce a current through the resistors and what turn out to be capacitors that are essentially biologically within this structure, okay? And so the questions that Hodgkin and Huxley were trying to address were, why is it that a minimum threshold is required before you get this change in potential? And how do you model that using something that a human being could understand without knowing the particulars of what's going on inside the cells? Because again, remember, they didn't really have the technology then to look deeply inside of the cells and make precision measurements, even on a large structure like this, to know exactly what was going on. So they had to build models to mimic what they saw happening from their measurements. And those models, well, one of those models won them, in part, the Nobel Prize. Okay, so this is what they were trying to understand, and human beings today are still using basic assumptions about how these structures function to do things like machine learning. For instance, I know that companies, some companies like telecommunications companies use these and other advanced techniques for teaching machines to learn to create all kinds of products to suit your needs. So that when you search for something online, they have an algorithm that uses machine learning to discern what you meant in your search. So some words are the same, their meaning is distinguished by context. You can train machines to learn what context is and then give you the right answer, okay? So physiologically, biologically what's going on is that the axon is essentially, if it's no stimulus is coming in, it's sitting at something called its resting potential. And that is just an electric potential difference across the membrane of the cells in the axon that is maintained in the absence of any external stimuli. And so again, a stimulus here from a physics perspective is an external change in the voltage across the system. That would be a stimulus. I mean, chemically, electrically, that's what's really going on here. It's not like somebody shouting at the neuron down the line. It's all electrons and ions and stuff, okay? So it's all basically physics at its heart. The resting potential is obtained by maintaining a high concentration of potassium inside and a high concentration of sodium outside of the membrane. And the net balance of these positive charges leads you with a slight negative charge inside and a slight positive charge outside. And so you can already see, you've got a separation of charge. I've talked about this before. That's essentially a capacitor. So this cell is maintaining an electric potential difference in the same way that a capacitor maintains an electric potential difference through a separation of charge, okay? And so charge physically cannot cross the cell membrane until the cell membrane allows it to by opening pumps, ion pumps and ion channels. And so that resting potential is simply held. Now, what happens is a stimulus will come into the cell. Now, if your neurons responded to every single electrical stimulus, you would be flopping on the ground constantly. You'd have no motor control whatsoever, you'd be drooling, it would be terrible, okay? That's because we are constantly being stimulated and not just by external things. There's noise in a biological system. There's all kinds of jitter, right? Ions are bouncing around in here due to thermal motion. That might accidentally change the voltage across the potential just by thermal motion alone. You wouldn't want, your brain has maintained a pretty narrow temperature range. And moving outside that temperature range is extremely deadly, okay? For a variety of reasons. But from a physics perspective, the last thing you want is a slight change in temperature to suddenly cause your neurons to fire. That would be really pointless, okay? So biologically, there's a mechanism built in that prevents a stimulus of arbitrarily small size from causing anything to happen in their neuron. You have to, so the resting potential is about negative 70 millivolts. If a stimulus comes in that raises the potential to about negative 50, negative 55 millivolts, okay? So it brings it up a bit. It crosses something called the threshold. And at that point then, ion channels will actually open and allow ions to move, and this will allow a current to flow down the axon. So what happens is that the potential comes in, it changes. If it crosses a certain threshold, ion channels will open. At first, what happens is that sodium will move in, and this will move more positive charge inside the cell, depleting the positive charge outside the cell. And you'll create a reverse of the situation that you had before, whereas you started at a negative potential difference. You flip the sign of the stored charge, and you now change this to a positive potential difference across the cell membrane. Okay, and I'll show you a graph of this in a minute. But the basic biology of what's going on is ion channels open. They only allow sodium in. They pump it in using electric fields. And now you create a new gradient of charge in the system, creating net positive inside and depleting the positive outside by pulling in the sodium ions. Okay, so this causes part of the axon now to have an opposite potential. And then this will repeat. So these gates will now open, letting in sodium. These will now pump potassium out of the cell and return this back to its resting potential. And this whole sequence of positive negative charge flipping will repeat down the neuron until finally that stimulus makes it all the way to the axon terminal bundle, where that can then be applied as a new voltage to a new dendrite set on another neuron. And the whole sequence repeats. So you have all kinds of things going on here. You have resistances inside of this network. That means that there will be a loss of current. There will be a loss of charge wasted in a loss of energy, essentially wasted in overcoming the resistance of the cell system itself. So not all of the signal that comes in is going to make it all the way down here. And you can kind of begin to see where learning might come from at its very most basic level, its most basic biological, chemical, and physical level. Learning requires a certain threshold of stimulus to be achieved before you can even propagate signals through the neural network. And even then, propagating them isn't enough, they have to be strong enough that they can be transmitted to other parts of the network as well. And so we already know, we can make this analogy, right? It's very hard to learn new things. We really have to be motivated and interested. Physics is a fantastic example of that. So if you don't already love physics, you have to be kind of convinced that man, I'm gonna stay awake for the next hour rather than taking a nap. All right, so I try to be bouncy and jump around and stuff and keep everybody alive and awake. And yeah, see, Katherine, you're raising your hand and asking a question. Look at that, you're learning for science. So the myelin sheath, those are insulators. So how do they move to the nodes of room here in the insulator? So the myelin sheath is an insulator, but the medium inside is not. So ions can move inside the sheath, right? And so actually, one of the ways that this is modeled in sort of a physics way is to say, okay, well, you have an insulator sheath out here. But you also basically you have a conductor that allows charge to move inside the sheath. And in fact, this can be modeled as something called a coaxial cable. Coaxial cable, incidentally, is what brings cable TV into all of your apartments, homes, dorm rooms, whatever, okay? Those little screw-in cables that you have to thread into the back of your TV and then into the wall. They're slowly getting replaced with HDMI. But still, when you get the service out of the wall, it usually comes out on a little screw-in cable. That's known as a coaxial cable. And it's great because it's two conductors and a lot of insulators. And it's very similar to this system right here. And what's nice about it is it minimizes signal loss. That's what makes coaxial cable so valuable to the cable industry. It is far better than these little cords here, these terrible little braided wire cords that come in. They lose signal like crazy. You've got all kinds of reflections in them, it's a mess in there. But in coaxial cable, you can get very clean transmission of signals down them and very little loss along the length of the cable, by comparison to other things. Okay, so it doesn't dissipate to the inner social system? Exactly. Yeah, in fact, you need the mileage sheath in order to keep charge from leaking out or this would never work. And so presumably what happened over millions and millions of years was that as cells developed and differentiated into different kinds, there was some natural selection advantage to this particular kind of system that then allowed it to stick around and be used for various things. So this structure doesn't only happen in neurons. It repeats in other structures and natures as well. It just happens to be the basis of information transmission in a brain. So this is the picture of what this learning process looks like. Resting potential of negative 70 millivolts, some stimulus comes in. If you cross the threshold for opening the ion gates, they open. You get a rapid change in potential up to a maximum. Then the sodium channels close, the potassium channels open. The voltage falls again and it overshoots its original resting potential. Why is this important? Why is this a useful thing in learning? Any ideas? We actually take advantage of this feature in physics to build precision energy measuring devices. Yeah, Ethan? That's right. But why is it advantageous for learning for that to happen? From a biologic perspective, why not evolve that out? Why not just have it return right back to its resting potential and sit there? Time to do what? To reset. Yeah, time to reset. You need a little time. If another stimulus were to come in right here and this was back to resting potential, this neuron would fire again immediately. And so neurons would be very sensitive to firing. You'd get jitter in the neuron as a result. This overshoot compensates for any stimulus that comes in just at that moment. So this neuron is still basically occupied and busy and it returns gently back to its resting potential, giving the system time to reset. And we do this, for instance, we use this when we're shaping signals coming in from the Atlas experiment that I work on for our big energy measuring device called a calorimeter. It's huge. It's made of liquid argon and electrodes. And we shape the pulses coming out of that to prevent multiple proton-proton collisions which happen every 40 millionth of a second. Every 40 millionth of a second, you get a collision. And we don't want two of those collisions to hyper-stimulate the calorimeter. So we have this overshoot in to prevent signals from getting overlapped and warped by one another. So we take advantage of something that nature takes advantage to make clean signals for a learning system. We do it to read out energy. Nature does it in the brain to prevent overlearning, overstimulation of the neuron, giving it time to reset. So all of this turns out to be an example of something called a resistor capacitor circuit. Now, I'm going to explore in this lecture a relatively simplified version. But I'll come back to the Huxley-Hutchkin model in a bit before we wrap up the lecture, okay? So a couple of things I want you to keep in mind. Some very basic toolkit information. Like I said, I'm not going to show you how to solve a differential equation. I'm simply going to utilize the solution. But I will motivate where these things come from and that it can be useful to know how to solve them. So useful bits of information. First of all, this is going to seem very peripheral for a second. But I want you to dig deep back in time and remember this function, e to the x, okay? It has a corresponding related function which is known as the natural logarithm. And it's written as log base e or just l, that's not it, ln for natural log, okay? But I'm just going to focus on e to the x because e to the x is really easy to remember. If you have this function and you are told, calculate the derivative of e to the x with respect to s. What's the answer? e to the x, so I love this function. It's so easy to remember, okay? Basically, if you take the machine that is the derivative and you act on this function of x, it returns the function of x, that's it. So function goes in, function comes out, all right? Now if you have a constant or something up here, you have to use the chain rule to figure out what happens to the constant, all right? So if you have something like d dx of e to the ax, where a is a constant, it does not depend on x. Then if you apply the chain rule, you wind up with just a e to the ax. So you get the function back times a. Here you got the function back times one. So there's just a one multiplying this and you just get one back here. So it's easiest to remember that one. And then if you remember I have to do the chain rule. When you have something in the exponent, then you can very quickly derive the thing I wrote there on the right. So let me get this out of the way. So that nobody thinks that it's part of that equation. All right now, what about the indefinite integral, that is any arbitrary limits of e to the x with dx, okay, Rachel? Yeah. Yeah, in the ax thing, you said that's the chain rule, or that's like a shortcut or what with it? Well, so this is the shortcut. But the chain rule is that the first thing you do is you take the derivative of e to the ax and that just gives you e to the ax back. But then you have to take the derivative of its exponent. And the derivative of ax is a, and you multiply that by e to the ax. So it's just chain rule. So it's a bit applied secretly behind the scenes. Okay. Yeah, I'm not going to do that in front of you here. There's no big difference where we're going to be at. Yeah, yeah, okay. All right, what about the indefinite integral of e to the x dx? Not Catherine this time. No. Well, what did the derivative do? It was the same thing back. And the integral is the anti-derivative. So what's the function that when you take the derivative of it gives you e to the x? E to the x. It's the best function in the universe. I love it. Okay, that's it. It's really easy to remember. As long as there's no thing lurking up in the exponent that multiplies x, it's super easy. So if you're ever looking to, there are problems. And these problems are going to the class of things called differential equations. This is a fancy term for solving an equation by looking for the function, not the number, the function that satisfies the equation. Functions can algebraically be plopped into an algebraic equation. And then all that matters is that that function satisfies the equation. That's it. That's all that matters. And so differential equations are just a fancy way of saying an equation whose solution is a function, not a number, a function. Nothing wrong with that, mathematically totally allowed. We're going to run into one of those real fast today. But I just want to motivate that sometimes when you're looking for a solution, and part of the problem clearly involves a function that when you shove it in, you get the function back. E to the x is a great guess, or e to the something times x is a great guess. Okay? The other thing that we need, still broken, fantastic. Your tuition, hard at work folks, okay? Capacitors, capacitors, capacitors. Let's go back and remember that simple, okay? So the plus side, that's where all the positive charge is accumulating. The minus side, that's where all the negative charge is accumulating. And we're going to start sticking these things in circuits now. So the simplest circuit that I can write down would be a battery. And, well, the really simplest circuit I can write down, we already kind of looked at, is just to shove a capacitor in there with some capacitance c, okay? So we have some electromotive force, calligraphy e, and it's applying a constant ideal voltage to anything that's plugged into it. What we've plugged into it is a capacitor. The positive terminal of the battery is the one that emits positive charge, okay? So in a very simple circuit like this, we already know what direction current is going to flow. But let's start thinking about this, not as a static situation, but one where time is a factor, okay? I promise you we would do this at some point and the day of reckoning has come. So, let's think about time very qualitatively for a second. I have a switch. It is preventing current from being pushed out of the positive side of the battery and going over to the capacitor. The capacitor begins uncharged. So this is just kind of primed and waiting to have the switch thrown and the circuit closed and the loop completed and then current can flow. So let's do that. Right at time zero, T equals zero, you close the switch, okay? So what happens right at that little instant of time, that little infinitesimal moment in time after the switch is closed and current can flow? What happens if current can flow? Current flows. Current flows, yes, exactly. So current begins to flow. Current begins to flow. Okay, now it's some later time, T greater than zero. Second or two later, okay? Not a lot of time, the second or two later. What's the current going through the circuit? Is it the same as the current that we started with in that little infinitesimal moment right after the switch was closed? Is it greater? Is it less than the current? Any ideas? Is it less than? Okay, same, what's that? Less than. Less than, okay. So why do you say it's the same? It should be the same throughout. So let me pose a question back to you. Is there a place in the circuit where charge can build up and stop? On my capacitor. On my capacitor. All right, so let's think about that then. So right in that instant, right after the switch is closed, we start having a current that flows, okay? I, and this is a nice simple circuit. It's gonna go clockwise through the system. All right, so the battery's pushing out positive charge to the top. It's pushing out negative charge on the bottom side, okay? The other way you can think about it is positive charge is flowing off of the capacitor through the battery and then up to the top. So we start to build up maybe one little positive charge and one little negative charge just after the switch is closed, okay? Then as time goes on, we start to build up more. On the capacitor. What's happening inside the capacitor? What's getting built up inside the capacitor? Charge is on the surface, but what's happening in that space between the plates? Right, potential difference coming from an electric field. We're getting an electric field that's getting built up in here, okay? Now these positive charges, they really want to be here, okay? They see these negative charges across the gap. But they can't cross the gap because there's empty space there or some dielectric, some nonconducting medium, okay? So we're getting now a situation where we have high potential up here from the perspective of positive charges and low potential down here. Again, from the perspective of positive charges. They really want to be here because they see these negative charges and they see all these other positive charges next to them and they don't want to be there. They want to be where the negative charges are, okay? But they can't cross the gap. So charge is building up. The electric field in here, consequently, is also building up. We're getting a potential difference here, V, that's building up. If enough time passes, what happens to current flow in the circuit? What do you think's gonna happen if enough time passes? It'll stop, right? Because what's gonna happen is that you're gonna get to the point where you push that last positive charge up onto the top. The voltage here is now exactly equal to the voltage from the battery. You run out of energy, that's it. The battery can no longer overcome. The potential difference here and current will stop. So going back to the question again, what's current doing maybe a second or two after the switch is thrown? Is it the same greater or less than where it started? What do you think? You originally said it's the same, because current is conserved. But we see current isn't conserved in the circuit, right? It can build up in places. So ask the question again, sorry. What is the current gonna be a few seconds after you throw the switch? The same as when it started out right after you threw the switch? Less than or greater than? Less than, right? Because as the battery starts to push charge here, charge builds up, you get an electric field, V starts to grow. As V starts to grow, it opposes the battery. So the battery keeps pushing until it can no longer put enough energy per unit charge into the circuit to move any more positive charge to the top, and it stops. So what's less than? The current at some, I'll write it here, so the current is now less than at the beginning, okay? So at the very beginning, the current is as big as it's ever gonna get. But the minute it puts one positive charge on the top plate, you create an electric field that opposes the battery. And you keep building up charge, and it keeps opposing the battery until eventually the battery just can't put any more charge on the capacitor. As you deplete positive charge from this side and put it over on the other side. There just comes a point where there's not enough energy to deplete more. And put it here, cuz all this positive charge is pushing back against any more positive charge, saying, nope, that's it. You don't have enough energy to get over here anymore. So when you said there's less current, are you saying less current? Yes, less current in the whole system. Yeah, so what happens over time, and I'll demonstrate this in a second with a simple circuit that you can watch, is that the current decreases over time. And then we can just say time equals infinity. So a very long time later, okay? No current, okay? And that's in this simple circuit. So let me demonstrate this with a simulation. Okay, so this is the physics education demonstrator for a basically an arbitrary simple circuit set. So let me do that and then that, all right? So this is really cool. It's a little Java program. You can fire it up on your Mac, your Windows machine, your Linux machine, which is what I'm running here. And you can build circuits. And so actually the student that I worked with who had been in my class and she did research with me afterward, Holly, she actually used this to model her simple circuit of the neuron. It looks very cartoony, but it builds in all of the basic physics that you'd otherwise have to solve by hand using a very complicated set of equations. So I'll show you one of in a moment. But it's got all the great stuff. It's got batteries, so we can drop in a battery here, all right? So let me do that. So I'll put a battery, okay? Now this battery has no internal resistance to begin with. So we can drop little wires in. You see it even has little charges in it that are free to move. Drop some wires, here we go. Okay, drop a little more wire, very good. Okay, now I'm gonna put a capacitor in. So I'm gonna recreate the circuit that I've shown you up on the board. So there's my little capacitor, a couple of parallel plates, all right? And then we'll finish building this out. I'm gonna cheat, and I'm just gonna connect that up. Okay, you see what happened? I plugged that thing into the battery, boom! Charge just immediately separated. So all the positive charge is now up here, all the negative charge is down here. That's a little too exciting for my tastes. So now if I flip the switch, this is gonna happen very fast, boom! Okay, so you saw a little bit of current flow here, but it was very hard to see. So the way we're gonna improve this situation is we're going to add a little resistance into the system. I have dropped in a resistor, and by default, it sets the resistance to 10 ohms. The battery has a voltage of nine volts to begin with, and the capacitor's still charged from the last time I closed the switch. So let me short-circuit this thing. So there we go, all right, discharge the capacitor. Now watch when I throw the switch. This hopefully will be a little more slow motion. What's the resistor doing? It's providing opposition to the flow of current. And so less current is going to flow net through the system at first, and it will take longer as a result to charge up the capacitor. So let's see if that's the case. So I throw the switch, we see the current moves a little bit, and then eventually the positive charge builds up, and we are right back to where we were. So let me, all right, so let's watch it again. So there we go, a little current flows, but the positive charge builds up. It opposes the positive end of the battery. Current stops, okay? And you can futz around with the resistance here. You can make it bigger. You can make the current slower as a result, and less charge per unit time, thus gets deposited on the capacitor. And so you wind up with a situation where you can watch this current move really slowly to charge up the capacitor, okay? All right, so now what I'd like to do is put the lights back on, so brace yourselves, okay? What I'd like to do is I'd like to analyze the circuit I just drew up there using Kirchhoff's laws, Kirchhoff's rules. And for that we need a little piece that we're currently missing, but we almost have it written down. It's right over there. So let me draw that circuit a little bit more neatly in the way I actually put it together. All right, so there is my, what's called an RC circuit. And that's any circuit that contains a resistor and a capacitor, so nothing magical about that. Kirchhoff's rules, we have to do a few things to analyze a circuit. Now this one isn't so bad. It's got one loop in it, so this is technically a simple circuit, but it's got a piece in it we've never handled before using Kirchhoff's rules, and that's the capacitor. So what's the first step in Kirchhoff's rules? I like picking the direction you want it to be. Picking the direction you're going to go, yeah. Right, so you choose, you pick a loop, there's only one loop in the circuit, so we just pick that one, that's easy. And then you decide which way you think current is flowing through each piece of the loop. Remembering that current has to be conserved because charge has to be conserved, so any current that goes in has to come out at any moment in time that will be true even for the capacitor. So while charge is building up on the capacitor, if we were to look at the circuit for just one slice of time at that moment, it would be true the current going into the top of the capacitor is equal to the current coming out. Even though over time that total amount of current is decreasing to zero, okay? So we have to start by picking a direction. So I'm going to pick the direction which, because I like current that comes out of the plus side of a battery. So I'm just going to say that current flows up through the left leg, to the right, through the resistor, down through the capacitor, and then back around. So I'm going to make my current flow in a clockwise manner. You can pick counterclockwise all that happens is at the end when you solve the problem, you'll get a minus sign for your current. That means if you chose wrong, but it's not big deal, it doesn't change the physics of the situation. All right, so what's the next step? I've chosen a direction that current flows, there actually are no nodes in the circuit, so I don't have to worry about conserving current at a branch point, right? This is just a single loop. So what's the next step? So we've already done current. Check, what's the next thing we do? Walking. Walking, right? So we have to pick a direction to walk through the circuit, and we're going to add up all the voltage changes as we go through the circuit, okay? So, well, okay, I'm going to keep this simple. So I'm going to walk clockwise through the circuit. So we have to do our walk, okay? And I'm going to choose clockwise. You don't have to, you can choose counterclockwise. Just do it, choose it, and stick with it. If you make a wrong choice, it's okay as long as you stick with it, you'll get signs out in the end that fix it for you, okay? All right, so then we have to conserve energy on our walk. So this is where Kirchoff's loop rule comes in. Can we just walk in the direction of current because there's a lot of arrows that are showing us where to go? We can, but you don't have to. I'm just saying you can do whatever you want, but whatever you do, stick with it. So if you feel like it's morally wrong to walk against the current in Kirchoff's rules, then don't. Just make sure you stick with it, mathematically apply it consistently, okay? Those aren't going to conflict or cause problems, they're going to keep stuff consistent. Yeah, whatever your choice is, however wrong it might be, stick with it, okay? It's a judgment call, but here it's a helpful judgment call. Just make a choice and stick with it. So I'm going to walk clockwise. I happen to also like walking in the direction current flows that's just conceptually easy for me, all right? So my walk is going to be like this through the circuit, and I'm going to start here. This will be my start position, okay? Right before the battery. Okay, so we've already learned the rule, the convention for when you go through a battery from negative to positive in the direction of current flow. So how did you know where to start? I'm going to kick it in the right place. Okay. Yeah, it doesn't matter. There is no, I just show, I happen to like starting with a battery, that's all. It's totally a personal choice. I could have started with a capacitor, but I'm building up to the capacitor. This is for master. Was there a strategy there or was it like, okay? No, no, no, energy's conserved in a loop. Start anywhere in the loop and walk back to where you started. It doesn't matter where you start, okay? Don't overthink this too much. Just, I know it hurts sometimes to be told, look, just make a decision and stick with it, but that's okay in this case. Just make a decision and stick with it. Everything's going to be all right, which is a famous line at the beginning of World War Z, and I recall everything was not all right at the end of that, but anyway, that's a separate problem, all right? So you just choose where you're going to start. When you go through the battery from negative to positive, that is a positive voltage change. So the voltage of the battery is plus E, whatever it is, maybe it's 12 volts. Okay, we're just going to write that as plus E. We continue our walk, we hit the resistor. Now we are going through the resistor in the direction that current is drawn to be flowing. The resistor opposes the flow of current, and so we're going to experience a drop in potential in the resistor that is negative IR. So it's negative V, but for a resistor, V equals IR, and we can just put in IR for that. And then finally we hit the capacitor, and we have the plus side up here and the minus side down here. We are going from the high potential side from the perspective of a positive charge, the high potential side of the capacitor to the low potential side of the capacitor. And so when you do that, you experience a change in voltage across the capacitor negative VC, and then you continue along and you come back to where you started, okay? Now for a capacitor, we have an equation that relates Q, V, and C. Q equals V times C. So we can actually just put the capacitor equation in here as well. So we have negative IR, negative Q divided by the capacitance equals zero. Now I know that doesn't seem like much, but it turns out that we're a hair's breadth away from solving for some basic features of an RC circuit. First of all, we've already looked qualitatively at the RC circuit. We know that right in the instant, like if there was a switch in here, if we closed the switch or the minute the battery's hooked into the circuit, current will begin to flow, and the most it will ever have is that that moment in time right after the battery's plugged in or the switch is thrown from the battery, something like that. And then over time that current will lessen. It will wear down. We expect to see the current decline over time. And then at a long enough time that current will flow, will go to zero. We saw it in the simulation here, it ceases after some long period of time, okay? Now, what are we gonna do with that? How are we gonna figure out how, for instance, charge is changing or how current is changing? This is a nightmare. You've got this voltage, which is constant from the battery. So that's nice, that's a constant. But then I, I is actually best written as a function of time, okay? I is actually some function of time. Time is a hidden variable in here that we haven't even drawn, right? We know that the current is changing with time. And oh God, Q, Q is a function of time because the charge that's building up on the capacitors, it starts out at zero, but then it builds up to some maximum value that eventually in combination with the capacitance that opposes the battery through its voltage. So this is a horrible equation at its face. So let me write this in all of its nasty glory. So we have I, which is a function of T times a constant R minus Q, which is a function of T divided by C, all of that is equal to zero. Ah! There's one more piece of information that we can use here to try to, well, make your life easier is the wrong way to look at it. But to at least be able to solve the problem or find some way to solve this problem. And that is the definition of current. Current is the change in charge with respect to time. So if you focus on a fixed point in the circuit, we count the number of charges going by in some amount of time. The number of charges, the amount of charge that goes by in that unit of time is the current, DQ divided by DT. And you can choose very tiny units of time, DT is a little differential. So these are little infinitesimal time slices. Okay, this reeks of calculus. And this is infinitesimal charge in that time that goes by. And this is where, now if we just write that into the equation, this is where the differential equation comes from. So we have E minus, I'm gonna write R here, R is a constant. I is DQ, DT, Q is a function of time, minus Q over C, Q is a function of time. This is what is known as a differential equation. And in order to understand RC systems, one has to set up and solve those. Now I'm not gonna make you guys do that. I'm simply gonna quote the solutions. But what I wanna point out here is that the only, if we've given E and we're given R and we're given C, the only unknown that we have is Q. But the problem is that Q appears by itself over here. And in here it's entangled inside of a derivative. And that's what makes this a differential equation. You've got a differentiation with respect to time of the charge and then just the charge over here. And so this is a whole branch of mathematics to set up and solve these problems. These equations appear in population problems. If you're looking at the effect that a disease has on a population, the rate at which the disease spreads versus the death rate versus the infection rate, all of those things can be entered into a single equation. It might be a very nasty equation involving rates of change of infection, rates of change of health, death rates, things like that. You can solve, this is how for instance the CDC and the World Health Organization make predictions based on certain assumptions about the number of infected people that are possible in December and January and February of next year for the Ebola spread, okay? The Ebola outbreak can be modeled using differential equations. That's where predictions come from. They have a range because there are uncertainties in the predictions. You don't know that there won't be a major medical intervention in December, for instance. It stops the spread of the disease in Liberia or Sierra Leone, something like that, okay? You can't predict when that's gonna happen and that will change the outcome if you do. But based on what we know now, the CDC and World Health Organization can make a range of predictions. They're using equations complicated ones but similar in form to this, to solve, okay? We're gonna apply these equations to this very overly simple circuit that we've constructed here, resistor, capacitor, and so forth. And what you find is that if you go ahead and solve this, so let me recoup our qualitative solutions in just a moment. The book goes through this in a little bit of detail and I welcome you to look that over again if you're interested in this. But for instance, population analysis, disease analysis, the spread of a technology through a society, all the stuff can be modeled with differential equations. They're really essential tools in understanding the changes in things over time, okay? We're giving pressures on the system. So the solution to this equation for Q is just the capacitance times the voltage from the battery times this thing, one minus E to the minus T, there's time, divided by the product of R and C. All right, so again, we have the capacitance times the voltage from the battery out in front. Let's think about that for a moment. As time goes to infinity, okay? So let's send T to infinity, all right? As time goes to infinity, E to the minus T, which is equal to one over E to the T goes to what? Zero, zero, yep, because T goes to infinity so you have one over a huge number which is a tiny number and so eventually at infinity, this goes to zero. So at T equals infinity, the charge on the capacitor is merely given by the capacitance times the battery voltage. Well, we could have predicted that, right? At T equals infinity, the current stops flowing. The voltage on the capacitor must be opposing the battery and so that must be equal to the voltage of the battery and the charge will just be given by C times E at time equals infinity or if you wait a really long time. So yeah, right? Is the E still our EMF E? Yes, yes, that calligraphy E is chosen on purpose to remind you that that comes from the battery which is a constant source of potential difference in the system, okay? Now what about T equals zero? Well at T equals zero, what is E to the minus zero equal to? One. And so consequently, what is charge equal to? You have a one here and you have one minus one, so you get zero which is what we expect, right? Right at the moment when that switches the wrong to close the circuit. There is no charge on the capacitor and there isn't for a moment until after the switch is thrown. Did you have E to the negative zero? Yeah, another one with that. It's being pedantic, I left the minus sign out there. Yeah. I could have just put E to the zero by the property of negative zero equals zero but I'm just being pedantic, so. And then at times in between infinity and zero which is all other times, this is the equation you have to use to figure out what the charge is on the capacitor. And if you plot this out, what you find out is that the charge on the capacitor versus time looks something like this. So it increases and then it levels off at its maximum value, okay? And you just have to wait a long time. And the time that you have to wait is actually given by this thing up here. So this product of R and C, it has units of seconds. Okay, so if you go back and dust off we're to the MKS equivalence of resistance and capacitance, okay? And you plug all those in, they all cancel out and what you're left with at the end is just S seconds. So R times C has units of time. Okay, so this is what is known as the time constant of the circuit. Now, if you plug in T equals RC, okay? Then you wind up with an equation that looks like this. So Q is equal to CE in general, one minus E to the minus T over RC. And if you plug in T equals RC, you find out that Q equals CE one minus E to the minus one. Okay, so T equals RC, so you have E to the minus RC divided by RC or E to the minus one and you're left with this thing in this form, okay? This thing out in front is the maximum charge that the capacitor will ever carry. The maximum charge the capacitor will ever carry. This is a number whose value is 0.63. So this time constant tells you the time required, the time you have to wait for the capacitor to charge up to 63.63 of its maximum charge. And so the typical rule of thumb is if you wait about 10 times the RC, 10 times the time constant, you've basically reached a situation in a capacitor where it's maximally charged. For all intents and purposes, waiting 10 times the time constant is infinity. All right, so if about 10 RCs have passed, that capacitor is as bad as charged is ever gonna get. All right, so that's important to know in designing a circuit for specific purposes. So for instance, we've talked before about our capacitors can help to smooth out power problems. Recently when we had those bad storms about three weeks ago here, the lights and the computers in this building were flickering like crazy because they couldn't handle the building power, couldn't handle the surges that were being placed on it by the fluctuating voltages from power stations outside during that electrical storm. That's when we learned that a very sensitive piece of equipment downstairs was not on a battery backup system nor was it having its power line smooth to prevent noise from possibly damaging it. So luckily no damage occurred, but it made us very sensitive to the fact that we need to put a battery backup on that. Battery backups are gonna contain capacitors and the capacitors are tuned so that the resistance and the capacitance in the system is such that the power cuts out that capacitor can dump its voltage and current very quickly into the system so that you don't have any dips. It smooths out all the little dips in the system, all right? So let's wrap up by looking at another one of these circuits and let's see here. So let's look at an RC circuit. Please work, great. All right, now, because I know this thing is not cooperating very well, what I'm gonna do is I'm gonna load an RC circuit that I've already built. It's kind of nice, you can save these, okay? And there we go. So there's our RC circuit, let me show you. Here's the battery, all right? With potential, I set this to 10 volts. Here's our switch, hasn't been thrown yet. This is basically a system that could be used to create a battery backup situation, okay? So you have a loop where current can flow through a resistor and you have another loop where current can build up on a capacitor. And I put a light bulb here just for fun so you can see what happens. All right, so if I throw the switch, what's gonna happen at the beginning is that current is gonna flow like mad into the capacitor and very little through the resistor, but as the capacitor builds up charge, current's not gonna be able to flow over here anymore. So instead it's gonna prefer to go entirely through the resistor. The bulb will glow only so long as current is moving through the branch with the capacitor. So here, watch. You see, the current slows down in this branch as the charge builds up on the plates. Okay, and Catherine, this goes back to something you were asking before, right? If you just had a resistor in the circuit, wouldn't current just flow through it in a steady state? And the answer is yup, and there it is in fact. So this branch is now closed off to current because the capacitor is full and so the only place charge can go is through this resistor here, okay? Now, here's the cool thing. Let's simulate a power interruption. So this is our building, okay? This is our building with its normal flow of current. Totally, everything's totally fine and then a lightning storm knocks out external voltage. Here's how a battery backup works. It supplies power for a little bit of time maybe to smooth out the fluctuations. The light's flickering means the power's kind of coming and going really short bursts. But that's what that provides. And so we can just keep, you know, put the power back on, take the power off, put the power back on, take the power off. And if you build the circuit just right, you can smooth out all those little fluctuations and prevent your computer, your lights from exploding, your sensitive scientific equipment from burning out because it's getting power, no power, power, no power, power, no power. Very bad for electrical equipment. So things to keep in mind with the resistor capacitor circuit are just that you have all the basic tool kit pieces that you need in order to understand these circuits. You can look at the circuit as a series of loops involving electric potential changes through those loops. You can use Kirchhoff's rules for current and voltages in loops and at nodes in order to attack these problems. And at the end of the day, what you get are differential equations and those differential equations are solved by functions, not by numbers. You can plug in numbers and get results once you have the function, but at their heart you have to understand these systems using functions and those functions will change with time. Now if we return for a moment to the Huxley-Hodgkin model of the neuron, we can see what it was that they were in part awarded their NOEL prize for. And that was once they had made measurements of the ion flows in and out of squid axons. They were able to then develop a physics model, a circuit model of those axons, to mimic the data that they saw. And what they found is that the data were best described by a resistor capacitor model and that model is sketched here in a very simple form. The much more complex form I'll show you in a moment. But the basic idea is that the interstitial fluid can be represented as a form of resistance. It's outside of the myelin sheath and the intracellular fluid lies inside of the myelin sheath and that sheath in and of itself is a boundary over which charge has to flow when ion channels open. So we can represent the two fluids as resistance outside and resistance inside of the axon. And then the nodes of renvir are represented by resistor capacitor pairs. And so those are the vertical pairs that you see here. And so what happens is a stimulus enters from the left. This causes a potential difference across the circuit from the left side. That will begin to charge up the capacitor and as the capacitor charges then current can no longer flow through it and current will instead flow through the resistor that's next to it. And this whole pattern of voltage building up on the capacitor, which then increases the voltage on the next section of the circuit and then the next section of the circuit after that repeats all the way down the length of the axon. And so an external stimulus on the left which is an increase in voltage is then repeated as a transmission in that increase in voltage down the length of the axon as the capacitors charge. They charge up to the voltage level from the stimulus that then puts a voltage on the next segment of the circuit which puts a voltage on the next segment of the circuit and you get this beautiful description of what's seen with ionic currents flowing into and out of the myelin sheath through the axon length itself. You see the voltage, the pulse, the stimulus is transmitted down the length of the axon by this repeating charge up discharge cycle very much like capacitor resistor circuits. And so the much more complicated version of the Hodgkin-Huxley model is shown here. Again, what you're basically seeing here is rather than a fixed bunch of resistors and a fixed bunch of capacitors, you have voltage sources, you have the capacitor in the node of Ranvier and you have variable resistances and sources of current and voltage that can change. So this is a much more complicated picture but it's still just a circuit diagram. Basically what we have here is a big RC circuit and that is an excellent representation of physically what's going on with ionic currents inside of the axon. So I hope this has been a very entertaining lecture. You can see how biology and physics interface very neatly in the essential elements that are the foundation of our learning systems, the neurons and their long axons. We see how stimulus in the form of a voltage can be transmitted via the RC circuit down the length of the axon to be passed onto the dendrites of the next neuron. This is a beautiful process. It's what allows us to learn fundamentally. It's what allows many other living organisms to learn fundamentally and it's something from which we've learned in developing machine learning which we can now use to mimic some aspects of human learning. This is a very complicated area but at its heart, deep down inside is essentially the resistor capacitor circuit.