On my most recent test the last question completely stumped me. The problem is the following:

A tank contains 500 liters of salt solution with 50 kg of salt to start with. Another solution with the concentrate of 0,015 kg/liter is pumped in at a speed of 6 liters/min. At the same time 4 liter/min is being pumped out of the tank. The solution is always assumed to be evenly distributed and the tank has a maximum capacity of 1000 liters. How much salt does the tank contain right before it spills over the edge?

This is what I managed to do:

t= time in minutes

It adds 2 liter/min therefor:

t=(1000-500)/2=250

I got the follow differential equation which I don't know how to solve.

S(t)= the amount of salt in kg

S'(t)=0,09-4((S(t)/(500+2t))

With the condition S(0)=50

How do you solve this type of equation? I could do it if wasn't for the "t" mixed in to it. Any help would be greatly appreciated.