3

Solve the initial value problem

$$\frac{dP}{dt}=P \left( 1-\frac{P}{K} \right)$$

With $P(0)=P_0$

(Here, $K$ and $P_1 $are real constants).

My attempt:

Now to answer this question I did separation of variables and ended up getting: (note I also did partial fractions to simplify the initially attained integral).

$$\int\frac{1}{P}+\frac{1}{K-P}\,dp = \int 1 \, dt$$

$$\ln \lvert P \rvert - \ln\lvert K - P \rvert = t + c$$

Then at this conditions I found:

$$c = \ln \lvert P_0 \rvert - \ln \lvert k - P_0 \rvert$$

Giving:

$$\ln \lvert P \rvert - \ln\lvert K - P \rvert = t + \ln \lvert P_0 \rvert - \ln \lvert k - P_0 \rvert$$

Can someone validate this? Or perhaps knows an alternative method?

Can someone check my given answer?

user2250537
  • 1,101
  • You should probably make your answer posted below into a part of the question above. $\qquad$ – Michael Hardy Apr 28 '16 at 16:36
  • Good idea. Ive done that, do you know if my answer is correct though? – user2250537 Apr 28 '16 at 16:38
  • It looks like you are missing a $1/K$ factor in the $t$ integral. Other than that, it looks good, just continue solving for $P$. Lookup the logistic equation to check your final answer. – jdods Apr 28 '16 at 16:40
  • Why would there be a $1/K$ factor in the $t$ integral? – user2250537 Apr 28 '16 at 16:41
  • Your first step, you have multiplied by $K$ in the denominator but not the numerator: $1/(1-P/K)=K/(K-P)$. See the solution below. – jdods Apr 28 '16 at 16:45

1 Answers1

1

Separation of variables yields $$ dt = \frac{dP}{P\left(1- \frac P K \right)}. $$

Then use partial fractions: $$ \frac{dP}{P\left(1- \frac P K \right)} = \frac{K\,dP}{P(K-P)} = \left( \frac 1 P + \frac 1 {K-P} \right) \, dP $$ Adding the two fractions on the right above, using $P(K-P)$ as a common denominator, gives you $(K-P)+P$ in the numerator, which is what you need to make it add up to the fraction in the middle.

Now you have $$ dt = \left( \frac 1 P + \frac 1 {K-P} \right) \, dP. $$ Integrating both sides you get $$ t + \text{constant} = \ln P - \ln(K-P). $$ This becomes $$ t + \text{constant} = \ln \left|\frac P {K-P} \right| $$ $$ e^{t+\text{constant}} = e^t \times \text{positive constant} = \left|\frac P {K-P} \right| $$ $$ e^t\times\text{constant} = \frac P {K-P} $$ $$ Ce^t (K-P) = P $$ $$ KCe^t - CPe^t = P $$ $$ KCe^t = P + CPe^t $$ $$ KCe^t = P(1 + Ce^t) $$ $$ \frac{KCe^t}{1+Ce^t} = P $$