# Obtaining solutions of differential equation with inital conditions.

I believe my question is relatively easy but I'm not sure why I can't comprehend the concept anymore.

Given the equation, which models the population:

$\frac{dN}{dt}=cN(N-k)(1-N)$,

Obtain the solution of the differential equation with inital condition $N(0)=2$, assuming parameters $c=1$ and $k=\frac{1}{2}$.

So just inputting the parameters our equation becomes:

$\frac{dN}{dt}= N(N-\frac{1}{2})(1-N)$, $N(0)=2$.

So my first thought was separable equation but the differential with respect to $t$ is confusing me.

Is it the right method to turn it in to:

$\frac{1}{N(N-\frac{1}{2})(1-N)} dN = 1 dt$ and then continue on wards.

Or am I supposed to be getting the following:

$N(N-\frac{1}{2})(1-N) dt = 1 dN$

My instinct tells me it must be the first method but then I have no idea how I could integrate that function.

Any help/hints would be appreciated.

EDIT WITH FULL PERSONAL ATTEMPT

My personal attempt was as follows: $\int\frac{1}{N(N-\frac{1}{2})(1-N)} dN =\int 1 dt$

Taking partial fractions of the left side we get:

$-\int \frac{2}{N} dN + \int \frac{8}{2N-1}dN-\int\frac{2}{N-1} dN = \int 1dt$

This then leads us to: $-2ln\lvert N\rvert +4ln\lvert 2N-1\rvert-2ln\lvert N-1\rvert = t + C$

And after taking the initial condition $N(0)=2$ we find $C = 3$ hence the final equation should be as follows:

$-2ln\lvert N\rvert +4ln\lvert 2N-1\rvert-2ln\lvert N-1\rvert -3 = t$

However the question gave a hint regarding finding a quartic equation for $N$ which I did not find with my method so this leads me to believe there is an error of some sort with my method.

• How did you obtain $\dfrac{dN}{dt}= N(N-\frac{1}{2})(1-N)$. – Nosrati Feb 22 '17 at 12:40
• @MyGlasses just using the parameters given of $c=1, k=\frac{1}{2}$ – Evan Feb 22 '17 at 12:44
• hahaha. You changed the equation! – Nosrati Feb 22 '17 at 12:46
• Just one n -> N :) – Evan Feb 22 '17 at 12:49
• Well. Separate fractions in $\dfrac{1}{N(N-\frac{1}{2})(1-N)} dN = 1 dt$ – Nosrati Feb 22 '17 at 12:50

Well, this is a separable equation:

$$\mathscr{N}'\left(t\right)=\text{c}\cdot\left(\mathscr{N}\left(t\right)-\text{k}\right)\cdot\left(1-\mathscr{N}\left(t\right)\right)\space\Longleftrightarrow$$ $$-\int\frac{\mathscr{N}'\left(t\right)}{\mathscr{N}\left(t\right)\cdot\left(\mathscr{N}\left(t\right)-1\right)\cdot\left(\mathscr{N}\left(t\right)-\text{k}\right)}\space\text{d}t=\int\text{c}\space\text{d}t\tag1$$

Now, we can use:

• Substitute $\text{u}=\mathscr{N}\left(t\right)$: $$-\int\frac{\mathscr{N}'\left(t\right)}{\mathscr{N}\left(t\right)\cdot\left(\mathscr{N}\left(t\right)-1\right)\cdot\left(\mathscr{N}\left(t\right)-\text{k}\right)}\space\text{d}t=-\int\frac{1}{\text{u}\cdot\left(\text{u}-1\right)\cdot\left(\text{u}-\text{k}\right)}\space\text{d}\text{u}\tag2$$
• $$\int\text{c}\space\text{d}t=\text{c}\int1\space\text{d}t=\text{c}\cdot t+\text{K}=\text{K}+\text{c}t\tag3$$

Now, for the $\text{u}$ integral, use partial fractions:

$$\frac{1}{\text{u}\cdot\left(\text{u}-1\right)\cdot\left(\text{u}-\text{k}\right)}=\frac{1}{\text{k}\cdot\text{u}\cdot\left(\text{k}-1\right)-\text{k}^2\cdot\left(\text{k}-1\right)}+\frac{1}{\text{k}-\text{u}\cdot\left(\text{k}-1\right)-1}+\frac{1}{\text{k}\cdot\text{u}}\tag4$$

• Nice answer, but why the fancy $N$? – Bobson Dugnutt Feb 24 '17 at 13:23