Faculty of Economics Optimization Lecture 5 Marco Haan April 4, 2005 This week: integration • • • • • • Indefinite integral. Riemann (definite) integral. Some properties. Improper integrals. Techniques of integration. Economic applications. – Producer surplus. – Consumer surplus. – Discounting. • Probability theory. 2 Integration (or: anti-differentiation) ... is just the opposite of differentiation. If f(x) = dF(x)/dx, then f ( x)dx F ( x) C , with C the constant of integration. f(x) is the integrand. We also write: f ( x)dx dF ( x) 3 How to determine the area below a curve We first need a partition over an interval. A partion for the interval [a,b] is a set of subintervals [ x0 , x1 ], [ x1 , x2 ], [ x2 , x3 ], ... , [ xn1, xn ] with a x0 x1 x2 ... xn b The length of each subinterval is i xi xi 1. 4 Riemann sum Consider a partition. Let i [ xi 1 , xi ] be an arbitrary set of points from the set of subintervals. Then a Riemann sum for the function f(x) over the interval [a,b] is given by n n S f (i )( xi xi 1 ) f (i ) i i 1 i 1 5 x0 x1 x2 x3 6 Lower and upper sums Define ωi as the ωi with the lowest f(ωi) in the relevant interval. Define ωi as the ωi with the highest f(ωi) in the relevant interval. We then have the lower sum and the upper sum defined as n S min f ( i ) i i 1 n S max f ( i ) i i 1 7 Smin x0 x1 x2 x3 8 Smax x0 x1 x2 x3 Note that Smin is always an underestimate of the area below a curve, whereas Smax is always an overestimate of the area below a curve. 9 Definition 16.3 A function is said to be integrable on the closed interval [a,b] if for every ε > 0, there is some value δ > 0 such that n f ( ) i i 1 i L , for any partition on [a,b] such that max Δ < δ, and for any selection of points ωi. We call this value the definite integral of f(x) over [a,b] and write b f ( x)dx L. a Thus, we can always get the Riemann sum sufficiently close to the value L by chosing a sufficiently fine partition. 10 Theorem 16.1 (Fundamental theorem of integral calculus) If the function f(x) is continuous on the closed interval [a,b] and if F(x) is any indefinite integral of f(x), then b f ( x)dx F (b) F (a). a Thus: • By definition, integrating is the opposite of differentiating. • We can then show that the area under a curve is a definite integral. Also note: the integration constant drops out. 11 Theorem 16.2 If f is a continuous function on the closed interval [a,b], then for any x in [a,b], the function x F ( x) f (t )dt a is an antiderivative of f; that is, F’(x) = f(x). Also here, the integration constant drops out. 12 Example A firm starts out with capital 500 and plans net investment at a rate I(t) = 6t2 over the next ten years. What is the planned capital stock 10 years from now? 10 10 0 0 K (10) K (0) I (t )dt 500 (6t 2 )dt 3 10 500 2t 2500 0 The rate of increase at t = 10 is: K '(t ) 6t 2 K '(10) 600 13 Some useful properties 1. With a b c, c b c a a b f ( x)dx f ( x)dx f ( x)dx a 2. c f ( x)dx lim f ( x)dx 0. c a a 3. a a c c a f ( x)dx f ( x)dx. 14 Economic applications In your first-year micro, producer surplus was defined as the area below price, above marginal costs MC Consumer surplus was defined as the area above price, below the demand curve D. 15 Definition 16.4 Producer surplus Let MC(q) be a continuous marginal-cost function of a firm producing q, and let p = p0 be the price of the product. If q = q0 is the profit-maximizing output level for this firm, then its producer surplus is q0 PS p0 q0 MC (q)dq. 0 16 $ MC p0 q0 q 17 Definition 16.5 Consumer surplus Let p = D-1(q) be a continuous, inverse-demand function for some consumer, and let p = p0 be the price of the good purchased. If q = q0 is the corresponding amount purchased, the consumer surplus from the availability of this good is q0 CS D 1 (q)dq p0 q0 0 18 $ D-1(q) p0 q0 q 19 Example For a consumer with demand q = 50 - 2p, find 1. CS at price p0 = 20 2. CS at price p1 = 15 3. The change from a price change from p = 20 to p = 15. First determine the inverse demand function: p = 25 - q/2. At p = 20, we have q = 10. The consumer surplus thus equals 10 CS (10) (25 q / 2)dq 20(10) 25. 0 20 Example For a consumer with demand q = 50 - 2p, find 1. CS at price p0 = 20 2. CS at price p1 = 15 3. The change from a price change from p = 20 to p = 15. At p = 15, we have q = 20. The consumer surplus thus equals 20 CS (20) (25 q / 2)dq 20(10) 100. 0 21 Example For a consumer with demand q = 50 - 2p, find 1. CS at price p0 = 20 2. CS at price p1 = 15 3. The change from a price change from p = 20 to p = 15. The change in consumer surplus is 100 - 25 = 75. Alternatively: 20 20 15 10 CS D( p)dp (50 2 p)dp 75. 22 $ D-1(q) p1 p0 q 23 Improper integrals c f ( x)dx lim c f ( x)dx a c a c f ( x)dx lim a f ( x)dx a 0 c a 0 f ( x)dx lim a f ( x)dx lim c f ( x) dx In all cases, provided that these integrals exist. 24 Example For the demand function q = 50p-2, find the consumer surplus if p = 10. p0 10 10 CS 50 p 2 dp lim p0 50 p 2 dp lim p0 50[ p01 101 ] 5. Note: this not possible for e.g. the demand function q = 50p-1. 25 Application: continuous discounting If a series of payments of $b per year are made at the end of each year indefinitely, then the present value of this stream is T limT be rt t 1 If the annual payments are spread out over the year, the present value is T rt e b rt limT be dt limT b . r 0 r 0 T 26 Integration by substitution b Consider 2 x 1 x 2 3 3 dx a Let t = 1 - x3. Then dt = -3x2dx, so x2dx = (-1/3)dt. We can thus write: b 2 3 3 1 x a 1b3 1b3 2/3 5/ 3 t t 2 x dx 3 3 dt 5 3 1 a 1 a 27 Integration by substitution Formally, we can write g (v) g (u ) v f ( x)dx f g (t ) g '(t )dt u provided that g’(t) does not change sign on the relevant interval. 28 Integration by parts d Note that f ( x) g ( x) f '( x) g ( x) f ( x) g '( x) dx This implies b b f '( x) g ( x)dx f ( x) g ( x) f ( x) g '( x)dx. b a a a Example b b 2 2 1 a 2 x ln( x)dx x ln( x) a a x x dx b 29 Application: Probability distributions • Suppose that all students in the course Optimization obtain a grade that lies between 0 and 10. • Define the cumulative distribution function F(x) as the fraction with grade equal to or below x. • Alternatively, F(x) is the probability that a student picked at random has a grade equal to or below x: F(x) = Pr(grade < x) • Obviously, F(0) = 0 and F(10) = 1. • The probability density function is given by f(x) = F’(x). • Fraction of students that pass: 10 f ( x)dx F (10) F (5.5). 5.5 30 • As an example, suppose we have a uniform distribution, i.e. all grades are equally likely. • In that case, F(x) = x/10, and f(x) = 1/10. • What is the average grade? Normally, we take the number of students with grade x, multiply that by x, sum these numbers and divide the sum by the total number of grades. • In the continuous case, this boils down to: 10 10 xf ( x)dx ( x /10)dx x 0 2 10 / 20 5. 0 0 31 • Among all students that pass, the average grade is, using Bayes’ rule: 10 10 5.5 10 5.5 10 xf ( x)dx 5.5 f ( x)dx ( x /10)dx 7.75 (1/10)dx 5.5 32 • Suppose that for some reason, we want to know the average of the square of all grades. 10 x 10 2 f ( x)dx ( x /10)dx x / 30 33.33. 0 2 3 10 0 0 • Variance: 10 10 10 10 0 0 10 0 0 2 2 2 ( x ) f ( x ) dx x f ( x ) dx f ( x)dx 2 xf ( x)dx x 2 f ( x)dx 2 33 25 8 0 33 Application: income distributions. • Suppose that in a country, all incomes are between 0 and 1. • The distribution is given by F(x) = √x. 1 1 34 • Average income: 1 1 xf ( x)dx x 0 xdx 0.4 0 • Median income is the income xm such that F(xm) = 0.5 xm 1/ 2, so xm 0.25 35 Exercises pg. 732: 1,3 pg. 742: 3 pg. 747: 3. Calculate the average grade, the fraction of students passing, the average grade of those who pass, and the average grade of those who do not pass and the variance if the distribution of grades is given by F(x) = (x/10)1/3 36