Download presentation
Presentation is loading. Please wait.
Published byRiikka Lahtinen Modified over 5 years ago
1
Prof. Dr. Halil İbrahim Karakaş Başkent University
TBF Generall Mathematics - II Lecture – 6 : Maxima-Minima of Functions of Several Variables Prof. Dr. Halil İbrahim Karakaş Başkent University
2
z z y y x x (a,b,f(a,b)) (a,b,f(a,b)) (0,0,0) (0,0,0) (a,b,0) (a,b,0)
Consider a function f defined by an equation of the form z = f(x,y) and a point (a,b) in the domain of f . If f(a,b) > f(x,y) for all (x,y) in a circular region around (a,b), then f(a,b) is called a local maximum value of f. Local minimumm value is defined similarly. z y x (a,b,f(a,b)) z y x (0,0,0) (a,b,f(a,b)) (0,0,0) (a,b,0) (a,b,0) Local Maximum Local Minimum
3
z y x (-2,0,6) (0,-2,6) (0,2,6) (2,0,6) (0,0,2) z = 2+ x2 + y2
Theorem. If f(a,b) is a local maximum or local minimum value of f and if the partial derivatives fx(a,b), fy (a,b) exist, then fx(a,b) = fy(a,b) = 0. Example. z = f(x,y) = 2 + x2 + y2 z y x (-2,0,6) f(0,0) = 2 is local minimum. fx(x,y) = 2x , fx(0,0) = 0 (0,-2,6) (0,2,6) (2,0,6) fy(x,y) = 2y , fy(0,0) = 0. z = 2+ x2 + y2 (0,0,2) A point (a,b) is called a critical points of f if fx(a,b) = fy(a,b) = 0 If (a,b) is a critical point of f and if f(a,b) is neither a local maximum nor a local minimum value of f , then (a,b) (or (a,b, f (a,b)) )is called a saddle point of f.
4
A = fxx(a,b), B = fxy(a,b), C = fyy(a,b).
Example. (0,0) is a saddle point of the function f defined by z = f(x,y) = x2 - y2. How to test whether a critical point gives rise to a local extremum value or a saddle point? Theorem(Second Derivative Test). Let f be a function of two variables and let (a,b) be a critical point of f such that fx(a,b) = fy(a,b) = 0. Assume also that all derivatives of second order of f exist at every point in a circular region around (a,b). Define A = fxx(a,b), B = fxy(a,b), C = fyy(a,b). a) If AC - B2 > 0 and A < 0, then f(a,b) is a local maximum value of f, b) If AC - B2 > 0 and A > 0, then f(a,b) is a local minimum value of f, c) If AC - B2 < 0, then (a,b) is a saddle point of f, d) If AC - B2 = 0, then the test fails.
5
Example. z = f(x,y) = 2 + x2 + y2 fx(x,y) = 2x = 0 x = 0 (0,0) critical point. fy(x,y) = 2y = 0 y = 0 f(0,0) = 2 local minimum.
6
Example. z = f(x,y) = - x2 - y2 + 6x + 8y -21
fx(x,y) = -2x + 6 = 0 x = 3 (3,4) critical point. fy(x,y) = -2y + 8 = 0 y = 4 f(3,4) = 4 local maximum.
7
saddle point Example. z = f(x,y) = x3 + y3 – x - y saddle point
local maximum
8
Example. z = f(x,y) = x3 + y2 – 6 xy
(0,0) is a saddle point.
9
Now, our problem is to find the minimum value of M = f(x,y).
An Example of a Real Life Problem. A company uses a rectangular box of volume 48 cm3 with no top and a partition just in the middle of its base, for one of its products. What should be the dimensions of such a box to minimize the amount of the material used to construct the box? The area of the material used should be minimum. z Let the dimensions of the box be x, y and z (see the figure on the right). Then the area of the material needed will be y M = xy + 3yz + 2xz. x Since the volume of the box is 48 cm3, 48 = xyz and thus z = 48/xy. So the area M can be considered as a function of two variables: M Now, our problem is to find the minimum value of M = f(x,y).
10
M M cm2 is the minimum value of M.
11
Example. A company produces two types of items: type A and type B
Example. A company produces two types of items: type A and type B. The cost and revenue functions are given (in million TL) as where x and y denote the number of items (in thousands ) of type A and type B produced in one year, respectively. How many items of each type should be produced a year to maximize the profit? What is the maximum profit? Solution. Profit function is (3,4) critical point It follows that P(3,4) = = 8 is the maximum value of P for x > 0 and y > 0. Maximum profit is obtained if 3 thousand items of type A and thousand items of type B are produced a year. Maximum profit is 8 million TL .
12
Example. Consider three positive real numbers x, y, z such that x + y + z =30. For what values of x, y and z the product x y z is maximum? Solution. Since x + y + z = 30, we have z = 30 - x - y. By the assumption, x > 0 , y > 0 and x + y < 30. The problem is to find the minimum value of Partial derivatives of first order give the system of equations Subtract the second equation from the first one: (10,10) critical point z =10 The first equation gives Hence f(10,10) = = 1000 is the maximum value of f for x > 0, y > 0 , z > 0 and x + y + z =30.
13
Method of Least Squares.
In everyday life, one collectss data concerning some objects or phenomenon and then tries to find an elementary function satisfied by the collected data. Most of the times there is no function exactly satisfied by the data; in that case one tries to find an elementary function which best fits the set of data points. The process of fitting an elementary function to a set of data points is called regression analysis. Suppose that as a result of some measurements or observations, the data points (xi , yi) are obtained for each i = 1, 2, , n. Regression analysis is the process of finding a function f such that (xi , yi) lies very close to the gragh of f for each i = 1, 2, , n. The situation here can be dramatized as follows. It is believed that the points are supposed to be on the graph of a function f ; that is, we should have had yi = f (xi ) for each i = 1, 2, , n, but the equality is not satisfied due to some error in measurements or recording. For this reason, yi is considered as an approximation for f (xi ) for a certain type of function f and regression analysis is done to determine f for which the error in that approximation is minimum. The function f is assumed to depend on certain parameters. By regression analysis, these parameters are determined to minimize the error. For example, The function f may be linear, y = f (x) = mx + b; quadratic, y = f (x) = ax2 + bx + c; or exponential, y = ekx, where a , b , c , m , k ℝ.
14
One of the techniques used for regression analysis is the method of least squares.
Method of least squares is used to find relations between several varibles in many fields suc as medicine, finance, engineering, agriculture, biology and sociology. Here we will use the method of least squares to find a linear function, i.e., the equation of a line that is the best approximation to a set of data points. This is called linear regression and the line found is called the least square line or the regression line. y x yi - f (xi ) f (xi ) yi error : |yi - f (xi )|
15
Example. A producer wants to approximate the cost function for an item produced. The cost of the product has been recorded for certain levels of production, as in the following table, where y denotes the the total cost (in thousand TL) when x hundred items are produced. x y x y 3 6 8 7 9 10 y=mx+b The table above gives us four data points (x,y) in the plane: (3,6) , (6,8) , (7,9) and (10,10). These points do not all lie on a line but they are very close to being linear ( see the figure above). We will use the method of least squares to approximate the cost function by a linear function. Namely, we will determine m and b in such a way that y=mx+b is, in some sense, the best approximation to the cost function.
16
x y y=mx+b x y mx+b y-mx-b(residual) 3 6 3m+b 6-3m-b 8 6m+b 8-6m-b 7 9 7m+b 9-7m-b 10 10m+b 10-10m-b To determine m and b in such a way that y=mx+b is the best approximation to the cost function, we calculate mx+b and find the difference y-mx-b, called the residual, for each x and thus extend the data table as above, on the right. The residual at (x,y) measures the distance between the points (x,y) and (x,mx+b) . In the method of least squares, if m and b are such that the sum of squares of the residuals is minimum, then the line given by y=mx+b is assumed to be the line which best fits the given data (i.e., regression line or the least square line).
17
The solution of which will be given on the next slide.
y mx+b y-mx-b(residual) 3 6 3m+b 6-3m-b 8 6m+b 8-6m-b 7 9 7m+b 9-7m-b 10 10m+b 10-10m-b The sum of squares of the residuals define a frunction of two variables: F(m,b)=(6-3m-b)2 + (8-6m-b)2 +(9-7m-b)2 +(10-10m-b)2 . We should find the values of m and b minimizing that function. We find the critical point: Fm(m,b)=2(6-3m-b)(-3)+2(8-6m-b)(-6)+2(9-7m-b)(-7) m-b (-10)=0 Fb(m,b)=2(6-3m-b)(-1)+2(8-6m-b)(-1)+2(9-7m-b)(-1) +2(10-10m-b)(-1)=0 These equations can be simplified to get the system of linear equations: The solution of which will be given on the next slide.
18
The second derivative test can be used to see that F(m,b) is minimum for the critical point (m, b) obtained as above: Fmm(m,b)=2(194)= A , Fmb(m,b) =2(26) = B , Fbb(m,b)=2(4) = C. AC- B2 = 16(194) -16(169) 0 F(0.58,4.48) minimum. Actually, it can be shown that F(m,b) is minimum for the critical point (m, b) obtained as above in any application but we will not go into the proof here. Regression Line : y=0.58x+4.48 The cost function: C (x)=0.58x+4.48 The producer can estimate now what his cost will be if he produces 4 hundred items: C (4)=(0.58)(4)+4.48 = = 6.8 (thousand TL)
19
Data points and the regression line of the previous problem are shown below:
x y x y 3 6 8 7 9 10 (7,9) (10.10) (6,8) (3,6) y=0.58x
20
Another application of the method of least squares.
Problem. A market research consultant for a supermarket chain chose a large city to test market brand of an item. After 5 months of varying the selling price and recording the monthly demand, the consultant arrived at the demand table given on the right, where x denotes the price (in TL) and y denotes the number of items (in thousands) purchased per month. x y 5.0 2 5.5 1.8 6 1.4 6.5 1.2 7.0 1.1 a) Use the method of least squares to find the price-demand function. b) If an item costs 4 TL, how sould it be priced to achieve a maximum monthly profit ? Solution. a) Let us calculate the residuals and expand the data table as follows. x 5 5.5 6 6.5 7 y 2 1.8 1.4 1.2 1.1 mx +b 5m + b 5.5m + b 6m + b 6.5m + b 7m+b y - mx - b 2 - 5m - b m - b 1.4- 6m - b m - b 1.1-7m-b The sum of the residuals gives: F(m,b)=(2-5m-b)2 + ( m-b)2 +(1.4-6m-b)2 + ( m-b)2 + (1.1-7m-b)2.
21
Partial derivatives Fm(m,b)=2(2-5m-b)(-5)+2( m-b)(-5.5)+2(1.4-6m-b)(-6)+ 2( m-b)(-6.5)+2(1.1-7m-b)(-7)=0, Fb (m,b)=2(2-5m-b)(-1)+2( m-b)(-1)+2(1.4-6m-b)(-1)+ 2( m-b)(-1)+2(1.1-7m-b)(-1)=0, Simplifying these equations, we get Adding -6 times the second equation to the first equation And substituting this value of m in the second equation The unique solution is m = -048, b = We know that F(m,b) is minimum for these values of m and b. Hence the price-demand function is given by .
22
b) If an item costs 4 TL , supposing there is no other cost, the total cost is given by
The total revenue is Thus the profit function is Profit is maximum if The price should be for maximum profit.
23
Lagrange’s Multipliers
Lagrange’s Multipliers. We will now introduce a very powerful method of solving a certain class of maxima-minima problems. The method is due to a famous eighteenth century French mathematician, Josef Luis Lagrange( ). We will explain this method through an example. Problem. A farmer wants to construct a fence to enclose a rectangular area in front of a long wall, using part of the wall as one side of the rectangle (see the figure on the right). The farmer has bought 240 meters of fencing material for this purpose. Find the dimensions of the rectangle so that the enclosed area will be maximum. What is the maxiimum area? 240 m.
24
For the solution, let the length of the side of the rectangle that is perpendicular to the wall be denoted by x and and the length of the side parallel to the wall be denoted by y ( see the figure). y x Then the area enclosed is z = f (x,y) = xy ; the fencing material used is x + 2y = 240 m. This is a restriction on x and y, called a constraint. Thus the problem can be formulated as follows: Maximize z = f (x,y) = xy subject to the constraint g (x,y) = x + 2y – 240 = 0. This problem is a special case of a general class of problems of the form Maximize (or minimize) z = f (x,y) = xy subject to the constraint g (x,y) = 0. Such problems are solved by the method of Lagrange’s multipliers.
25
Lagrange’s multiplier
Problem. Maximize z = f (x,y) = xy subject to the cunstraint g (x,y) = x + 2y = 0. For the solution, we define Lagrange’s Function Lagrange’s multiplier Theorem(Lagrange). If f (a,b) is a local maximum or minimum value of z = f (x,y) under the constraint g (x,y) = 0, then (a,b,) satisfies provided all partial derivatives exist. For our sample problem,
26
Problem. Minimize z = f (x,y) = x2 + y2 subject to the constraint x + y = 10.
g (x,y) = x + y - 10 = 0 The minimum value of f subject to the constraint x + y = is f (5,5) = 50. Observe that for any (x,y) with x + y = 10 , other than (5,5) , we have f (x,y) > f (5,5) = 50.
27
z y x z = x2 + y2 (5,5,50) (0,0,0) x+ y = 10 (5,5,0)
28
Problem. Maximize z = f (x,y) = 25 - x2 - y2 subject to the constraint x + y = 4.
g (x,y) = x + y - 4 = 0 The maximum value of f subject to the constraint x + y = 4 is f (2,2) = 17. Observe that for any (x,y) with x + y = 4 , other than (2,2) , we have f (x,y) < f (2,2) = 17.
29
z y x (0,0,25) (2,2,17) z = 25 - x2 - y2 (0,0,0) (2,2,0) x+ y = 4
30
Problem. The Cobb-Douglass production function for a new product is given by
N (x,y) = 20 x0.55y0.45 where x is the number of units of labor and y is the number of units of capital required to produce N(x,y) units of the product. Each unit of labor costs 45 TL, each unit of capital costs 90 TL and TL has been budgeted for the production of this product. How should this amount be allocated between labor and capital to maximize production? What is the maximum number of units that can be produced? Solution. The mathematical model of this problem can be constructed by denoting the number of units of labor and the number of units of capital utilized for the production by x and y, respectively. Then the problem can be formulated as “ Maximize N (x,y) = 20 x0.55y0.45 subject to the constraint 45x + 90y = ”
31
Maximize N (x,y) = 20 x0.55y0.45 subject to the constraint 45x + 90y = 450000.
Lagrange’s function F (x,y,) = N (x,y) + g(x,y) = 20 x0.55y (45x + 90y – ). Fx (x,y,) = 11 x-0.45y = 0 Fy (x,y,) = 9 x0.55y = 0 F (x,y,) = 45x + 90y = = 0. Eliminating from the first and second equations, 22 x-0.45y x0.55y-0.55 = 0 x = (22/9) y. Substituting in the third equation 45(22/9) y + 90y – = 0 y + 90y = y = 2250. x = (22/9)2250 = (22) 250 (22/9)= 5500. Maximum productivity occurs when units of labor and units of capital are used. Thus the maximum nomber of units of product that can be produced is N(5500, 2250) = (5500)0.55 (2250)0.45 146.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.