 All right, so over the break, I gave you guys a video to watch. I'm going to use bits of it today at the beginning of class, so if you haven't seen it, you'll get a very, very big crash course in how to use it right at the beginning of class. 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, okay? 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 gas. 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, okay? So I'll show you the very basic pieces that one needs to know to begin to guess solutions to differential equations, and it has to do with the behavior of functions. But before we get on to that today, let me hand out the reading quiz. So put your notebooks, notebooks, all that good stuff away. So some of you may have noticed up on the board that makeup for the fall break, ruining our great relationship with one another. I have decided to hold a bunch of open office hours over the next 48 hours. Thursday's a research day for me, so I tend to budget that to the Hill for research with my undergrads and grad students because otherwise they don't see me. But I do have a brief window from three to 3.30 today where anyone's welcome to come to my office, not the varsity, my office, and just hop on in and ask some questions, and I'll give you as much time as I can. Most I can offer is about 25 minutes or so today. And then I'll talk more when I come to quiz about the other ones. So we'll get going again in five minutes around 9.39. Okay, so today we're gonna talk about resistor capacitor circuits, RSC 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, 1998. Rachel, who else knows? Raise your hand if you know who these people are. Somebody else nodded, I thought. Okay, so what's the story you guys remember? That's it. Heard of them? That's it. Okay. Well, does anyone know what they're famous for? Okay, great. RSC circuits. Kind of, kind of, kind of. 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, it's a very fundamental piece of knowledge. 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, okay? 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. Made 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, okay? So what was it that they were trying to do? Well, they were trying to do, we have the benefit of historical perspective now, right? 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. All right, 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, you reweight the little nodes in your computational network. And over time, if you do this 1,000 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, but 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. We learn 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. We take in 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. 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 one of those models won them and 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, you know, 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, you know, 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 gonna 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, because fall break made me sleepy. Fall break made me sleepy too, so it's okay. All right. So I try to be bouncy and jump around and stuff and keep everybody alive and awake. And yeah, see, Catherine, 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 if it's an 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 cables so valuable to the cable industry. It is far better than like 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, we 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 network. 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 develop and differentiate 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 John Wise gives a fantastic lecture on at least he does this in our cultural formations and ways of knowing class, but on why it is that so many women died from childbirth. Did you know that that was the leading killer of women until about the 1950s? And it's still the leading killer of women in most countries today with developing medical systems, for instance. Why is it that childbirth is so lethal? Does anybody know? From a biological natural selection evolution perspective? Why is childbirth so dangerous? Seems pointless, right? Why is it that you have problems with wisdom teeth? It turns out these questions are related to one another. Does anyone know the answer to that? Come on, you're pre-health people, you should know this. So the answer is, by studying our ancestors, is that our ancestors, our distant ancestors, Neanderthals and so forth, they had a much smaller cranium size, so a smaller brain capacity and a much larger jaw. So they were able to accommodate all the teeth that we have now, no problem. But by comparison to the computational power we carry around up here in this little void between my temples, they probably weren't quite as able to learn and manipulate the world around them as we happen to be able to do, because we benefited from a lot of other evolutionary steps after that. The reason why you have problems with wisdom teeth is because it's over a long period of time, if you look at the evolution of skull size in human beings and their predecessors, the skull expanded to accommodate a larger brain and it shrunk the jaw in response because the birth canal has a fixed size and so nature has to make trade-offs. So the reason that you and I have so much trouble with wisdom teeth is because a big brain is better selected for in nature than a big jaw. So we can still eat, that's fine. We may have to have some teeth pulled over the course of our life or get really bad teeth if we don't get them out, that can cause problems, right? They can interrupt and so forth. But from a biological perspective, it turns out to be much more advantageous to expand the size of the brain and shrink the size of the jaw than the reverse. And basically the reason childbirth is such a danger is because of the size of the human head. That is essentially limited by the size of the birth canal and so childbirth is particularly dangerous but nature has done the calculation and decided that it's risky to the parent but if the child is born, the species continues and that's all that matters, right? So we have medically learned to adapt. We've technologically evolved in a way that we can offset what nature has limited by providing cesarean section and other medical treatments to make childbirth far a lot less risky. But if you just stalk and said, you know, why is it that these, why is it that I have problems with wisdom teeth? Why is it that childbirth killed was the leading killer of women until about the 1950s in the United States? Actually it just turns out it has to do with the fact that a big brain is totally worth it apparently. So that's where we are now. Maybe not in the future. Maybe the devices will ruin that for us. So we'll see. I mean, whereas we go on now, we're moving more of our brain power into computers, right? So it'll be interesting to see what happens over the next million years to humans as we continue to kind of evolve technologically as well as biologically. Are humans still evolving now? Does anybody know that? Anyone want to answer that question? Ethan, why? What's an example of humans evolving now? Actually I think an example of that. Okay. Yeah, we're always responding in some way to the environment as a species. Have any specific examples come to mind? Height. Okay, height. Height's one example perhaps. Yeah, if you look at average heights, it changes. Yeah, and that probably has to do with improvements in healthcare and longevity and things like that. What about a disease example where humans evolve in less than 100 years to respond to a disease? Sickle cell anemia. Look at you. Excellent. Sickle cell anemia. The gene that's present for that is in all of us. And if we were all exposed in Dallas, this could happen as the temperature patterns continue to change in the southern United States, it's possible that it'll get more tropical down here. Tropical diseases are already making a move into the southern United States from the Caribbean and South America and so forth. And one of the things that could happen is that malaria outbreaks could become more common in the southern United States in the next 200, 300 years. Well, humans as a species have already evolved the mechanism to deal with malaria, sickle cell anemia. And so it turns out it's just more advantageous in a population for it to develop the complications due to sickle cell anemia, which limit lifespan rather than the much worse limiting lifespan effect of malaria and getting sick from malaria. Any human population put under selection pressure by a mosquito population with malaria will develop sickle cell anemia in response. And it takes less than 100 years for that to happen. It's fascinating and it's actually been observed in multiple locations in the world and not just in Africa. There's a myth that it's only African descendants that get sickle cell anemia, that's a lie. Genetically, all of us are capable of getting that. It's just that most of us in the United States are not under constant pressure from a population of malaria bearing mosquitoes. And that turns out to be the thin. So, mosquitoes, right? So how does that happen? Did we just happen to find out that everybody said those are, I guess, sickle cell anemia? They may have a child who now, you know what I mean? Basically, I mean, so even in the United States, right, if you have the parents with the right genetic combinations, they'll have a child with sickle cell anemia. So here's what happens. Selection pressure from the mosquitoes. So let's say you have four kids and there's a one in four chance of one of your children getting sickle cell anemia as a result of the genetic features of the parent, okay? That child is going to live longer and have more of an opportunity to pass their genetic code on to their descendants where the other three may die very early from malaria and not have that same opportunity. And all it takes, and this is the beauty of this, is set up the differential equation to figure out what the selection bias is and you'll find out that it takes maybe 100 years or less for the population to shift to majority sickle cell. It only takes about four or five generations for that to occur. It's pretty wild. It doesn't look like everybody figures out. No, it's not. No, you, if we suddenly, somebody dumped a whole population of malaria-bearing mosquitoes, we're screwed, okay? So my advice would be, so having kids and luckily three generations later, everything will probably be okay, although they'll all have, like 75% of them will have sickle cell anemia, which carries its own problems, right? But maybe our health system can respond to that in effect, yeah? In fact, a lot of Mediterranean populations that's also where sickle cell is common is in the treatment. Exactly, yep, yeah, which is not common knowledge, it turns out, that's right, so. I love that you're, I love that you're here. Okay, yeah, so anyway, John Wise, Professor Wise gives this fantastic lecture and all this stuff that I've benefited a lot from, okay? All right, 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, do you think? Well, overshooting in the nerve system is because of the core background. 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. 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, it's 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 250 millionth of a second, 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 gonna 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 gonna 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 a couple of useful bits of information here. And okay, so useful bits of information. First of all, this is gonna 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 good, Ln for natural log, okay? But I'm just gonna 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 x, what's the answer? e to the x, so I love this function. It's like 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 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 gonna do that in front of you here. There could have been different words, we're not ready. 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? You put 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, the 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 gonna run into one of those real fast today. But I just wanna 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, it's still broken, fantastic. Your tuition, hard at work folks, okay? Oh, actually on that note, a lot of you have complained to me about the Wi-Fi and the varsity. I've complained about the Wi-Fi and the varsity. It's all gonna get replaced. So you can take credit for that if you want or you can just assume that there was already a plan to do that and you're complaining just warranted an email back to me saying it's going to get fixed. But either way, it doesn't matter. Take credit for it, it's going to get fixed, 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 gonna 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 promised 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? It's the same. Okay, same? What's that? Less than. Less than, okay. So why do you say it's the same? Because conservation of charge, like it should be the same throughout. 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 the capacitor. On the 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 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? Charges 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. Hello, but they can't cross the gap because there's empty space there or some dielectric, some non-conducting 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. 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. 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. Can you think about it like the amount of current that was potentially available at the beginning before you threw the switch or before it started moving? Right. And then as it starts moving, there's like less that you're like pulling from, like the source is being depleted or something? Yeah, you can look at it that way, right? That basically 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 because 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 in the whole system? 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 at, 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. So for this, I'll switch back to here. Great, that worked this time. 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, which 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 let me, why aren't you letting me, you're not gonna do that? Okay, fine, we'll see if I can get that to give me some resistance later. 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 why won't you let me delete things? Oh, let's see if this helps. Nope. What about dragging it back to my desktop so I can see things? Okay, now I can remove it. So it looks like all the little pop-ups are showing up here. So let me build this with a little switch in it, and then I'll move it back because I had to delete some wires. Okay, there we go. So that's annoying but easily fixed. All right, so now I have a little switch. So, oh, seriously? Okay, give me one second here. I have to drain the capacitor. There we go, discharge capacitor. All right, so, boom. 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. So let me, very exciting. Let me remove that. So what I'm gonna do is I'm gonna drop a little resistor in here, and then I'm gonna hook the switch in again. Okay, this is gonna look a little funky. Not quite what I'd hoped for, but having to swap it back and forth from desktop to desktop is a little annoying. So, okay, so here's what I did. 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 is still charged from the last time I closed the switch. So let me short-circuit this thing. Actually, it's funny, you always learn what doesn't work when you get into the classroom, and what doesn't work is apparently the little pop-up menus won't work on this desktop here. 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, look at that. Oh, that's great. I can just hit the reset dynamics button. Okay. All right, so let's watch it again. So there we go, 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, okay? So here I have my E, I have my R, I have my C. 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. It's all right. So on the last page that you drew, if there hadn't been a capacitor, then would the current be the same? Yeah, and I can even demonstrate that. Yeah, I can take the capacitor out, just put wire there, and then we can just watch it occur and just blow it steadily the whole time. But that's something you can play within the toolkit. And I'll have the link in the slides. You can also search for these. They're PHET, simulators, PHET. They're from the University of Colorado. They're really nice, so. Okay, so 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? The picking restriction you want it to be. The picking restriction the current goes. 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 the 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 gonna pick the direction which, because I like current that comes out of the plus side of a battery. So I'm just gonna 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 gonna 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 no big deal. It doesn't change the physics of the situation, so. Isn't there only one way that the current can flow because... In reality, yes. Well, I... But in Kirkhoff's rules, you're allowed to pick... What's that? Why is it arbitrary when you draw it? Well, to solve the problem, you arbitrarily choose which direction you believe the current is flowing. The math will tell you which way it's actually flowing at the end. So in reality, yes. There's only one way the current is flowing in that circuit. If you were to build that circuit and go and measure it, the current would only be flowing in one direction. It wouldn't be going into two directions at once. But for the purposes of setting up the energy conservation and the current conservation equations, you just have to start by picking what direction you think current is going. Now, in complicated circuits, it really might not be obvious which way its current is flowing. I could put four batteries in here and eight capacitors and 12 resistors. You tell me then, and I could make 10 loops out of that, you tell me which way current is actually going at any one of those loops. It's a guess. But you make the guess, you stick with it, you apply current conservation on all the nodes. Whatever current comes into a node goes out of a node. And your answers at the end will be right. They may have a sign in them, a negative sign. That just means you're choosing correctly for that direction of current. That's all. It fixes itself in the end. But what do you know about the, so the current is going to have a negative is flowing, so if the positive is going up, then wouldn't you just, For a simple circuit, it's really easy. But what I'm saying is to solve the equations, you don't, if there, yeah, well, even in this circuit, if you wanted, I could draw the I going down. And at the end, when I solve for I, I'll get a minus sign, because I chose incorrectly. That's all. Okay, so in the, I do this in the video, have you watched the video? Yeah. Okay, great. Okay, so in the video, you know, you can get a minus sign on some of those currents. And that just means you chose your arrow to be in the wrong direction. You know, current's really flowing the other way than the one you drew it. That's all. That's all it means. It sort of self-corrects it. Okay. 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 gonna add up all the voltage changes as we go through the circuit, okay? So, well, okay, I'm gonna keep this simple. So I'm gonna walk clockwise through the circuit. So we have to do our walk, okay? And I'm gonna 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 are arrows that are showing us where to go? Is there any correlation? 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 gonna conflict or cause problems, they're gonna keep stuff consistent. Yeah, whatever your choice is, however wrong it might be, stick with it, okay? There's a famous physicist named Sam Ting, and he's famous for being very difficult on the people that he works with. But he has a saying that actually comes in handy, and that is it is better to be consistent than correct. So don't try to be correct out of the gate in problems with Kirchoff's rules. Just make a choice, stick with it, be consistent. Consistency in this case will give you accuracy. So in that sense, consistency is, as Sam Ting would put it, more important than accuracy. 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 gonna 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 gonna be like this through the circuit, and I'm gonna start here. This'll 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. Sorry, how did you know where to start? Pick it up 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- Is there a strategy there, or was it like, okay. No, no, no, no, energy's conserving 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 gonna 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. Anyway, that's a separate problem, all right. So you just choose where you're gonna 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 gonna 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 are 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 batteries 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 batteries 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, we'll 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 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, you 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 just 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, you know, 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. And 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 or 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 the 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 of this 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 add 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 switch is thrown 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 get 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 what are the MKS equivalents 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 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 when designing a circuit for specific purposes. So for instance, we've talked before about how 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 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've 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. 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 I'll pick this up a little bit more next time at the beginning and just go back to the Hodgkin-Huxley model and then we'll review for the exam on Thursday next time. Does that sound good? Okay, let's do that. So bring your questions next to,