420 likes | 529 Views
Chabot Mathematics. §7.3 2Var Optimization. Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu. 7.2. Review §. Any QUESTIONS About §7.2 → Partial Derivatives Any QUESTIONS About HomeWork §7.2 → HW-05. §7.3 Learning Goals.
E N D
Chabot Mathematics §7.3 2VarOptimization Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu
7.2 Review § • Any QUESTIONS About • §7.2 → Partial Derivatives • Any QUESTIONS About HomeWork • §7.2 → HW-05
§7.3 Learning Goals • Locate and classify relative extrema for a function of two variables using the second partials test • Examine applied problems involving optimization of functions of two variables • Discuss and apply the extreme value property for functions of two variables to find absolute extrema on a closed, bounded region
Local Maximum & Minimum • DEFINITION • A function of two variables has a local maximum at (a,b) if f(xy) ≤ f(a,b) when (x,y) is near (a,b). [This means that f(x,y) ≤ f(a,b) for all points (x,y) in some DISK with center (a,b).] The number f(a,b) is called a local maximum value. • If f(x,y) ≥ f(a,b) when (x,y) is near (a,b), then f(a,b) is a local minimum value.
Local MaxMin Illustrated • The DISK centered at (x,y)=(a,b) produces a “Hill” with peak at f(a,b) • Local (and Absolute) max/min for z = f(x,y)
Quick Example • The function of x,y below has a maximum of about 0.5 at approximately (0.6, 0) Relative Maximum
CriticalPoints and Extrema • DEFINITION: A point (a,b) in the domain of f(x,y), for which the first order partial derivatives of f(x,y) exist, the point (a,b) is a CRITICAL POINT if: • That is, BOTH Partials must equal Zero at the Same Time
CriticalPoints and Extrema • THEOREM: If f has a local maximum or minimum at (a,b) then point (a,b) MUST be a Critical Point at which both Partials Simultaneously equal Zero. • While ALL max/min (Extrema) occur at Critcal Points (CPs), NOT all CPs are Extrema Points • A Surface that contains a CP that is NOT an Extremum is called a Saddle Surface
Example Find Critical Points • Find All Critical Points for • Critical points occur for a function of two variables wherever both 1st Partials = 0 • For the given 2-Variable function • Setting BOTH partials to Zero Generates 2-Eqns in 2-Unknwns
Example Find Critical Points • Using the x-Partial: • Now SubStitute into the y-Partial • Or • Then • BackSubbing:
Example Find Critical Points • SOLUTION • Thus the only relative extremum of the function occurs at (2,1) • Whether this extremum is a maximum, minimum, or neither is not yet known. Its graph suggests a minimum:
Saddle Surface • At the “Saddle Point” (0,0,0) • But, the Curve is a • MINIMUM in the xz plane • MAXIMUM in the yz plane
Critical Point Condition • A Critical Point ALWAYS marks the location of a “Flat” Tangent Plane, and can be one of • A MAXimum • A MIMimum • NEITHER • i.e.; a SADDLE point • The Nature of a CP can (usually) Be determined by the Second Partials Test • Assume for f(x,y) that all needed Partial exist then let
2nd Partials Test Procedure • Find a Critical Point (a,b) such that • Evaluate the “Discriminant” fcn, D(x,y) from last slide, at the CP. That is, find
2nd Partials Test Procedure • If D(a,b) is NEGATIVE, then (a,b) is a SADDLE POINT • For D(a,b) POSITIVE calc • If fxx(a,b) is POSITIVE, then (a,b) is a MAX • If fxx(a,b) is NEGATIVE, then (a,b) is a MIN • If D(a,b) = 0 then the test is Inconclusive • The pt (a,b) can be of ANY of the Three forms; max, min, saddle
Quick Example • For the Previous Example Calc • Then D • And • Now D>0 & fxx>0 so (2,1) is a MAX
Example Find Max Revenue • The Gladiator Goodies Company sells Jumbo Cashews and the popular “Trial by Trail” RaisinNut mix. Then GG Industrial Engineering develops Regression models for the products • ; qC in kCans • ; qR in kBags • x ≡ Cashew Price in $ per Can • y ≡ RaisinNut Price in $ per Bag
Example Find Max Revenue • For this Financial Model • Find a revenue function, • determine at what prices revenue is maximized, and • find the maximum revenue from the sale of these two products.
Example Find Max Revenue • SOLUTION • The Company Revenue is the sum of revenue from the Two products, so • To Maximize R, take the Partials and set them to Zero
Example Find Max Revenue • The Partial Derivatives • Combine the Two Equations • BackSub to find: • So have ONE Critical Point at About(13.93 $/can, 23.70 $/bag)
Example Find Max Revenue • Next Find the Discriminant Function • The above calculation along with the fact that ∂2R/∂x2 = −1 (<0) shows that the critical point is a maximum • Then the Revenue at max
Constrained Domain Extrema • DOMAIN of many RealWorld 2Var Math Models are Constrained For Various Practical Reasons; Call This Domain, R • In a finite Constrained-Domain an ABSOLUTE Max or Min is Present • The Absolute Extrema exists at ONE of • The EDGES, or BOUNDARY, of the Domain Region, R • The INTERIOR of R, at a Critical Point of the 2Var Function
Constrained Domain Illustrated • Consider a 2Var MathModel, z = f(x,y) with x & y constrained in the XY-Plane by the 2D function g(x,y)=k (k a const) as Illustrated below.
Example Production Constraints • Gladiator Goodies Company (GGC) Factory does NOT have Unlimited Production Capacity. • The Factory has been Engineered to this Design Constraint: • e.g., if the factory produces 2300 Cashew Cans per week, then at least 4600 RaisinNut Bags also come off the Line [No. RaisinNut Bags] ≥ 2·[ No. Cashew Cans]
Example Production Constraints • Recall the GGC Revenue MathModel as developed by the Industrial Engineer • Given the Factory-Production Constraint, Find the Maximum Revenue that may be realized using the Cashew and RaisinNut Production Line
Example Production Constraints • The Goal is the as in the Previous example; to Maximize Revenue. Stated Mathematically → • A further constraint is that GGC will NOT Give Away their products; thus
Example Production Constraints • Then the THREE Constraints: • The Constrained Domain RegionGraphically • Practical Price Regionin Dark Blue
% Bruce Mayer, PE % MTH-15 • 01Aug13 • Rev 11Sep13 % MTH15_Quick_Plot_BlueGreenBkGnd_130911.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = 0; xmax = 20; % The FUNCTION ************************************** x = linspace(xmin,xmax,10000); y1 = 4*x-100/3; yFilter = (y1>0); y=y1.*yFilter; % *************************************************** % the Plotting Range = 1.05*FcnRange ymin = min(y); ymax = max(y); % the Range Limits R = ymax - ymin; ymid = (ymax + ymin)/2; ypmin = ymid - 1.025*R/2; ypmax = ymid + 1.025*R/2 % % The ZERO Lines zxh = [xminxmax]; zyh = [0 0]; zxv = [0 0]; zyv = [ypmin*1.05 ypmax*1.05]; % vxR = [xmax,xmax]; vyR = [0,ymax]; % close the constraint line at Right % the 6x6 Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green area(x,y, 'LineWidth', 4),grid, axis([xmin 1.05*xmaxypminypmax]),... xlabel('\fontsize{14}x = Cashew Price ($/Can)'), ylabel('\fontsize{14}y = RaisinNut Price ($/Bag)'),... title(['\fontsize{16}MTH16 • Bruce Mayer, PE',]),... annotation('textbox',[.53 .05 .0 .1], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 Quick Plot BlueGreenBkGnd 130911.m','FontSize',7) hold on plot(zxv,zyv, 'k', zxh,zyh, 'k', vxR,vyR, 'k', 'LineWidth', 2) hold off MATLAB Code
Example Production Constraints • Now consider all boundary points at which critical values can occur. First, consider the vertical line at x = 0: • Taking dR(0,y)/dy = 0 produces a Maximum at
Example Production Constraints • Now consider all boundary points at which critical values can occur. First, consider the vertical line at x = 0: • Taking dR(0,y)/dy = 0 produces a Maximum at
Example Production Constraints • Next consider the horizontal line y = 0: • Taking dR(x,0)/dx = 0 Results in an x-maximum • Lastly examine the Slanted Line: • Sub the Slanted Line Constraint into the Revenue Function
Example Production Constraints • With • Taking dR(x,4x−33.33)/dx = 0 produces a Maximum at
Example Production Constraints • SUMMARY: • Have 3 boundary critical points to consider: • (0,15), (8 0), and (14.26, 23.71) • We would normally also consider the only critical point on the interior (found in the previous Example 2). However, this point does not satisfy the condition that there be at least twice as many health fusion nuts as cashews, so it is omitted. • We then compare revenue for each of those three boundary points and identify the largest revenue.
Example Production Constraints • SUMMARY: • We then compare revenue for each of those three boundary points and identify the largest revenue • Tabulating the Results • Pricing the cashews at $14.26 and Trial-by-Trail at $23.71 provides maximum revenue, given the constraints.
WhiteBoard Work • Problems From §7.3 • P51 → Box Design Optimization
All Done for Today SaddlePointCity
Chabot Mathematics Appendix Do On Wht/BlkBorad Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu –