# Diff Equation with two populations

1. Feb 6, 2013

### Colts

1. The problem statement, all variables and given/known data

2. Relevant equations
Not sure

3. The attempt at a solution
I tried to do the first population problem at t=0 so M(t) would be 100, but there is the k constant that I don't know and don't know how to find it. Is there a way to find k or do you even need too?

2. Feb 6, 2013

### HallsofIvy

You have dP1/dt= kP1+ M1. That is a linear equation so we can divide it into two parts. dP1/dt= kP1 can be itegrated by rewriting it as dP1/P1= k dt and integrating both sides. You should find that P is an exponential function of t.

Then consider dP1/dt= kP1- 100 for t between 0 and 1. Looking for a constant soluton, P1= C, the derivative is 0 so we must have 0= kC- 100 of C= 100/k. Adding that to the exponential gives the general solution for 0< t< 1. To find the solution for t between 1 and 2, evaluate the first solution at t= 1 to get a condition so you can solve the same equation using that condition.

Yes, your solutions will be functions of k, not specific numbers.

3. Feb 6, 2013

### Colts

I got the exponential equation to be e^(kt)e^c

Now you said to add the C to the exponential. I'm assuming the C your talking about is not the same as the arbitrary constant that I get from integration. So do you want me to literally add it on or what?

4. Feb 6, 2013

### Dick

If you don't follow Hall's argument just take the straightforward approach and solve the differential equation on 0<=t<=1 using separation of variables. Use the initial condition P(0)=1000 to find the constant and figure out what P(1) is. Use that for an initial condition on 1<=t<=2.

5. Feb 6, 2013

### haruspex

Halls showed how to solve dP/dt= kP but you need to solve dP/dt = kP + M. Since the equation is linear, you can get the general solution you want by adding the solution you found to the homogeneous equation to any solution of the complete, inhomogeneous one. In this case, it's easy to see that one solution is P constant. Halls calls this constant C. So you write dP/dt = 0 and get C = -M/k. (Halls had M1 as an emigration rate of 100, so had the wrong sign.)
Putting this together, P = Aekt - M/k. Now you can plug in the initial conditions to find A.