Linear differential equations
can be used to determine the concentration
of chemicals in bodies of water.
Let's look at an example.
A 100 liter tank contains 10 kilograms of salt
dissolved in 60 liters of water.
Solution of water and salt, or brine,
with concentration of 0.1 kilograms per liter is flowing
in at a rate of 5 liters a minute.
The solution in the tank is well stirred
and flows out at a rate of 3 liters a minute.
How much salt is in the tank when the tank is full?
Notice all the relevant information is shown
in the diagram on the right.
Again, the tank starts with 60 liters of solution
containing 10 kilograms of salt.
Which means if we let x equal the amount of salt
in the tank at time t,
we have initial condition x of 0 equals 10.
And again, the rate in is 5 liters per minute,
the concentration in is 0.1 kilograms per liter,
the rate out is 3 liters per minute,
and the fill rate is equal
to the difference of the rate in and rate out,
which gives a fill rate of 2 liters per minute.
Now let's come up with an equation for x,
where x denote the kilograms of salt in the tank
and we'll let t denote the time in minutes.
For a small change delta t in time,
the change in x denoted delta x
is approximately equal to the rate in
times the concentration in times delta t
minus the rate out times the concentration out
times delta t.
From here, if we divide through by delta t
and take the limit as delta t approaches 0,
we have the differential equation
dx/dt equals the rate in times the concentration in
minus the rate out times the concentration out.
This is a differential equation we need to solve,
but first we need to determine
the right set of the equation.
We have most of this information.
We know the rate in is equal to 5 liters per minute,
we know the concentration in
is equal to 0.1 kilograms per liter,
we know the rate out is equal to 3 liters per minute,
but now we need to work
on determining the concentration out.
The concentration out is equal
to the amount of salt in the tank
at any time t, which is x,
divided by the volume of the tank,
which is a number of liters in the tank at any time t.
We know the tank starts with 60 liters
and then the fill rate is equal to 2 liters per minute,
and therefore the volume is equal to 60 plus 2t,
where t is the time in minutes.
Performing the substitution,
we have dx/dt is equal to 5 times 0.1
minus 3 times
x divided by the quantity 60 plus 2t.
And now we need to write the equation
in the form shown here below or standard form
so we can identify the integrating factor,
which in our case is going to be p of t not p of x.
Because we have dx/dt, x is the dependent variable
and t is the independent variable.
So we need to add 3 times
x divided by the quantity 60 plus 2t
to both sides of the equation.
And because x is a dependent variable,
we write the left side as dx/dt plus 3
divided by the quantity 60 plus 2t times x equals 0.5.
Now we know that p of t is equal to 3
divided by the quantity 60 plus 2t,
which we need in order
to solve differential equation using an integrating factor.
So taking this equation onto the next slide,
again we already put the equation in the correct form,
we identified p of t,
and therefore the integrating factor
in our case r of t
is equal to e raise to the power of the integral of 3
divided by the quantity 60 plus 2t dt.
And now let's work on integrating.
This does require u substitution
where u is equal to 60 plus 2t
and therefore du is equal to 2dt
and 1/2du equals dt.
Where the integral with respect to u,
we have 3 times 1/2 times integral of 1
divided by u du with respect to t
gives us 3/2 times natural log
of the quantity 60 plus 2T.
We leave off the plus C for now
and we don't need an absolute value
because t is non-negative.
And let's work on simplifying this exponential term.
Let's first focus on the exponent.
We'll begin by applying the power property logarithms,
which means 3/2 times natural log of the quantity
60 plus 2t is equal to natural log
of the 3/2 power of the quantity 60 plus 2t.
And again, this is the exponent of the base e,
because we have e to the power of the natural log
that simplifies nicely to just the quantity
60 plus 2t raise the power of 3/2.
So this is the integrating factor
and now you multiply both sides of the different equation
by the integrating factor.
So taking the equation in the box on the top
and multiplying both sides by the integrating factor.
We have this line here
where we have the integrating factor times dx/dt
plus the integrating factor
times 3 divided by the quantity 60 plus 2t times x
equals 0.5 times the integrating factor.
Now we know the left side is equal to the derivative
of the integrating factor and the dependent variable x.
The next step is integrate both sides of the equation
with respect to t, which isn't shown here
so I'll show it on the side.
On the left, the integral undoes the derivative,
leaving us with just the quantity 60 plus 2t
raise to the power of 3/2 times x equals
integral on the right plus some constant C.
Before we integrate, let's go ahead and solve for x.
To solve for x, we can multiply both sides of the equation
by the quantity 60 plus 2t
raise to the power of negative 3/2.
This gives us x equals the quantity 60 plus 2t
raise to the power of negative 3/2
times integral plus C times
the quantity 60 plus 2t
raise to the power of negative 3/2.
And now we need to integrate.
Again, this does require u substitution.
When integrating with respect to t,
we have an extra factor of 1/2.
We already have a factor of 1/2
in the integral function,
1/2 times 1/2 is 1/4.
And then when we integrate,
we add 1 to 3/2, which gives us 5/2.
Dividing by 5/2 is equivalent to multiplying by 2/5,
1/4 times 2/5 gives us the 1/10
and then we have times the quantity 60 plus 2t
raise to the power of 5/2.
We can simplify this first product
because we have a common base of 60 plus 2t.
Because we're multiplying, we add the exponents.
Negative 3/2 plus 5/2 is equal to 1,
giving us a general solution of x equals
the quantity 60 plus 2t divided by 10
plus C times the quantity 60 plus 2t
raise to the power of negative 3/2.
From here, we need to find C
using the initial condition x of 0 equals 10.
This indicates we substitute 0 for t and 10 for x,
which gives us 10 equals 60 divided by 10 plus C times 60
raise to the power of negative 3/2.
Solving for C, we have C equals 4 times 60
raise to the power of 3/2.
This gives us a particular solution
x of t is equal to the quantity 60 plus 2t divided by 10
plus the constant C, which we now know is 4 times 60
raise to the power of 3/2 times a quantity 60 plus 2t
raise to the power of negative 3/2.
And now we need to determine the time it takes
for the tank to be full.
Recall, the tank holds 100 liters.
The tank holds 100 liters
and it starts with 60 liters,
and recall the fill rate is 2 liters per minute.
And therefore to determine the time
it takes to fill the tank,
we need to solve the equation
60 plus 2t equals 100,
giving us t equals 20.
Which means we need to determine x of 20
which is shown here below, which is approximately 11.86.
Now we know there is 11.86 kilograms of salt in the tank
when the tank is full.
It doesn't ask,
let's also determine the beginning and ending
concentration of salt in the tank.
The concentration when the tank is full
is approximately 11.86 kilograms
divided by 100 liters,
giving a concentration of 0.1186 kilograms per liter
and the concentration started
at 10 kilograms divided by 60 liters
or approximately 0.167 kilograms per liter.
Notice that concentration is lower when the tank is full.
I hope you found this helpful.