# Diff.equation homework

1. Nov 8, 2005

### TSN79

The following diff.equation determines the number of people with a spesific illness:
$$\frac{{dx}}{{dt}} = k\left( {150000 - x\left( t \right)} \right)$$
At t=0, 30000 people are infected, and at t=15, 60000. How long will it take for 120000 are infected? Here is my work:
$$\begin{array}{l} x\left( t \right) = 30000 \cdot e^{k \cdot t} \\ x\left( {15} \right) = 30000 \cdot e^{k \cdot 15} = 60000 \\ \Rightarrow k = 0,046 \\ x\left( t \right) = 30000 \cdot e^{0,046 \cdot t} = 120000 \\ \end{array}$$
Problem is that this leads to no good, the answer is supposed to be about t=72 (days), but I'm not sure how to implement the 150000 in the beginning (at least I think that's the prob)...anyone?

2. Nov 8, 2005

### qbert

dx/dt = k*(p - x) has solutions of the form x = Aexp(-kt) + p,
not just x = A*exp(-k*t).

3. Nov 8, 2005

### TD

Solving your DE will give an extra constant and you already had the constant k. You can determine the values of these two constants with x(0) = 30000 and x(15) = 60000. Are you sure of your solution of the DE?

4. Nov 8, 2005

### TSN79

You mean am I sure it's supposed to be 72? That's just what it says in the back of the book that's all...
I just want to know where in my attempt I turned wrong...

5. Nov 8, 2005

### TD

No, I'm talking about the solution of the differential equation.

6. Nov 11, 2005

### TSN79

No, I'm not at all sure about my solution becasue I'm not taking the 150000 into effect since I don't know where or how to do so. How would you go about solving it?

7. Nov 11, 2005

### saltydog

TSN, as Qbert stated, the solution to the DE is:

$$x(t)=Ae^{-kt}+150000$$

right?

You arrange it into the form:

$$x^{'}+kx=150000k$$

obtain an integrating factor, integrate, done deal.

So you have two unknowns in the solution above, k and A, but you have two conditions:

x(0)=30000

x(15)=60000

Substituting the first condition into the equation yields:

$$30000=Ae^{-0k}+150000$$

you can solve for A right?

now that you have A, substitute the second condition:

$$60000=Ae^{-15k}+150000$$

That allows you to find k then. You know, rearrange, take the ln of both sides, solve for k.

Then once you have these values, you can easily solve for what t yields 120000:

$$120000=Ae^{-kt}+150000$$

I bet you can do this.