490 likes | 587 Views
Chabot Mathematics. §7.1 MultiVar Functions. Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu. 6.3. Review §. Any QUESTIONS About §6.3 → Improper Integrals Any QUESTIONS About HomeWork §6.3 → HW-03. §7.1 Learning Goals.
E N D
Chabot Mathematics §7.1 MultiVarFunctions Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu
6.3 Review § • Any QUESTIONS About • §6.3 → Improper Integrals • Any QUESTIONS About HomeWork • §6.3 → HW-03
§7.1 Learning Goals • Define and examine functions of two or more variables • Explore graphs and level curves of functions of two variables • Study the Cobb-Douglas production function, isoquants, and indifference curves in economics
Functions of 2+ Variables Functional Machinery
2Var Fcn → Unique Assignment • DEFINITION: A function f of two variables is a rule that assigns to each ordered pair of real numbers (x, y) in a set D a unique real number denoted by f (x,y). • The set D is the domain of f and its range is the set of values that f takes on, that is,
2Var Fcn → Unique Assignment • We often write z=f (x, y) to make explicit the value taken on by f at the general point (x, y) . • The variables x and y are INdependent variables • z is the DEpendent variable. • Note that Assignment is Unique; i.e., and Input Values, x & y, Will Produce exactly ONE value of z
2Var Fcn → Unique Assignment • YES, a 2Var Function • NO, NOT a 2Var Function NONunique Assignment
Example: f(x,y) Domain & Plot • Given 2Var Fcn: • Find Function Domain • Plot Over: x 0→10 & y 0→5 • SOLUTION • For Domain description look for cases where any term is NOT Defined • ln(x) not defined for x ≤ 0 • No restriction on y as ey defined for all real numbers
Example: f(x,y) Domain & Plot • Thus the Domain • For the Plot, Make 3D “T-Table”
Example: f(x,y) Domain & Plot • The plot by MATLAB
% Bruce Mayer, PE % MTH-15 • 13Jan14 % MTH15_Quick_3Var_3D_Plot_BlueGreenBkGnd_140113.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = 0; xmax = 10; % BASE max & min2 ymin = 0; ymax = 5; NumPts = 40 % The GRID ************************************** xx = linspace(xmin,xmax,NumPts); yy = linspace(ymin,ymax,NumPts); [x,y]= meshgrid(xx,yy); % The FUNCTION*********************************** z = x.*exp(y) + log(x+1); % % the Plotting Range = 1.05*FcnRange zmin = min(min(z)); zmax = max(max(z)); % the Range Limits R = zmax - zmin; zmid = (zmax + zmin)/2; zpmin = zmid - 1.025*R/2; zpmax = zmid + 1.025*R/2; % % The ZERO Lines % zxh = [xminxmax]; zyh = [0 0]; zxv = [0 0]; zyv = [ypmin*1.05 ypmax*1.05]; % % the 6x6 Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green mesh(x,y,z, 'LineWidth', 2),grid, axis([xminxmaxyminymaxzpminzpmax]), grid, box, ... xlabel('\fontsize{14}x'), ylabel('\fontsize{14}y'), zlabel('\fontsize{14}z = f(x,y)'),... title(['\fontsize{16}MTH16 • Bruce Mayer, PE',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) MATLAB Code
Example Cobb-Douglas Model • The Cobb-Douglas productivity Model for a given factory says that the production P in a market, in units produced in a given time period, is a function of the labor L and capital K used in production • Where • L measured in Worker-Hours • K measured in total-k$ • P measured in Units/Month
Example Cobb-Douglas • Find the production level when 30 workers are employed at full-time (8-hour days for 22 working days a month) and $100,000 (Capital Cost) of machinery are required. • In order to produce 10,000 units each month using the same capital as in part (a), how many workers would need to be employed at full-time?
Example Cobb-Douglas • SOLUTION • Use the Model to Find Pa • Thus There were about 5,876 units produced each month
Example Cobb-Douglas • Need to Increase the Production to 10000 Units/monwithOUT purchasing any more Machinery; i.e., K = $100k • Solve the Cobb-Douglas Eqn for L
Example Cobb-Douglas • The New WorkLoad • 10,728 worker-hours (almost 61 full-time equivalent workers) would achieve the goal of 10,000 units each month
Level Curves • Level Curves are described by 3D Lines of “Constant z” • The most common Level Curve, or IsoQuantity Line, plots are earth-elevation TopoGraphical Maps TheLevels
Example Surface & Contours • Level-Curves can be found by “Slicing” the Surface Plot • Surface Plots can be found by “Connecting” the IsoLevel Contour Plot Levels
% Bruce Mayer, PE % MTH-15 • 13Jan14 % MTH15_Quick_3Var_3D_Plot_BlueGreenBkGnd_140113.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = -1; xmax = 1; % BASE max & min2 ymin = -1; ymax = 1; NumPts = 50 % The GRID ************************************** xx = linspace(xmin,xmax,NumPts); yy = linspace(ymin,ymax,NumPts); [x,y]= meshgrid(xx,yy); % The FUNCTION*********************************** n = 3 z = exp(-n*(x.^2 + y.^2)); % HyperBolic Paraboloid % the Plotting Range = 1.05*FcnRange zmin = min(min(z)); zmax = max(max(z)); % the Range Limits R = zmax - zmin; zmid = (zmax + zmin)/2; zpmin = zmid - 1.025*R/2; zpmax = zmid + 1.025*R/2; % % the Domain Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green mesh(x,y,z, 'LineWidth', 2),grid, axis([xminxmaxyminymaxzpminzpmax]), grid, box, ... xlabel('\fontsize{14}x'), ylabel('\fontsize{14}y'), zlabel('\fontsize{14}z = f(x,y)'),... title(['\fontsize{16}MTH16 • Bruce Mayer, PE',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) % % display('Plot PAUSED - hit any key to continue') pause % contour3(x,y,z,20), grid on, axis([xminxmaxyminymaxzpminzpmax]), box, ... xlabel('\fontsize{14}x'), ylabel('\fontsize{14}y'), zlabel('\fontsize{14}z = f(x,y)'),... title(['\fontsize{16}MTH16 • Bruce Mayer, PE',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) hold on h = findobj('Type','patch'); set(h,'LineWidth',2) hold off MATLAB Code
Level Curves Quantified • A function, z = f(x,y), has level curves consisting of graphs in the xy-plane for fixed, or Constant, values of z. • In other words a level curve of f at C is all points that satisfy the equation
Example WindChill City • A common Math Model for the wind chill Factor is given by • where V is the wind velocity in mph (V>5), and T is the temperature in °F • If the temperature remains fixed at 40 °F and the wind speed is 10 mph, what effect does doubling the wind speed have on wind chill?
Example WindChill City • SOLUTION • Need to calculate the difference between wind chill between conditions: • T = 40 °F, V = 10 mph • T = 40 °F, V = 20 mph • At 10 mph
Example WindChill City • Now at 20 mph • Thus Doubling the wind speed reduced wind chill by a little over three °F • Note that is was an IsoTemperature, or IsoThermal Situation
Example WindChill City • Find Answer on Contour plot
% Bruce Mayer, PE % MTH-16 • 13Jan14 % MTH15_Quick_3Var_3D_Plot_BlueGreenBkGnd_140113.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = 20; xmax = 60; % °F ymin = 5; ymax = 25; % mph NumPts = 50 % The GRID ************************************** xx = linspace(xmin,xmax,NumPts); yy = linspace(ymin,ymax,NumPts); [x,y]= meshgrid(xx,yy); % The FUNCTION*********************************** z = 35.74 + 0.6125*x - 35.75*y.^0.16 + 0.4275*x.*y.^0.16; % % the Plotting Range = 1.05*FcnRange zmin = min(min(z)); zmax = max(max(z)); % the Range Limits R = zmax - zmin; zmid = (zmax + zmin)/2; zpmin = zmid - 1.025*R/2; zpmax = zmid + 1.025*R/2; % % the Domain Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green [C,h]=contour(x,y,z,15), grid on, axis([xminxmaxyminymax]),... xlabel('\fontsize{14}T (°F)'), ylabel('\fontsize{14}V (mph)'), zlabel('\fontsize{14}WindChill (°F)'),... title(['\fontsize{16}MTH16 • WindChill (°F)',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) hold on set(h,'LineWidth',2) %[C,h] = contour(x,y,z); set(h,'ShowText','on','TextStep',get(h,'LevelStep')*2) hold off Contour Plot MATLAB
% Bruce Mayer, PE % MTH-16 • 13Jan14 % MTH15_Quick_3Var_3D_Plot_BlueGreenBkGnd_140113.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = 20; xmax = 60; % °F ymin = 5; ymax = 30; % mph NumPts = 50 % The GRID ************************************** xx = linspace(xmin,xmax,NumPts); yy = linspace(ymin,ymax,NumPts); [x,y]= meshgrid(xx,yy); % The FUNCTION*********************************** z = 35.74 + 0.6125*x - 35.75*y.^0.16 + 0.4275*x.*y.^0.16; % HyperBolic Paraboloid % the Plotting Range = 1.05*FcnRange zmin = min(min(z)); zmax = max(max(z)); % the Range Limits R = zmax - zmin; zmid = (zmax + zmin)/2; zpmin = zmid - 1.025*R/2; zpmax = zmid + 1.025*R/2; % % the Domain Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green mesh(x,y,z, 'LineWidth', 2),grid, axis([xminxmaxyminymaxzpminzpmax]), grid, box, ... xlabel('\fontsize{14}T (°F)'), ylabel('\fontsize{14}V (mph)'), zlabel('\fontsize{14}WindChill (°F)'),... title(['\fontsize{16}MTH16 • WindChill Function',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) % Surface Plot MATLAB
MuPAD code • Bruce Mayer, PE • MTH15 • 13Jan14 • 3D_3_Dimensional_Fcn_Plot_BMayer_1401.mn • Change BackGround: Scene3d → Style → BackGroundColor • WC := 35.74 + 0.6125*x - 35.75*y^0.16 + 0.4275*x*y^0.16 • plotfunc3d(WC, x = 20..60, y = 5..25, GridVisible = TRUE,LineWidth = 0.04*unit::inch, Width = 320*unit::mm, Height = 180*unit::mm,AxesTitleFont = ["sans-serif", 24],TicksLabelFont=["sans-serif", 16]):
3D Graphing by Computer • Excel can make Nice 3D Plots for People who do not have MATLAB & MuPAD • To make an Excel Plot, first construct a Basal, or Base Plane • Next Enter “z” formula and calculate • Use Insert→Charts→Surface to Create the Chart • And then Fine Tune
3D Computer Graphing (Excel) • Basal Plane Detail for =-EXP(-3*(H$7^2/1.8+ $F9^2))
Resulting 3D Excel Graph 3D_Surface_Plot_1401.xlsx
Computer Graphics FootBall • From the National FootBall League RuleBook: • Rule 2 The Ball • Section 1 • BALL DIMENSIONS • The Ball must be a “Wilson,” hand selected, bearing the signature of the Commissioner of the League, Roger Goodell. • The ball shall be made up of an inflated (12 1/2 to 13 1/2 pounds) urethane bladder enclosed in a pebble grained, leather case (natural tan color) without corrugations of any kind. It shall have the form of a prolate spheroid and the size and weight shall be: long axis, 11 to 11 1/4 inches; long circumference, 28 to 28 ½ inches; short circumference, 21 to 21 1/4 inches; weight, 14 to 15 ounces.
Computer Graphics FootBall • A FootBall is an Ellipsoid of Revolution • Using the RuleBook Specs:
Computer Graphics FootBall • MATLAB Makes Easy Vertical Revolution • The FootBall Ellipse-Equation: • Solvingfor y • FootBall Plots on Next Slide
MATLAB FootBall Code % Bruce Mayer, PE % MTH-15 • 01Aug13 • Rev 11Sep13 % MTH15_Quick_Plot_BlueGreenBkGnd_130911.m % clear; clc; clf; % clf clears figure window % % The ELLIPSE ************************************** a = 5.5; b = 4.5; x = linspace(-a,a, 10000); y = sqrt(b^2-(x*b/a).^2); %*********************************** % The Domain Limits xmin = -0.05*b; xmax = 1.05*b; % the Plotting Range = 1.05*FcnRange ymin = min(y); ymax = max(y); % the Range Limits R = 2*a; ymid = 0; 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]; % % the 6x6 Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green plot(y,x, 'LineWidth', 4),grid, axis([xminxmaxypminypmax]),... xlabel('\fontsize{14}x'), ylabel('\fontsize{14}y = f(x)'),... title(['\fontsize{16}MTH16 • FootBall',]),... 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', 'LineWidth', 2) hold off % Bruce Mayer, PE % MTH-15 • 13Jan14 % MTH15_Quick_3Var_3D_Plot_BlueGreenBkGnd_140113.m % clear; clc; clf; % clf clears figure window % % The Domain Limits xmin = -10; xmax = 10; % BASE max & min2 ymin = -10; ymax = 10; % The ELLIPSE ************************************** a = 5.5; b = 4.5; t = linspace(-a,a, 80); [x,y,Z] = cylinder(sqrt(b^2-(t*b/a).^2)); z = 2*a*Z % scale 0-1 to 0-2b %*********************************** % % the Domain Plot axes; set(gca,'FontSize',12); whitebg([0.8 1 1]); % Chg Plot BackGround to Blue-Green mesh(x,y,z, 'LineWidth', 2),grid on, box, ... xlabel('\fontsize{14}x'), ylabel('\fontsize{14}y'), zlabel('\fontsize{14}z = f(x,y)'),... title(['\fontsize{16}MTH16 • FootBall',]),... annotation('textbox',[.73 .05 .0 .1 ], 'FitBoxToText', 'on', 'EdgeColor', 'none', 'String', 'MTH15 3Var 3D Plot.m','FontSize',7) % %
WhiteBoard Work 175 ft • Problems From §7.1 • P47 → Skin Surface Area • P48 → WindMills • Smith-PutnamWindMill • Circa 1941 • Grandpa's Knob in Castleton, Vermont • P49 → Human Energy Expenditure
All Done for Today SpiralingFootBall
Chabot Mathematics Appendix Do On Wht/BlkBorad Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu –
P7.1-47 Skin Surface Area • Skin Area Formula based on easy to perform Measurements • Where • S ≡ Surface Area in sq-meters • W ≡ Person’s mass in kg • H ≡ Height in CentiMeters (cm) • Make Contour Plot S(W,H), and find Height for W=18.37kg & S=0.048m2
S(15.8kg,87.11cm) • By MuPad • S := 0.0072*(W^0.425)*(H^0.725) • Sa = subs(S,W=15.83,H=87.11) • In Sq-Meters
Basal Metabolism • The Harris-Benedict Power Eqns for Energy per Day in kgCalories • Human Males • Human Females • h ≡ hgt in cm, A ≡ in yrs, w ≡ weight in kg
Basal Metabolism • Find • Ba := subs(Bm, w=90,h=190,A=22 • Find • Bb := subs(Bf, w=61,h=170,A=27)d
Basal Metabolism • Find • Ac := subs(Am, wm=85, hm=193, Bmm=2108) • Find • Ad := subs(Af, wf=67, hf=173, Bff=1504)