[[ Check out my Wordpress blog Context/Earth for environmental and energy topics tied together in a semantic web framework ]]

Saturday, November 12, 2005

Derivation of the Logistic Function

I do not agree with the use of the logistic function to model Hubbert's peak oil curve. And I do not make this assertion out of some contrary empirical evidence, but rather from an understanding of how it got derived. So using the classical premise -- to vanquish your adversary, you have to understand him -- the following chalktalk provides some valuable ammunition via a quick rundown of the logistic curves derivation.

First off, the variations of the logistic curve go by a variety of names, such as the sigmoid function and solutions to the Verhulst equation, differing by the number of parameters and whether they pass through integration or differentiation phases. By most accounts, you generate the classical Hubbert curve by taking the derivative of the logistic function.

To derive this curve, we set up a relation representing population1 growth (p) as a function of time (t):
dp/dt = r*p*(1-p)
If we can solve in closed-form for p(t) and then take the derivative, we ostensibly get the Hubbert curve. (The derivation can get a bit more complicated if we add additional constant factors, but that comes out in the wash in any case).

To solve, we convert the above equation into a differential that we can integrate from time t=0 to T:
dp/(p(1-p)) = r*dt
This gets factored as such:
dp/p - dp/(1-p) = r*dt
The indefinite integral of this involves the natural logarithm:
ln(p) - ln (1-p) = r*t
ln(p/(1-p)) = r*t
To make it definite, we put in the integration limits from t=0 to t=T, and p=P0 to p=P.This results in:
ln(P/(1-P)) - ln(P0/(1-P0)) = r*T
ln(P(1-P0)/(P0(1-P))) = r*T
Converting this into the exponential, one gets:
P/(1-P) = P0/(1-P0) * er*T
After a substitution of K=P0/(1-P0), we get this function:
p(T) = k/(k+e-r*T)
The derivative of this gives:
dP/dt = k*r*e-r*T/(k+e-r*T)2


Note that the time progression or profile of the curve gets set by the value of p(0), which gets buried in the k term. This fact has important implications. That an initial condition can determine the shape of the curve puts it in the class of chaotic systems. Run this applet or this one if you want to get a feel for how this function evolves. Linear systems such as the oil shock model that I proposed previously do not suffer from this property.

Even more important than the chaotic property, the input stimulus of oil discoveries do not play into the logistic function formulation. If this stimulus in fact got added to the initial equation with something similar to the following delta function:
dp/dt = delta(t) + r*p*(1-p)
it would become impossible to solve in the same closed form as I have outlined above. In reality, only numerical techniques can solve this transcendental formulation. And even beyond that, we can drop one last monkeywrench into the works. As everyone who has studied chaotic systems understands, the most minor stimulus can have huge implications on how a system evolves.

Look up what happens when a "butterfly flaps its wings in China" and you can get the picture. My brain hurts just thinking about the possible effects of a Hubbert Butterfly Effect and I would dread even attempting to go down this path.


1 Why and how oil extraction follows a population growth model frankly puzzles me. Oil molecules do not fit into any predator/prey or birth/death models that have crossed my path. I choose to ignore the flaw in this basic premise to concentrate on the mathematical derivation beyond this point.

6 Comments:

Professor Anonymous Anonymous said...

Nice maths, but I beg to differ that this is a chaotic function. The time of the inflection may be highly sensitive to small values of p(0), but that sensitivity can be expressed. I also disagree that discoveries are not modeled; the (1-p) term could be seen to reflect the decreasing probability of discovery with depletion. Also, though using the delta function is not really appropriate in a continuous model, there is a closed form solution when adding a reduced delta function; there’s just an instantaneous jump in p by the integral of the delta function and p continues from that value on the course were there no delta function.

10:27 AM  
Professor Blogger WHT said...

Unfortunately the (1-P) term does the depletion, not the discovery part. Discoveries in fact have to be modeled by something else.

10:23 PM  
Professor Anonymous David said...

A minor error in the derivation. You factor the ratio as follows:

1/(p(1-p)) = 1/p + 1/(1-p)

Integrating 1/(1-p) results in -ln(1-p), which is where the minus sign comes from.

3:11 AM  
Professor Blogger WHT said...

thanks, it looks like I have two errors that cancel each other out.

8:04 PM  
Professor Anonymous Anonymous said...

Hello. This post is likeable, and your blog is very interesting,

I hope you enjoy. The address is http://container-ship.blogspot.com

7:03 PM  
Professor Anonymous Hazardous Materials said...

A minor error in the derivation.

2:25 AM  

Post a Comment

<< Home


"Like strange bulldogs sniffing each other's butts, you could sense wariness from both sides"