# Build logistic differential equation for given data

1. Feb 17, 2008

### killer2008

I would like to build a logistic differential equation for US oil production from the given data above.
dP/dt = k(1-P/N)P

I tried many different models but nothing came close to the given data.

Any help and suggestion?

2. Feb 17, 2008

### John Creighto

Why should it be logistic?

3. Feb 18, 2008

### killer2008

This is a project from the textbook, there are many requirements (answering about 12 questions) and one of them is the equation must be logistic.

4. Feb 18, 2008

### coomast

I think you will have to model the resulting function with the data using a least squares fitting. This equation is:

$$P(t)=\frac{N\cdot P_0 \cdot e^{kt}}{N+P_0\cdot \left(e^{kt}-1\right)}$$

It's very late over here, I will have a look at it tomorrow, it might be that it is non-linear and then I have to adapt my program to do this.

5. Feb 18, 2008

### John Creighto

If the above equation is correct, linear least squares while suffice. Just cross multiply:

$$P(t)(N+P_0\cdot \left(e^{kt}-1\right))=N\cdot P_0 \cdot e^{kt}$$

Then rearrange:

$$P(t)P_0\cdot \left(e^{kt}-1\right)=N (P_0 \cdot e^{kt} - P(t))$$

$$P_0$$ is the initial production level and use least squares to solve for N. I'm still not convinced oil production should be logistic. The only reason it should be logistic is because the production is driven by the demand which is driven by the population.

Last edited: Feb 18, 2008
6. Feb 19, 2008

### coomast

You need some code to do this least squares fitting in case one wants to calculate N, P0 and k at the same time. When this is done you will end up with N=14.9395; P0=0.23349 and k=0.102758 for the US and N=116.435; P0=0.04219 and k=0.12401 for the world production. This in case the time is considered the center of the intervals as is usually done in statistics. I used my own code for this, however I assume that this must be possible in some other mathematical package available. I can't help you in this though. One final remark is the following, I'm not giving any advice on whether this is a good curve for describing the data, this is something you need to do yourself. Other curves or equations might be more suitable. If you look at the one for the US, it is strange data, it's going down. Interpret this very carefully.