# Modeling with a First Order Equation

#### alane1994

##### Active member
[h=2]Consider a tank used in certain hydrodynamic experiments. After one experiment the tank contains 200L of dye solution with a concentration of 1 g/L. To prepare for the next experiment, the tank is to be rinsed with fresh water flowing in at a rate of 2 L/min, the well-stirred solution flowing out at the same rate. Find the time that will elapse before the concentration of dye in the tank reaches 1% of its original value.
[/h]Any assistance would be very appreciated.

#### MarkFL

Staff member
We know that the amount of dye in the tank at time $t$, which we can call $A(t)$ is equal to the concentration of dye times the volume of solution in the tank, which remains constant at 200 L. There is no dye coming into the tank since it is fresh water. There is dye leaving the tank, which is the product of the concentration at time $t$ and the rate of flow.

If $A(t)$ is the amount of dye present in the tank at time $t$, then what is the concentration $C(t)$ at time $t$? Can you now relate the time rate of change of $A(t)$ to $A(t)$?

What is the initial amount in grams of dye present in the solution? Does the actual value matter?

Once you have these two things, you will have a separable IVP that you can solve.

#### Chris L T521

##### Well-known member
Staff member
Consider a tank used in certain hydrodynamic experiments. After one experiment the tank contains 200L of dye solution with a concentration of 1 g/L. To prepare for the next experiment, the tank is to be rinsed with fresh water flowing in at a rate of 2 L/min, the well-stirred solution flowing out at the same rate. Find the time that will elapse before the concentration of dye in the tank reaches 1% of its original value.

Any assistance would be very appreciated.
These types of problems need to be set up carefully.

Let $x(t)$ denote the amount of solute in the tank, $c(t)$ denote the concentration of the solute in the solution, and let $V(t)$ denote the volume of the solution at time $t$. Thus, we have that $x(t)= c(t)V(t)$. In this problem we're told that water is flowing in (denote this rate by $r_i$) and being drained (denote this rate as $r_o$) at the same rate (thus $r_i=r_o=r=2\text{ L/min}$); hence the volume $V(t)$ of the solution remains constant (i.e. $V=200\text{ L}$). Now, the amount of concentration $c_i$ flowing into the tank is $0\text{ g/L}$ since fresh water is being added. The amount of concentration leaving the tank is $c_o(t) = \dfrac{x(t)}{V}=\dfrac{x(t)}{200}\text{ g/L}$. With this, we have enough information to set up the differential equation.

If $\Delta x$ denotes the change in solute in the solution, then we have that
$\Delta x = \{\text{grams in}\} - \{\text{grams out}\} = r_i c_i \Delta t - r_oc_o\Delta t \implies \frac{\Delta x}{\Delta t} = r_i c_i - r_oc_o$
and thus as $\Delta t\to 0$, we get the differential equation
$\frac{dx}{dt} = r_i c_i - r_oc_o$
which in our case is
$\frac{dx}{dt} = -\frac{2x}{200}\implies \frac{dx}{dt} = -\frac{x}{100}$

Once you solve this simple ODE, you're then left with finding $t$ such that $x(t)= .01x(0)$.

I hope this makes sense!

EDIT: Was ninja'd by MarkFL; I should be quicker when it comes to these things... (feel free to delete if you think it's necessary, Mark; didn't mean to sideswipe you in any way).

#### MarkFL

Staff member
...
EDIT: Was ninja'd by MarkFL; I should be quicker when it comes to these things... (feel free to delete if you think it's necessary, Mark; didn't mean to sideswipe you in any way).
I don't feel sideswiped here, you did not give a full solution, you showed how to set it up only.

Okay, in my book it gives an equation of
$$\dfrac{dQ}{dt}=\text{rate in}-\text{rate out}$$

$$t=0$$

$$Q_0=200g$$

$$200~L~water$$

$$\dfrac{0~g}{L}\text{enters at}\dfrac{2~L}{min}$$
$$\text{exits at}\dfrac{2~L}{min}$$

This is where I am right now.

EDIT: Didn't notice that Chris had responded before this post.
Using what I posted above, we would find:

$$\displaystyle \frac{dA}{dt}=-\frac{A}{200}\cdot2=-\frac{A}{100}$$

This is what Chris L T521 obtained as well.

Note: $A$ is in grams and $t$ is in minutes.

The negative sign indicates the amount of dye is decreasing, and we have the concentration at time $t$ times the rate of flow.

#### alane1994

##### Active member
Both posts were very helpful, not to pick favorites, but Chris was incredibly helpful. I think that I may have been overwhelmed by the problem and you broke it down into easy to understand chunks.
Thanks very much to both of you, let me chew this over for a bit and see what comes out of it.

EDIT: And once again I post after a rather important reply.... sometimes I swear....

#### MarkFL

Staff member
Let me know once you solve the problem how you think the initial amount of dye affects the answer to the problem.

#### alane1994

##### Active member
Okay, I have gotten the problem down to

$$\large{x=Ce^{-\frac{t}{100}}}$$

#### MarkFL

Staff member
Good, now how can you determine the parameter $C$?

#### alane1994

##### Active member
Then, you have
$$x(0)=200$$

$$2\%~of~200=2$$

$$\large{2=200e^{-\frac{t}{100}}}$$

$$t=460.5~\text{minutes}$$

#### MarkFL

Staff member
Here's another approach:

If we let $A(0)=A_0$, and switch the dummy variable of integration, we may write:

$$\displaystyle \int_{A_0}^{A(t)}\frac{du}{u}=-\frac{1}{100}\int_0^t\,dv$$

$$\displaystyle \ln\left(\frac{A(t)}{A_0} \right)=-\frac{t}{100}$$

Solve for $t$:

$$\displaystyle t=100\ln\left(\frac{A_0}{A(t)} \right)$$

Now, let $$\displaystyle A(t)=\frac{A_0}{100}$$ and we find:

$$\displaystyle t=100\ln\left(\frac{A_0}{\frac{A_0}{100}} \right)=100\ln(100)\approx460.517018598809$$

As you can see the initial amount of dye is irrelevant.

#### alane1994

##### Active member
Thanks for the help guys!