# Solving differential equation

• Mar 25th 2009, 01:34 AM
Craka
Solving differential equation
Trying to solve this differential equation by separating variables. Where c is a constant and K is the carrying capacity. P is population

$\displaystyle \frac{{dP}}{{dt}} = c\ln \left( {\frac{K}{P}} \right)P$

I started with this

$\displaystyle \begin{array}{l} \frac{{dP}}{{dt}} = c\ln \left( {\frac{K}{P}} \right)P \\ dP = c\ln \left( {\frac{K}{P}} \right)P.dt \\ \frac{{dP}}{P} = c\left( {\ln (K) - \ln (P)} \right)dt \\ \end{array}$

than I'm not sure if I can do this.

$\displaystyle \begin{array}{l} \frac{{dP}}{P} - c\ln (P) = c\ln K.dt \\ \frac{1}{P} - c\ln (P)dp = c\ln K.dt \\ \end{array}$

and if it allowed than I'm lost at this point anyhow. I'm really not liking these, I seem lost in the process.
• Mar 25th 2009, 03:09 AM
chisigma
The equation can be written as...

$\displaystyle \frac{dp}{dt}= c\cdot p\cdot (\ln k - \ln p)$ (1)

Separing the variables we obtain...

$\displaystyle \frac {dp}{p\cdot (\ln k - \ln p)}= c\cdot dt$ (2)

... and integrating...

$\displaystyle \int \frac {dp}{p\cdot (\ln k - \ln p)} = -\ln (\ln k - \ln p) = c\cdot t + \ln a$ (3)

... where $\displaystyle a>0$ is a constant. From (3) with little more work...

$\displaystyle \ln \frac{k}{p}= a\cdot e^{- c\cdot t} \rightarrow p= k\cdot e^{-(a\cdot e^{-c\cdot t})}$ (4)

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$
• Mar 25th 2009, 11:52 PM
Craka
Hi I would you mind going through how you integrated the left hand side of the equation? ie the part $\displaystyle \int {\frac{1}{{P\ln \left( {\frac{K}{P}} \right)}}} dp$ I'm a little confused to what occurred there. Thanks in advance.
• Mar 26th 2009, 12:12 AM
chisigma
Setting $\displaystyle \ln \frac {k}{p}= \ln k - \ln p$ the integral becomes...

$\displaystyle \int \frac {dp}{p\cdot \ln \frac{k}{p}} = \int \frac {dp}{p\cdot (\ln k - \ln p)}$ (1)

Now if you take into account that...

$\displaystyle \frac {d}{dp} (\ln k -\ln p) = - \frac {1}{p}$ (2)

... the integral (1) is...

$\displaystyle \int \frac {dp}{p\cdot (\ln k - \ln p)} = -\ln (\ln k - \ln p) + a$ (3)

... where $\displaystyle a$ is an 'arbitrary constant'...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$
• Mar 26th 2009, 01:44 AM
Craka
Sorry, still a little confused, at equation (2).
$\displaystyle \frac {d}{dp} (\ln k -\ln p) = - \frac {1}{p}$
• Mar 26th 2009, 02:36 AM
chisigma
Since $\displaystyle \ln k$ doesn't depend from $\displaystyle p$ is...

$\displaystyle \frac {d}{dp} (\ln k - \ln p) = - \frac {d}{dp} \ln p= - \frac {1}{p}$

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$