 Hello and welcome today to a screen cast that involves using a differential equation to solve a mixture problem. Alright, the problem we're going to look at today says a tank contains 600 gallons of water with 25 pounds of salt already dissolved into it. Water enters the tank at a rate of 9 gallons per hour and the water entering the tank has 20 pounds of salt in every gallon. Okay, alright, a lot of information. If an evenly mixed solution, and we're going to talk about this phrase in just a second, leaves the tank at a rate of 9 gallons per hour, how much salt is in the tank after 2 hours? Okay, so evenly mixed, just for the record, is a very big assumption. Remember, we can live in math land in order to make a nice differential equation for us. So this is probably not typically going to be the case in the real world, but that's okay. Alright, so we've got to still show how these things work. Some important kind of formulas, ideas, I don't know exactly what you want to call them, but are over here that I typed out. So it says the net rate of change is going to be our rate in minus our rate out. Okay, that makes sense. The rate in and rate out, so depending on which one we're going to be doing, is our flow rate of the liquid, which I think is going to be 9 gallons for both in and out. And again, that's also kind of an odd thing, but that's okay. Times the concentration of whatever substance is in the liquid. And then to get that concentration, we're going to take the amount of salt in the tank, and we're going to divide that by the amount of water in the tank. So just kind of keep these three, like I said, ideas, equations in your mind as we're going through these problems. Okay, so the first thing that we want to do, oops, I better not go too far with some of this stuff here, is we want to identify what quantity we're going to be interested in. Okay, so let's go ahead, I don't know, what do you guys want to call the amount of salt? Because that's really what we need, how much salt? Let's go ahead and call that big s of t. If you don't like s's because they look like fives, you can use something else, it doesn't matter. So I'm going to call s of t the amount of salt in the tank, measured in pounds, we want to be very specific with these if possible, after t hours. Okay? Alright, so now we have to identify any factors that are going to be changing the salt amount. And for sure, definitely our rate in and our rate out is going to be the big case here. So let's go ahead and look at our salt rate in. So again, that's going to be what I have here, our flow rate of the liquid times our concentration. So we're going to have the rate times our concentration. Okay, so let's go ahead and actually start pulling some information out of the problem then. So we're talking about the water entering the tank. So our rate of flow is 9 gallons per hour times our concentration. So it says the water entering the tank has 20 pounds of salt in every gallon. Okay, so that's going to be 20 and that number's fixed. I mean, it's changing depending on how much is coming in, but it's not like it's a function of time or anything. So it's just going to be 20 pounds of salt per gallon. Okay, so you'll notice then that our gallons are going to cancel. We've got one up here in the numerator, one down here in the denominator. So then that's going to give us a fixed value of 180 and that's going to be pounds per hour. All right, how about our salt rate out? And I kind of do the same thing, but unfortunately we don't know this one. So we're going to have our rate times our concentration. Okay, the rate we definitely know is still 9 gallons per hour. That hasn't changed. Times, okay, now our concentration. So it doesn't say that the water going out leaves the tank at a certain rate of salt or anything. It just tells us how it leaves. So that's where we're going to want to use this type of an idea then. So our concentration is the amount of salt in the tank divided by the volume of water in the tank. Okay, well the amount of salt in the tank, well that's what we're trying to find. So I'm going to go ahead and call that s of t and that's going to be in pounds. And then the volume of the water in the tank, well we know we start with 600 gallons and the water's leaving and entering the tank at the exact same rate. So no matter where we're at we're always going to have 600 gallons. So that's going to be divided by 600 and that's our gallons. Okay, so this is kind of a big mess, but again hopefully you notice that the gallons are going to cancel. So we've got pounds per hour, which is good because we want our units to match up. So I'm going to rewrite this and then hopefully you notice that 9 and 600 we can reduce that down a little bit. So I'm going to write this as 3 s over 200 and that's going to be pounds per hour again. Okay, alright we're getting there, I promise. Okay, so now we just got to put all these ideas together then in our differential equation. So that'll be step three here. So go ahead and write a d e. So we know that our rate, so that's d s d t. That's our derivative notation is going to be the rate in which is our 180 minus our rate out which is 3 s over 200. Okay, you notice I didn't put any units on this. We know our units are all going to match so we don't have to mess with any of that stuff. Okay, believe it or not this is a separable equation. I actually didn't believe it when I first looked at it honestly. But with a little bit of factoring we can kind of make this look a little bit different. Okay, and this is probably not obvious factoring to you. But it'd be really nice if the second term here was just an s. So that way when we go to do any integrating that should be fairly easy to integrate. So I'm going to go ahead and factor out a 3 over 200. Again, totally not obvious. Okay, and then watch what it's going to do to my coefficients. Oh my gosh. So this 180 is now going to become a 12,000. Yeah, believe that. And then minus this s. Okay, so again this may totally not be obvious to you. But hopefully it helps you see then that we can actually solve this differential equation and it's separable and all that good stuff. Okay, so let's do that now. So step four then will be to go ahead and solve. So I'm going to go ahead and swing this 12,000 minus s over to the other side. So I'm going to divide it since it's being multiplied. And that's going to give me ds dt. And that's going to equal just this 3 over 200. We typically like constants over here. You know, again I probably could have just gone ahead and moved this whole 180 divided by 3s over 200. But that's really going to look ugly. So this looks a little bit less ugly if it's possible. Okay, let's go ahead and integrate both sides. Let me pull up a different color here. Let's integrate both sides with respect to t. So integral dt. Again on the left hand side here these will cancel. So we're actually going to end up having an integral with just an s in it. Pull up my black here again. So that's going to look like the integral of 1 over 12,000 minus s ds is going to equal the integral of 3 over 200 dt. Okay, fantastic. Oh, another thing up here. I forgot to put my differential equation is we do know in initial condition, right? We know that s of 0 was 25. So I will be coming back to that. Sorry, I forgot to write that in there. Okay, so now these are fairly easy functions to integrate. Again, the one on the left is not very nice, but it's doable. If you want to throw u substitution at this or just notice, you know, we're going to end up with a natural log because we have 1 over a linear factor. But then we have to be careful about this extra negative in here. So this is actually going to give us the negative natural log of the absolute value of 12,000 minus s. And then that's going to equal the integral of a constant. It's very nice. So this is going to be 3 over 200 t. And then plus c. Hello, this c is going to be evolving. So we'll just call it how about c1 for now. Okay, let's go ahead and swing that negative over. So let's change the signs over here. And then that constant is just a constant. So it doesn't matter if it's positive or negative. But just to make myself feel a little bit better, I'm going to go ahead and then call it c2. Okay, so again, I multiplied or divided whichever way you want to think about it. Both sides by a negative 1, which is technically going to change the sign of this. Okay, now we got to undo that natural log. And of course that's with our e function. So if we do both sides of the e power, I'm going to end up with 12,000 minus s is going to be e to the negative 3 over 200 t plus c2. Okay, boy, this is really ugly. The right-hand side though, we can break that apart with rules of exponents. This is a favorite trick of ours. So I can say that's going to be times e to the c2. Because remember with exponents, when you multiply things with like bases, you actually add your exponents. And then we're going to play that same trick again. So let's now call this e to a constant is still going to just be a constant. So let's just call that c. And then I'm going to stick that out front. So if this isn't ugly enough, I don't know what is. The absolute values 2, that's really not going to make a darn bit of difference because that's going to throw a plus or minus on this right-hand side. But again, plus or minus c is just a constant. So we can ignore those two. It's kind of nice how all these little intricacies kind of tend to drop out. So we're going to end up with c e to the negative 3 over 200 t. Okay, now we just got to solve this for s. So let's start scooting stuff around. So hopefully you guys by then that s is going to give us. Finally, so 12,000 minus c e to the negative 3 over 200 t. Okay, so this is where our initial condition comes in. So remember that s of 0 is 25. So if we throw a 25 and over here, we've got 12,000. 1 extra 0 minus c e to the negative 3 divided by 200 times 0. But all this stuff here is just going to give us a 1. So c is going to end up being 11,975. Lovely. Okay, so our final function then, oh my goodness, is going to be s of t is 12,000 minus 11,975 e to the negative 3 over 200 t. And if anybody tries to combine these two things together, shame on you, because remember we got to follow order of operations. So that means we got to multiply by this e part first. Okay, so there's no way to simplify this lovely function here. Okay, but we haven't answered the question yet, of course. Okay, so the question, if we recall, says how much salt is in the tank after two hours? Okay, so that means, remember our t was an hour. So now we just got to plug a 2 into this thing. And when I throw that in my calculator, I got about 378.9 pounds. That's a lot of work for a lot of salt. Okay, so take these one step at a time, like all the other application problems we've done, they can be a bit overwhelming. But just know, like I said, take it one step at a time, break it down into these steps, and hopefully you will be successful. All right, thank you for watching.