 Suppose a tank contains 100 gallons of a solution of dissolved salt and water. So we have a salt water mix that's gonna be inside this tank. And the salt water is gonna be stirred uniformly. And so from that, we want to interpret that as meaning that the salt is evenly distributed throughout the entire tank. It's not like our pitcher of Kool-Aid that we haven't touched in three days where all the sediment has come to the bottom. Suppose all the water is uniformly stirred so that there's salt distributed evenly throughout. And so we just stop there for a minute and consider what we have here. We have this tank of water. You get something like this. And we have water like that. And like we said, initially, there's gonna be 100 gallons of water inside of this tank. I guess gallons is a capital G. And this is gonna happen at the start of our experiment. So when time equals zero. So suppose that water is allowed to flow into this tank. And we're doing it at a rate of four gallons per minute. Four gallons per minute. We have this intake of water. And it's pure water, right? And so the mixture flows out of the tank also at a rate. We're draining the tank here. We're draining the tank at a rate of three gallons per minute. And so what we're gonna ask is how much salt is gonna be in the system after tea minutes if there are 15 pounds of salt originally? So we started off with 15 pounds of salt. And this salt was gonna be evenly distributed, uniformly distributed throughout the water. So we have this concentration of salt that's gonna be in play here. And that's actually what we're gonna ask about. Let's introduce a function Y of T. This is gonna be the number of pounds of salt. At time T. At T minutes, all right? So we're gonna try to predict what this function are. We wanna come up with a function for this salt here. And so some things we know is we have this initial value when Y of zero is equal to 15 pounds. We know this. And we're gonna try to figure out what is the salt? Because again, that's how much it asks us, right? How much salt will remain in the tank after T minutes? We're trying to find this function Y of T. That's the answer to this question. Now, the complication is the following. When we take water entering the system, it's pure water, that means it's not salt water, right? There's no salt coming in. So we have zero pounds of salt leaving the mixture at any given moment. But how much salt is exiting the system? That kinda depends. That's a little bit harder of a question here. Because while we know no salt's coming in, there's salt in the system. And it's not like it just all leaves at once, right? What's happening is the amount of salt that's gonna leave depends on the concentration of salt that we have. And so let's try to simplify this consideration the following way. Although it might be difficult to describe the function Y of T, we are in a position where we can describe the derivative of Y with respect to time. So the net rate at which Y is changing is given by the following relationship. We have the rate of salt that's entering the system. And then take away from that the rate of salt that's exiting the system, right? And so like we observed right here, the amount of salt entering the system is zero. And how much salt is exiting the system? Again, this is the tricky part, but we can handle it in the following way. We know that there's three gallons of water leaving at any moment. This has something to do with the volume, right? If we take volume of T to be the number of gallons of water at T minutes, right? So if we take the volume right here, then we can kinda say something like the following. We could take, because we have to know, we don't know how much, we don't know how much is leaving necessarily at this moment right here because the concentration depends. We know that we're losing three gallons of water, but how much salt? How much salt is in that three gallons that's leaving? So what we're gonna do is we're gonna make it into a type of a concentration problem. We're gonna take the pounds of salt divided by the volume, right? This is gonna be pounds per gallon. This is a concentration of the amount of salt. Concentration that's in the amount of salt at that given time. And then we're gonna multiply this by the amount that we're losing. We're gonna be losing three gallons per minute. So compare the units right there. Like if the gallon cancel out, you're gonna get pounds per minute. That's how much salt is exiting here. And so if we were to simplify what we have right here, what we can say is the following. We can say that dy dt is equal to negative three y over volume. So this right here is a differential equation. The rate in which the salt is changing with respect to time is equal to negative three times the current amount of salt divided by volume. And volume here is a function of time as well. And so in order to, and we have this initial value, remember, that y of zero is equal to 15 pounds. So in order to answer this question about how much salt is in the tank at any given moment, we have to solve this initial value problem, this differential equation here. Now I do wanna mention that this is actually a quite reasonable problem right here. This type of thing. We have some salt water right here. We have water exiting. We have water entering. We're pouring pure water in and we're exiting stuff out right here. Imagine we're running some type of aquarium, like maybe we work at SeaWorldWide, right? We have these marine mammals, these marine animals, fish, maybe coral, starfish, whatever, right? A sea snail. We have all these different marine creatures that have to live in salt water, but we have essentially pure water at our disposal that we could add to it. Now the thing is the saline solution here, the amount of salt is gonna, the concentration I should say of salt is really what's in concern here because for marine creatures to survive, they need a certain concentration. They can't live in pure water, most of them can't of course. So we need some concentration to be greater than zero, but also they can't just live in pure salt. Like I'm gonna just throw them in a bag of salt. They're gonna die as well. So we need the ratio between salt and water to be perfect, right? And so what happens is over time there's evaporation that happens. So the sun heats up the water some of the water is evaporated so that raises the concentration. Also the fish kind of do their business amongst other things in the water. So again, the pH and other salt and other chemicals, it kind of changes the balance over time. In which case then the marine biologists have to correct so the concentration is right for these creatures to survive. So we add pure water in it, but we can't just like take the fish out like a sort of finding Nemo situation and just drain the tank and cleaning out there, right? Cause I mean that gets expensive, the fish could die, they could escape to go find their lost father. There's all these things that could happen. So in some respect, we have to fix the water. We have to clean the water while the fish are still in there. So we're gonna drain the water while we're adding new water to it. And so we have to know when's the right moment to stop it so that we can calculate the concentration. Okay, we need, if we have like a hundred gallons we wanna have 15 pounds of salt. We can find that concentration of pounds per gallon. So we wanna add some water until and find the moment where it's at the right concentration. That's what we're trying to do right now. And so when you look at it that way we say it's a quite reasonable problem. And as we've seen, as we set it up we have to solve this differential equation right here. Now it turns out we're gonna start off this by doing a simpler differential equation. Let's look on the volume for a moment. So we can say something on volume, D, D, V, D, T. We know that there's the rate in which water comes in and then you take away the rate in which water exits. This might seem simple, but be aware this is a differential equation. We have the rate in which water comes in, we have the rate in which water comes out. The net rate, because we have four gallons coming in per minute we lost three gallons per minute. And so we see there is one gallon of water increase each minute. This is a pretty simple differential equation, right? It's also separable mind you, right? If you separate the variables you get D, V equals D, T, integrate this puppy. You're gonna end up with volume equals T plus a constant, right? What is that constant? We're gonna use the initial value. We started off with 100 gallons of water. So when T equals zero we're gonna have 100 gallons which is just to say that C equals 100 and our volume function V of T is gonna equal 100 plus T or T plus 100 if you prefer. So we can solve a very simple differential equation. That was the initial value problem. We're gonna put it in here. That way we can express our differential equation with respect to Y without any reference to volume anymore. So if we rewrite that we're gonna get that D, Y, D, T equals negative three Y over 100 plus T. And so this is now the differential equation we need to solve. Notice that this is also a separable differential equation. You can cross multiply like so and we end up with, I guess that's actually not, we don't wanna cross multiply. We just actually just wanna times, we wanna times both sides by D, T, right? So that they cancel over here. You also wanna, we wanna divide both sides by Y, divide both sides by Y in which case then the Y's cancel over here. Then we'll end up with D, Y over Y. This is equal to negative three over 100 plus T like so D, T. Integrate both sides because we did separate the variables. Oh boy. The right hand side then becomes the natural log of absolute value of Y. This is gonna equal. You might need a U substitution to help you out here if you're struggling at all 100 plus T for U, DU with an equal D, T. In which case the right hand side likewise should look like negative three the natural log of the absolute value of 100 plus T plus a constant. Now in this situation notice that our T value is gonna have to be very equal to zero. We can't go back in time without a flux capacitor or anything like that. And so because of that, we actually can relax this. If we have a, if we have a plus, if we forgot the absolute value you can get away with that. Same thing kind of over here, right? Y can never be negative. We can have like negative 13 pounds of salt in the tank. So if we forgot the absolute value we'd be okay right here. Now in order to help us solve this thing we wanna, well we wanna solve for Y and in course doing so we have to give it the natural log and the absolute value. This gives us something of the four. Well, let's actually pause there for a second. We have this initial value C. We could solve for Y but actually I wanna solve for C first. From the initial value we had before, right? Notice that Y of zero is equal to 15. So if we use that initial value Y equals 15 when T equals zero. She's gonna get 100 right here. We can then use this to solve for C. Adding three natural log of C to both sides or natural log 100, excuse me. You get C equals the natural log of 15 plus three times the natural log of 100. Using some properties of logarithms you can actually bring the three inside as an exponent and then you can combine the two logarithms. So this is gonna look like the natural log of 15 times 10 to the third and 10 to the third here is just gonna mean you're gonna add a bunch more zeros. The natural log of 15 and then we should get six zeros. So we get the natural log of 15 million are 10 times, you could also think of it as the natural log of 15 times 10 to the sixth. If you prefer that or 1.5 times 10 to the seventh whichever you prefer. With this solution in my mind we can then put it over here in which case we get the natural log of Y equals negative three times the natural log of 100 plus T plus the natural log of this 15 times 10 to the sixth. One of the advantages of doing it this way if I can see first is you actually notice that if we bring in the three again as an exponent we could write the right-hand side as a common logarithm. It's all the natural log now. So we would end up with 100 plus T to the negative three times that by this 15 times 10 to the sixth. This is all equal to the natural log of Y. And so then in this case the natural logs now all cancel out and we get the expression or the equation Y equals 1.5 times 10 to the seventh over 100 plus T cubed. And so now we have solved our initial value problem in which case this gives us the solution to our differential equation. And so we could ask ourselves, okay after 10 minutes, after 10 minutes how much salt is in the system? After 10 minutes, how much salt? All right, so if we let it run for 10 minutes what's gonna happen? Well according to this model here what we're gonna see is that Y would equal well you're gonna take 1.5 times 10 to the seventh all over well 110 to the third. I guess I didn't need parentheses for that. Like so in which case this gives you an estimate of 11.27 pounds, right? In which case that gives us how much pounds there are if we wanted concentration we could do V or Y over V you get this 11.27 over the 110 and you can compute that as well. With this equation we can compute we can predict how much salt with very good accuracy, right? How much salt we're gonna have at any given moment of time and which helped us with the problem we have right here. And so it all comes down to solving a differential equation and how did the differential equation get into play again? Remember what we knew about the original problem is we knew how much stuff was coming in how much stuff was exiting and because we knew how much was coming in at the rate at which they're coming in and the rate they're coming out we were able to calculate the net rate the rate of salt coming in versus the rate of salt coming out. Now the reason differential equation was necessary here is because we didn't know how much salt was coming out. We didn't know the rate coming out as a specific number but we were able to write this as using a function of the original we were able to write as a ratio of the original function Y. So this example illustrates that differential equations are very, very important for modeling many, many numerical phenomena. And like in this one they sometimes can be separable differential equations for which we can use those techniques to solve them. And so that brings us to the end of lecture 26. In lecture 27, we're gonna continue down this vein. We're not gonna do salt examples necessarily but we'll show you some more examples of how we can make statements about growth or decay like how much stuff over time will change based upon some information about the derivatives some assumptions we can make there we'll look at some growth models and I'll see you all then. Bye everyone.