 So as a final example of solving linear differential equations, I wanna revisit this problem we solved before when we talked about several differential equations about mixing salt into water. And this problem is gonna, the setup sounds very similar to what we solved before. The previous situation we saw, the differential equation that we got was actually a separable differential equation for which we solved it by separation of variables. It turns out that that differential equation we solved before was also a linear differential equation. And if ever, ever, ever, you have to choose between a separable differential equation versus a linear differential equation, typically speaking, I would choose the linear differential equation. The technique of using the integrating factor is, I would say easier to do than separation of variables. It leads to simpler anti-derivatives and the like. So it turns out that probably did earlier, we actually could have done a lot easier using the integrating factor. But also it turns out we chose a special assumption the first time we solved this problem so that it was a separable differential equation. In general though, this mixing problem will actually be a linear first order differential equation. And so this actually gives the more, the more appropriate way to approach this problem. So some things about this problem are gonna be the same. We're gonna have a tank of water which starts off initially, so when time equals zero, we're gonna have as our volume 100 gallons of water. And inside of that, there's gonna be 20 pounds of salt. 20 pounds of salt. So we're gonna let capital V denote the water, how much water is in there and then Y is gonna represent how many pounds of salt. So this would be V naught are initial values of water and Y naught are initial amount of salt, okay? And so again, like before, V of T is gonna equal the number of gallons of water at time T and we're gonna take Y of T to be the number of pounds of salt in the water at time T. And therefore, Y over V is gonna give the concentration, concentration of salt in the tank at that given amount of time. All right, and so that part's gonna be similar. We have the same initial conditions we did last time. What we're gonna change though is the intake of salt into the system. So a salt solution is flowing into the water. So we have water flowing into it. In the previous example, we saw that we actually had pure water coming in. So there was no salt coming in, it was just water. What we have this time is we're gonna have a salt solution. So saline solutions come into the system. So we're pouring in salt water. It's coming down to a rate of three gallons per minute. And let's see, water's also gonna be draining out of the tank at two gallons per minute. So notice we're adding more water than we're draining and this is to compensate for perhaps evaporation in the tank. Now the salt solution that's coming into the system also contain two pounds per gallon. So that's how concentrated this salt is coming in. And how much salt is exiting the system? That depends on the, that's gonna depend a lot on the mixture and such. And so assuming everything is mixed up uniformly, can we find an equation to model the salt at any given amount of time? Now if I asked about the volume, volume's a lot easier, right? So we know that the change of volume with respect to time is gonna equal, well, it's gonna be the rate in which water comes in minus the rate at which water is exiting. And this is fairly simple because we know there are two gallons, sorry, three gallons coming in, there are two gallons coming out. So there's a change of one gallon per minute. In which case if we find the anti-derivative of that, we're gonna get that V equals, because again, we're just gonna integrate these things, right? We're gonna get that V is equal to T plus a constant. And using the initial value, V naught equals 100 gallons, this will then equal zero plus C. We get C equals 100. And so this gives us, this gives us the volume formula that we saw before, V of T equals 100 plus T, great. We're gonna put this in our back pocket for later when we need it, which actually won't be much later at all. So that part was the same. What is different in this situation, of course, is we're gonna now look at the derivative of Y with respect to T. We are looking at the rate in which salt is entering the system, and we're looking at the rate in which salt is exiting the system. What is different here is that the salt entering the system is now a constant. We are entering two gallons per, two pounds per gallon. Now that right there, we can't stop there because two pounds, because DY over DT, this is gonna be measured in pounds per minute, right? At the moment we have pounds per gallon. So we have to take the concentration of salt in the water times that by the rate in which water is entering the system, in which case it's entering at three gallons per minute. Notice that gallons, gallons, cancels, and the water intake, I should say the salt intake is going to be six gallons per minute. We're getting six gallons of water per minute. But what about the salt, what about the salt exiting the system, right? Well, like we saw before, we're gonna have a concentration. We have Y over V, which gives us pounds per gallon, and then we have two gallons per minute exiting. So again, the gallons cancel out, and we're gonna have minus two Y over V, and this is gonna be pounds per minute. So this gives us the correct rate. Or simplifying this one more time, we're gonna get that Y prime, that's the derivative of Y with respect to time, it's gonna equal six minus two Y over 100 plus T. This is the differential equation we'd have set up for the salt intake. This is the rate of salt, I should say, entering and exiting the system. If we can solve for Y, that gives us the function we want. And this equation right here is not separable. We can't separate the variables this time, but we can still treat this as a linear first order differential equation. So what I'm gonna do is I'm gonna add the Y part to both sides here. So add two Y over 100 plus T to both sides. We get that Y prime plus two over 100 plus T times Y. This is equal to six. And so this right here are two over 100 plus T. This is our function P of T that we need to integrate for the integrating factor. So integrating P of T right here, P of T with respect to T. So we get two over 100 plus T, DT. The antideriv is gonna involve a natural log two times the natural log of 100 plus T. Again, you don't need a constant when you're doing these integrating factors. So our integrating factor I of X is gonna, I should say I of T. T is the variable in play right here. You're gonna get E to the two times the natural log of 100 plus T. I wanna simplify that a little bit here cause again, you can bring this coefficient two inside. So you get E to the natural log of 100 plus T squared in which case the E and the natural cancel out and your integrating factor is gonna be 100 plus T squared like so. All right. And so once we have this integrating factor we're then gonna multiply both sides of this equation right here by 100 plus T squared. So let's see what that would look like. You're going to get 100 plus T squared times Y prime plus you're going to get two times 100 plus T squared over 100. Oh, it's happening right here. Sorry, this kind of glitched out on me. Now let's try that again. We get two times 100 plus T squared over 100 plus T, you'll multiply that by Y. And then the other thing is we have a six. So we're gonna get six times 100 plus T squared like so. All right. Now there is some cancellation that happens. There's a 100 plus T that cancels with that. And so when you do that, you're gonna see that you're gonna have 100 plus T squared Y prime. You're gonna have a two times 100 plus T Y. And so factoring that thing, the left-hand side, give myself a little bit more space here. The left-hand side is gonna look like 100 plus T squared times Y. And then we take the derivative on the left-hand side and then the right-hand side is six times 100 plus T squared. And we wanna integrate these things. Integrate the left-hand side, integrate the right-hand side. The left-hand side should just be 100 plus T squared Y. The right-hand side, just by a very simple U substitution, you're going to get two times 100 plus T to the cube. Plus a constant. Divide both sides by 100 plus T to the square. Do that over here. So we're gonna get 100 plus T to the square. The left-hand side then gives us a Y. The right-hand side, you should get a two times 100, or T plus 100 plus C over 100 plus T to the square. And so we now see that we have our general solution right here. Great. Now we need to find, using the initial conditions. So remember, we started off with two pounds of salt when T equals zero. When you plug that in here, you're gonna get 20 equals two times 100 plus C over 100 squared. Whoops, forgot our parenthesis right there. And so we will subtract 200 from both sides. That gives you negative 180 on the left. You get C over 100 squared. So we should times both sides by that. We're gonna get C equals negative 180 and then throw on four more zeros. So negative 1.8 million. And so then if we come up here and substitute out the C with now this number, I also take out the plus sign. You're gonna get negative 1,800,000, like so. And so this then gives us the solution to this differential equation. It's quite nice actually. It's really, really nice. And we will solve this using technique of the integrating factor. Great. Now, let us use this to make a calculation, right? How much salt would be in the system after one hour? So we take the equation we saw in the previous slide and we're gonna plug in T equals 60, right? One hour means T equals 60. We were measuring our rates in minutes so we'll have to stick with minutes here. So Y of 60, 60, we're gonna get two times 60 plus 100 minus the 1.8 million. Feel free to use scientific notation that helps out out here at all. 600, sorry, 60 plus 100 squared, like so. And this is just something to throw in a calculator at this moment, right? 60 plus 100 to 160, double that, you get 320. And like we saw before, 100 plus 60 is just 160 squared that, divide that from 1.8 million. You're gonna get like 70.3125. And so putting those together, you get 249.8675. We could be worried about significant digits or anything like that. We're just gonna round this to the nearest whole number. And so this would give us an estimate of 250 pounds of salt would be in the system at that time. We also would have, of course, 160 gallons at that moment because we had one gallon per minute. So you have a concentration of 250 pounds per 160 gallons which of course gives you 25 over 16. And again, we can get a decimal concentration from that if we want to. That's beside the point. I just wanted to show you that once we solve the differential equation, we can then use that function to analyze the situation. We can determine the concentration, the amount of salt, whatever. It all comes down to solving this differential equation and this salt concentration problem is solved preferably using these linear first order differential equations. And so this video actually brings to the end of our discussion of differential equations. It was, it's a pretty fun journey but this is only meant just to be an extended trailer, right? Just a short introduction to the subject matter. If you are interested in differential equations beyond what we've seen, there is a little bit more in the textbook that we did not take a look at. You might want to take a look at it if you're interested, right? Here in chapter nine, there's a few sections we skipped. Also at the end of calculus three, if you have the end, if you have access to the volume three, the multivariable calculus, they do talk somewhat in this, in our textbook, you can either use to change Stuart's textbook for which this series is based upon or you could just use like a free textbook like OpenStack, you can go to OpenStack.org and you could take a look at volume three. The very last chapter will show you how you can deal with some second order differential equations using these techniques and calculus that we've been talking about. Or better yet, if you wanna learn more about differential equations, my recommendation is to take a class on differential equations such as math 2280 offered at Southern Utah University. If you have any questions, like always feel free to post them in the comments below. Feel free to click the like button cause you like this video, I know you do. Feel free to just subscribe to get some more updates about math videos in the future and keep on counting.