Technical Appendix

Main Menu Previous Topic Next Topic

**Integration Bounds**

In the previous slide, we introduce the basic method of integration used throughout this tutorial. This method is very primitive. It works to integrate a function f(x) on an interval [a, b] if and only if a and b are finite numbers, and f(x) is defined and continuous everywhere on [a, b]. When this is not the case, we have to trim the domain somewhat to get an approximation to the integral.

When dealing with demand curves, we typically calculate integrals of user-defined functions between 0 and ∞. We assume that the demand function is monotonically decreasing and defined for all values greater than 0. We also assume that that the integral of the function from 0 to ∞ converges to a finite value, which corresponds to a finite invention value.

The only domains on which we need to compute the demand function integrals are

1. [0, p]

2. [p, ∞]

3. [0, ∞],

where p is the fixed positive price set by the inventor.

Because of the limitations inherent in our simple Simpson's Rule method, we cannot integrate over the entire domains 1, 2, and 3. Instead, we have to reduce them somewhat as follows:

1. [0, p] becomes [xMin, p]

2. [p, ∞] becomes [p, xMax]

3. [0, ∞] becomes [xMin, xMax]

Where xMin is a very small positive number. xMax is some positive number chosen so that

[ demand( xMax ) < minDemand ] or [ demand( xMax ) - demand( xMax - 0.001 ) < minChangeDemand ],

where minDemand and minChangeDemand are also some small positive numbers.

The integrals over the modified domains should be close to the integrals over the original domains for most "nice"
functions. 0 is replaced with xMin to account for a possibility that demand( p ) is undefined at p = 0. ∞ is
replaced with xMax because our `integral`

function cannot integrate to ∞, and since demand( p ) is
monotonically decreasing, it's very low after xMax anyway.

Previous Slide Next Slide