A Mixing Problem

The Problem

A lake has a volume of 6 billion cubic feet, and, initially, its pollutant concentration is 0.22 percent.  A river whose waters contain only 0.06 percent pollutants flows into the lake at the rate of 350 million cubic feet per day, and another river flows out of the lake carrying 400 million cubic feet per day.  Assume that the water in the lake is always well mixed, and that 50 million cubic feet of pollution-free water is added to the lake by various streams and springs.  How long does it take to reduce the pollutants in the lake to 0.1 percent?

Translation

t = time (in days)

P = amount of pollutant in the lake (in cubic feet)

dP/dt = 210000-P/15

P(0) = 13200000

How much pollutant is entering the lake per day via the incoming river?

> 350000000*0.0006;

210000.0000

What fraction of the pollutant in the lake is leaving each day via the outgoing river?

> 400000000/6000000000;

1/15

How much pollutant is in the lake at the start?

> 6000000000*0.0022;

13200000.00

Solution

First we find the general solution of the differential equation.  First we separate variables to get

dP/(210000-P/15) = dt ,

then integrate.

> integrate(1/(210000-P/15),P);

-15*ln(210000-1/15*P)

The right hand side is easy to integrate, giving t+C for some constant C .  We then solve the equation for P .

> gensoln:=solve(-15*ln(210000-1/15*P)=t+C,P);

gensoln := -15*exp(-1/15*t-1/15*C)+3150000

It helps now to simplify this.  However, the simplify command is not helpful.

> simplify(gensoln);

-15*exp(-1/15*t-1/15*C)+3150000

> expand(gensoln);

-15*exp(-1/15*t)*exp(-1/15*C)+3150000

This gives us something with which we can deal -- the factor -15*exp(-C/15) is an arbitrary constant we can rename as C .

> gensoln2 := C*exp(-t/15)+3150000;

gensoln2 := C*exp(-1/15*t)+3150000

Of course, if we cheat and use dsolve, we get this much more quickly.

> dsolve(diff(P(t),t)=210000-P(t)/15);

P(t) = 3150000+exp(-1/15*t)*_C1

We then find the constant of integration by substituting in the initial condition.

> solve(13200000= 3150000+exp(-1/15*0)*C);

10050000

Now we find what the pollutant level at 0.1% is...

> 6000000000*0.001;

6000000.000

and solve for the time t .

> solve(6000000=3150000+10050000*exp(-t/15));

-15*ln(19/67)

It makes sense in a problem like this to calculate a numerical estimate to this.

> evalf(%);

18.90380460

So it should take 19 days to reduce the pollutants in the lake to 0.1 percent.

A Better Translation and Solution

t = time (in days)

P = amount of pollutant in the lake (in millions of cubic feet)

dP/dt = Float(21, -2)-P/15

P(0) = Float(132, -1)

How much pollutant is entering the lake per day via the incoming river?

> 350*0.0006;

What fraction of the pollutant in the lake is leaving each day via the outgoing river?

> 400/6000;

How much pollutant is in the lake at the start?

> 6000*0.0022;

.2100

1/15

13.2000

First we find the general solution of the differential equation.

> dsolve(diff(P(t),t)=0.21-P(t)/15);

P(t) = 3.150000000+exp(-1/15*t)*_C1

Then find the constant of integration by substituting in the initial condition.

> solve(13.2= 3.150000+exp(-1/15*0)*C);

10.05000000

Now we find what the pollutant level at 0.1% is...

> 6000*0.001;

6.000

and solve for the time t .

> solve(6=3.15+10.05*exp(-t/15));

18.90380460

So it should take 19 days to reduce the pollutants in the lake to 0.1 percent.