All right, in this video I'm going to do, I think, two problems that are mixing problems. This is an
application to linear systems of differential equations with constant coefficients. These
types of problems, they're word problems, so they'll give you a situation where you have X
number of tanks. The variable X is the number of dimensions that you're gonna have. In this case,
we have two tanks, so you have a two dimensional linear system. You have tanks and they have pipes
and things with solution or water going into and out of them and they're mixing up. You're
given the rates of everything. Then you make differential equations and you're asked to find
a function of time of the solution concentration. In this case, you can read the example, but it's
talking about salt in water solution. You're given two tanks, which I'll try to draw here.
And they have two pipes connecting them. That's how the mixtures are mixing together. Let's call
this X1 and X2. This problem is one of the more straightforward examples of a mixing problem and
probably the second one--the second one that I do will be a little bit more involved because you can
have spigots and things pouring extra water in or out of the tanks. But both of the problems
that I'm going to do, the actual solving of the differential equation will be simple. It can
get a little bit more involved if you have to do Laplace transform and things like that but I'm not
going to do an example like that in this problem. Okay so anyway going back to this. We have tanks
that are the same volume and they're just--the changes are just through the pipes. This has 1
gallon per minute and so does this one. Again it's just pretty straightforward. We have that X of t
for the first tank, it has 100 pounds of salt and the other one has 0, so actually this is X of 0.
Now we're ready to--and we know the rates--so now we're ready to write the differential equations.
We'll do the differential equation for tank 1. The way I do this is, you just--you're given the salt,
the chemical, that's going to be your X. That's what you want to focus on. You have also the
concentration, which is what you're asked to find. The concentration will be the amount
of salt over the volume, which in this case is 500 gallons in each tank. For these problems,
the rates of change will be the concentration times the rates that the change--the concentration
is moving in or out. For the first one, it's going to be, we have a concentration X2 over 500. This,
we know it's 0 but we're just trying to find the equations first. We're not plugging in any
numbers. We're just calling X2 the amount of salt in the second tank and that's going into tank 1 at
a rate of one gallon per minute, so times 1. And we know that we have solution from tank 1 at the
same time leaving tank 1 to tank 2 at a rate of 1 gallon per minute and that's going to be
X1 over 500. That's the differential equation for the first tank. Differential equation for
the second tank is going to be basically the same thing, just reversed. We have 1 gallon per minute
coming into tank 2 from tank 1. This will be the concentration there and we have 1 gallon
per minute of tank 2 solution leaving tank 2. The way you solve this--I haven't posted a video for
this method yet but you're just going to create the matrix of constant coefficients then you find
the eigenvalue and eigenvector. It's the common method of solving a linear system of differential
equations. Hopefully I'll make a video of it eventually. What we're going to do is, we have
the equation that X prime of t equals the matrix of constant coefficients times X. We can rewrite
this as a matrix of the coefficients. We're going to--you just want to make sure that you order X1
and X2 in the same place. I didn't write that here but it's gonna be--the coefficient for X1
you're wanting to look at first for each case. For X prime of 1, X1 the coefficient is -1 over
500. We're going to have -1 over 500 plus 1 over 500 for X2. That's the second term in the matrix.
And this is a two tank problem so it's going to be a 2 by 2 matrix. Then for the second one,
X1 is here so it's coefficient is 1 over 500. It's symmetric in this case again because the rates
are the same and the volume stays the same. The second term is that X2 leaves at 1 over 500. And
then that's going to be times X1 and X2 and when you do matrix multiplication, you'll get these two
equations. Then we're going to just do the method of finding the eigenvalue and eigenvector. For
that, you use two equations. You write out the characteristic equation. That's lambda
squared minus the trace lambda plus D equals 0 and we also have the equation the A matrix
minus lambda times the identity matrix times a V matrix equals 0. That's the vector matrix for
finding the eigenvectors. Let's go ahead and do the first part. T is equal to the trace of the
matrix A. That equals just adding the two values on the diagonal. That's -1 over 500 plus -1 over
500. That equals -2 over 500 or -1 over 250. D equals the determinant of the matrix A. That's the
multiple of this diagonal minus the multiple of this diagonal. If you do this, you see you have 1
over 500 squared and then you're going to do minus 1 over 500 squared. The determinant in this case
is just 0. Our characteristic equation is going to be lambda squared minus or plus 1 over 250 lambda
equals 0. We're going to get two values for two eigenvalues here. That's going to be lambda plus
1 over 250 equals 0. Solving for lambda, we get lambda equals 0 or lambda equals -1 over 250 and
now we can use the second equation to find the eigenvectors. We're going to do -1 over 500,
1 over 500. Just writing out the A matrix again. And you subtract the lambda times the identity
matrix. The identity matrix is (1 0; 1 0). That's going to be -1 over 250, 0 -1 over 250, 0 when you
multiply it by lambda. Since this is a two tank problem, we're just going to have two eigenvectors
as well and this is equal to 0 again. Solving for that problem, we're going to subtract first,
so -1 over 500 plus 1 over 250 equals 1 over 500. One over 500 minus 0 is 1 over 500. One over 500
minus 0, same thing. Negative 1 over 500 plus 1 over 250. It's the same as the first one. We have
just a matrix of 1 over 500, V1, V2 equals 0. Just looking at the first equation, we have 1 over 500
times V1 and then just doing matrix multiplication plus 1 over 500 V2 equals to 0. That means when
you have 1 for V1 it's going to be -1 for V2 to get equal to 0. Now we have for lambda 0,
the eigenvalue and the eigenvector for one equation. Oh this is actually -1 over 250. Now you
can do lambda equals to 0, which is even easier. That's going to be again the same thing. Rewriting
the A matrix. That was minus 0, which just gives you the same matrix. And then you can do times V1,
V2. In this case we're going to have the equation -1 over 500 V1 plus 1 over 500 V2 equals to 0.
In this case, the vector if you plug in 1, you're going to get 1 for V2 as well. We have now enough
information to create the general solutions for the differential equations. The amount of salt
X of t is equal to constant coefficient C1 e to the 0t (1; 1) plus C2 e to the -1 over 250t (1;
-2). And we have--this is an IVP problem because we have X of 0 is equal to 100 and 0. This e to
the 0 is just 1, so that simplifies there. When we plug in 0, we're going to get 100 equal to C1,
C1 plus...Again plugging in 0 just gives you 1. Plus C2 minus C2. Just pulling out one equation,
we're going to get 100 equals C1 plus C2 and the other equation is 0 equal to--we have to write it
as a vector--as 0 equal to C1 minus C2. If we do that, we have C1 equal to C2. If we plug that in
here, we get 2 C1 equal to 100. C1 and C2 are equal to 50 to solve that solution. The final
answer for this problem is going to be X of t equal to 50 e to the...well, just 0 actually,
so just 1, (1; 1) plus C2, which is 50 e to the -1 over 250t (1; -1). And that's your final answer. And then if
they ask you how much concentration of salt will be in the tanks at time 30, after 30 minutes,
you just plug in t equals to 30 to the equation and that's how you get that solution. As I was
editing the video, I see that I'm already at over ten minutes for the first problem. I did do the
second one already but I'm going to separate the two problems into two videos and just end
the video at this problem and probably the next video that I upload will be the second problem.