1. ## Assignment: Differential Equation

I have this one question for my Mathematical Modelling unit Assignment 1 which I have been stuck on for hour 8+ hours (deadly serious 0.0).

dP/dt = (1/2)*P(4-P)) P(0) = 2

I try solving it as a separable DE and I get to;

P/(4-P) = A*e^(2t) (Starting to think that this part might be wrong too -.-)

From this point I have tried everything I know to try and solve for P(t)

I REALLYYYYYYY need some help with this one.

2. ## Re: Assignment: Differential Equation

\displaystyle \begin{align*} \\ \\ \frac{P}{4 - P}\ &=\ \frac{P - 4 + 4}{4 - P} \\ \\ &=\ \frac{4 - (4 - P)}{4 - P} \\ \\ &=\ \frac{4}{4 - P} - 1 \end{align*}

3. ## Re: Assignment: Differential Equation

Hello, stripe501!

$\frac{dP}{dt} \:=\:\tfrac{1}{2}P(4-P) \qquad P(0) = 2$

We have: . $\frac{dP}{dt} \:=\:-\tfrac{1}{2}P(P-4)$

Separate variables: . $\frac{dP}{P(P-4)} \:=\:-\tfrac{1}{2}\,dt$

Partial fractions: . $\tfrac{1}{4}\left[\frac{1}{P-4} - \frac{1}{P}\right]dP \:=\:-\tfrac{1}{2}\,dt$

Integrate: . $\tfrac{1}{4}\int\left(\frac{1}{P-4} - \frac{1}{P}\right)\,dP \:=\:-\tfrac{1}{2}\int dt$

. . . . . . . . . $\tfrac{1}{4}\bigg(\ln|P-4| - \ln|P|\bigg) \:=\:-\tfrac{1}{2}t + c_1$

Multiply by 4: . . $\ln|P-4| - \ln|P| \:=\:-2t + c_2$

. . . . . . . . . . . . . . . . . $\ln\left|\frac{P-4}{P}\right| \:=\:-2t + c_2$

Exponentiate: . . . . . . . . . $\frac{P-4}{P} \:=\:e^{-2t+c_2} \:=\:e^{-2t}\cdot e^{c_2}$

. . . . . . . . . . . . . . . . . . . $\frac{P-4}{P} \:=\:Ce^{-2t}$

. . . . . . . . . . . . . . . . . . . $P - 4 \:=\:CPe^{-2t}$

. . . . . . . . . . . . . . . . $P - CPe^{-2t} \:=\:4$

. . . . . . . . . . . . . . . $P(1 - Ce^{-2t}) \:=\:4$

. . . . . . . . . . . . . . . . . . . . . . $P \:=\:\frac{4}{1-Ce^{-2t}}$ .[1]

We are given: $P(0) = 2$ . . . when $t = 0,\:P = 2$

. . $2 \:=\:\frac{4}{1-Ce^0} \quad\Rightarrow\quad 2 \:=\:\frac{4}{1-C} \quad\Rightarrow\quad 2 - 2C \:=\:4$

. . $-2C \:=\:2 \quad\Rightarrow\quad C \:=\:-1$

Substitute into [1]: . $\boxed{P \;=\;\frac{4}{1 + e^{-2t}}}$

4. ## Re: Assignment: Differential Equation

Thanks so much , you made a few mistakes in the working but that part that I was stuck on had the same method to solve. I got the answer to be P= 4e^(2t)/(1+e^(2t)). Thanks for your help!