solving linear ODEs for mixing problems with function notation

245 Views Asked by At

consider this mixing problem for differential equations: a tank holds 100 L of water that initially has no sugar in it. Sugar water with 5 grams / L of sugar enters at rate of 2 L per minute. Water is flowed out at rate of 2 L per minute. Tank is well mixed.

The amount of sugar S in the tank can be related to its derivative $dS/dt$:

$\frac{dS}{dt} = (2 \mathrm{L/min})(5 \mathrm{g/L}) - (2 \mathrm{L/min})(S/100 \mathrm{L})$

$\frac{dS}{dt} = 10 - \frac{2S}{100}$

This can be solved by separating $S$ and $t$ by multiplying both sides by $dt$ and then dividing by $S$, and then integrating both sides. This is funny because it requires treating $dt$ like a variable and multiplying by equations by $dt$ which doesn't have real mathematical meaning. Is there a way to solve these equations without treating the $dx$ notation this way, instead using explicit $S'(t)$ and $S(t)$ function notation? I tried:

(Eq1) $S'(t) = 10 - \frac{2}{100}S(t)$

assuming this is a correct way to rewrite the differential equation, it's less clear how to solve this equation $(Eq1)$ and how to separate the variables.

also, can someone give an example where multiplying by $dt$ is invalid?

2

There are 2 best solutions below

4
On

here is another way to solve this. you can see that $$ S = 500 $$ is a particular solution and that $$S = e^{-t/50}$$ is a solution to the homogeneous equation. therefore $$S = Ce^{-t/50} + 500 $$ is the general solution. use the initial condition to fix the value of $C.$

1
On

The technique of separation of variables is really the chain rule in disguise. You have

$$\frac{dS}{dt} = 10-\frac{2S}{100}=\frac{1000-2S}{100}.$$

So

$$\frac{\frac{dS}{dt}}{1000-2S} = \frac{1}{100}.$$

Now (introducing a dummy variable $u$) you integrate both sides from $u=0$ to $u=t$:

$$\int_0^t \frac{\frac{dS}{du}}{1000-2S} du = \int_0^t \frac{1}{100} du.$$

Now the left side you can integrate using the change of variables formula, by taking $v=1000-2S$. So you get

$$\int_{1000-2S(0)}^{1000-2S(t)} \frac{1}{v} dv = \frac{t}{100}.$$

Now you solve this for $S(t)$. This change of variables in integration is justified by the chain rule for derivatives and the fundamental theorem of calculus.