This is a separable differential equation. This means we can completely separate dependent and independent variables into two expressions. General form if such equation is
and the solution is obtained by solving the following integrals
`int dy/g(y)=int f(x)dx+C`
Let us now return to the problem at hand.
Now we need to put everything containing `P` on the left and everything containing `t` to the right side.
Let us first simplify the expression on the left.
We shall write the term on the left using partial fractions to make integration easier.
We can now integrate the equation.
`int 10/P dP+int 10/(2000-P)dP=int dt`
`10ln P-10ln(2000-P)+10ln C=t`
In the line above we have written the constant term as `10ln C` in stead of just `C.` This is often used to make the expression easier to manipulate.
`ln P-ln(2000-P)+ln C=t/10`
Use formulae for logarithm of product and quotient:
`log_a (xy)=log_a x+log_a y`
`log_a(x/y)=log_a x-log_a y`
We can now calculate `C` by using the initial value.
Since `e^0=1,` we have
The solution to the initial value problem is
We can now calculate population when `t=20.`
Population is approximately `560` at time `t=20.`
To find when the population reaches 1200, we need to solve the following equation
Multiply by the denominator.
The population will reach 1200 at time `t=33.499.`