# Assignment: Differential Equation

• Aug 18th 2012, 08:19 AM
stripe501
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.
• Aug 18th 2012, 11:58 AM
tom@ballooncalculus
Re: Assignment: Differential Equation
\displaystyle \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*}
• Aug 18th 2012, 03:32 PM
Soroban
Re: Assignment: Differential Equation
Hello, stripe501!

Quote:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Substitute into [1]: .$\displaystyle \boxed{P \;=\;\frac{4}{1 + e^{-2t}}}$
• Aug 18th 2012, 06:46 PM
stripe501
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!