Ace2 Joined: Oct 2, 2017
• Posts: 1070
September 2nd, 2019 at 3:17:29 PM permalink
After a long hiatus from my last college math class (which was DifEq, which I did somehow pass), I’ve decided to revisit it. I’m starting with the classic problem of:

There’s a full 100 liter tank containing a water and 10kg salt. If we add 10 L pure water per minute while simultaneously draining 10 L of the solution per minute, how much salt will be left in the tank after 30 minutes?

I’m having a hard time setting up the formulas. Does anybody have an intuitive understanding of DifEq?
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 4959
September 2nd, 2019 at 4:25:58 PM permalink
DEs have always been one of my weak spots.

However, this site seems to have the solution you desire.

I was about to say, "Please tell me I didn't just do someone's homework for him," but given that the link is to a university website, if a university wants to make the answer public...
ChesterDog Joined: Jul 26, 2010
• Posts: 972
September 2nd, 2019 at 6:12:17 PM permalink
Quote: Ace2

...I’m having a hard time setting up the formulas...

In class, my engineering professor started every example problem like yours with this very useful equality:
Input - Output = Accumulation

He would then substitute expressions for each of the three terms. For your problem, the expressions would be:
Input of salt = 0 x 10 L/m = 0
Output of salt = concentration x 10 L/m = 10f, where f is the varying concentration in kg salt/l of water
Accumulation of salt = d(100f)/dt = 100 df/dt

So, the differential equation to solve is:
-10f = 100 df/dt

After solving this, put in the initial condition:
f(0) = 10/100

Then find f(30) and multiply by 100 to find the salt remaining in the tank after 30 minutes.
Wizard Joined: Oct 14, 2009
• Posts: 23442
September 2nd, 2019 at 7:14:39 PM permalink
Quote: Ace2

There’s a full 100 liter tank containing a water and 10kg salt. If we add 10 L pure water per minute while simultaneously draining 10 L of the solution per minute, how much salt will be left in the tank after 30 minutes?

Let:
s = kg of salt.
t = minutes since salt was dumped into the tank.

We're given:

ds/dt = -(10/100) * s
ds = (-10/100)*s dt
-10/s ds = dt

Take the integral of both sides.

-10*ln(s) = t + c

Next, let's solve for the dreaded constant of integration. We're given that at t=0, s=10. So...

-10*ln(10) = 0 + c
c = -10*ln(10)

So, our equation of salinity is now:

-10*ln(s) = t - 10*ln(10)

The question at hand is how much salt will be in the tank at t=30.

-10*ln(s) = 30 - 10*ln(10)

ln(s) = -3 + ln(10)

s = exp(-3 + ln(10))
s = exp(-3) * exp(ln(10))
s = 10 * exp(-3)
s = 0.4979 kg of salt.
It's not whether you win or lose; it's whether or not you had a good bet.
Wizard Joined: Oct 14, 2009
• Posts: 23442
September 3rd, 2019 at 2:26:14 PM permalink
I was hoping to hear an "a men" from one of the other math geeks of the forum.
It's not whether you win or lose; it's whether or not you had a good bet.
rsactuary Joined: Sep 6, 2014
• Posts: 1865
September 3rd, 2019 at 2:31:34 PM permalink
ok... Amen!
Wizard Joined: Oct 14, 2009
• Posts: 23442
September 3rd, 2019 at 3:47:47 PM permalink
Quote: rsactuary

ok... Amen!

Thanks. I may have no clue how to talk with women, but I can at least remember how to do an ordinary differential equation. At least I think I remember.
It's not whether you win or lose; it's whether or not you had a good bet.
Ace2 Joined: Oct 2, 2017