Here is a nice application for prospective electrical engineers. This is a circuit diagram. We have a DC voltage connected to the circuit. We have a resistor and we have a capacitor. So, if this switch goes to connect the battery, then the battery will cause a current to flow in the circuit and charge up the capacitor. Then if we flip the switch to cut the battery out of the circuit, the capacitor will then discharge, cause a current to flow through the resistor and then go back to no charge on the capacitor. So, the circuit, the charge on the capacitor, the current in the circuit, the voltage across the capacitor is governed by a differential equation. So, let's try and derive that differential equation and then solve it for the voltage across the capacitor. So, we need to know what are the equations governing the voltage across a resistor and the voltage across a capacitor, that basically defines what a resistor is and what a capacitor is. So, the voltage across a resistor is equal to the current going through the resistor times the resistance. That defines the resistance R and the voltage drop across the capacitor. This is the voltage drop across a resistor, the voltage drop across a capacitor is equal to the charge on the capacitor divided by the capacitance of the capacitor that defines what C means, and you have a current here and a charge but they are just related. The current is just the derivative of the charge with respect to time, okay? These are the constitutive equations for a resistor and a capacitor. Then to get the differential equation, we need to apply what's called Kirchhoff's law. Kirchhoff's law, which tells us that the voltage supplied by the battery E, is equal to the voltage drop across a resistor, plus the voltage drop across the capacitor, and this is the case when the battery is connected to the circuit when the battery is connected. So, the voltage increase across the battery, is equal to the voltage drop across the resistor, plus the voltage drop across the capacitor. Then you have a closed loop here. Okay. So what is the differential equation when the battery is connected? We apply Kirchhoff's law, but we have an I and a Q here. So, if you want to write the differential equation for the voltage across the capacitor, we see that VR can be given in terms of VC. We have an I, so we need to use this relationship that VR is equal to I. So, that means we need to take dq/dt here, so it's R times dq/dt, which will be RC times dvc/dt, okay. So, using the fact that i is dq/dt, we can write VR in terms of R times C times dv ct, which gives us our i. Okay. Putting that together, we have the differential equation, then we have VR, we have RC, VR times dvc dt, and then plus VC equals E, and we notice that this is a first order linear differential equation, so we can put it in standard form. So, we have dvc, dt plus one over RC, VC equals E over RC and that's the standard form for a linear first-order equation. Okay, we solve this using an integrating factor. So, we can have UFT then is the integral, is E to the integral of PF, Tdt. So, we got UFT, the integrating factor for this equation here is E to the T over RC. And then we can solve for VC, is one over the integrating factor, times the initial voltage across the capacitor is zero, because we are just, we have zero voltage here and we flip the switch and turn on the battery. So, we have the integral here, from zero to T of the integrating factor. E to the T over RC, times the right-hand side which is E over RC, dt, okay. That gives us the voltage. We have to do this integral. This is just a constant times E to the T over RC, so that the integral becomes RC times E to the T over RC. We can substitute in the limits, we can multiply by E to the minus T over RC, and if we do that we end up with E times one minus E to the minus T over RC, okay. So, the voltage drop across the capacitor. T equals zero is zero as you can see from this expression, one minus one is zero and then eventually E to the minus T over RC decays to zero. We say that the timescale of the RC circuit is RC because we have a minus T over RC and it's exponential function. So, this decays to zero and you end up with the voltage across the capacitor, is just the same as the applied voltage to the circuit, the EMF of the circuit, okay. That's what happens when we charge up. So, what happens when we charge down? When we charge down then we have a differential equation where the battery is disconnected. So, we will have a differential equation dvc, dt plus one over RC, VC equals zero now when we charge down, and with an initial condition that VC of zero is equal to E. The charge that we had on the capacitor after we charged up, okay. This is a straightforward differential equation to solve. Again, you can use an integrating factor, but here it's so simple. It says that the derivative of VC with respect to time, is equal to minus one over RC times VC. So, that's just an exponential function. So, we can write this down immediately as the solution of the differential equation as a constant times E to the minus T over RC, and the constant is such that the value of zero is E. So that will be our solution. So, this is a very simple differential equation that just gives us an exponential function. Okay, so let me review here then this particular problem. We have a circuit that we want to solve. We need some equations in order to analyze a circuit. Here we are using Kirchoff's law which is that the voltage provided by the battery E, is then equal to the voltage drop across the resistor plus the voltage drop across the capacitor, because the circuit is in series and then you need the constitutive relationships for the resistor and the capacitor. So, the voltage drop across the resistor is the current times the resistance. The voltage drop across the capacitor is the charge on the capacitor divided by the capacitance and the current is equal to the time derivative of the charge on the capacitor. Putting them together, you get a differential equation. The differential equation is first-order and linear. You can solve it using an integrating factor and you get the voltage across the capacitor then will start at zero but then we'll grow up exponentially until it gets to the same voltage as the battery. Then when you disconnect the battery, the right-hand side becomes zero, but you start off with an initial condition where the voltage across the capacitor is equal to E, and you just get exponential decay back to zero. I'm Jeff Jasanoff. Thanks for watching, and I'll see you in the next video.