Functions of Several Variables
Functions of Several Variables
Functions of Several Variables
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
18.02 Lecture 8. – Tue, Sept 25, 2007
Is it a max, min or saddle? (pictures shown of each type). Systematic answer: next lecture.
For today: observe f = (x − y)2 + 2y 2 + 2x − 2y = (x − y + 1)2 + 2y 2 − 1 ≥ −1, so minimum.
Least squares.
Set up problem: experimental data (xi , yi ) (i = 1, . . . , n), want to find a best-fit line y = ax + b
(the unknowns here are a, b, not x, y!)
Deviations: yi − (axi + b); want to minimize the total square deviation D = i (yi − (axi + b))2 .
�
∂D ∂D
= 0 and = 0 leads to a 2 × 2 linear system for a and b (done in detail as in Notes LS):
∂a ∂b
�� � �� � �
x2i a + xi b = xi yi
�� � �
xi a + nb = yi
Goal: determine type of a critical point, and find the global min/max.
Note: global min/max may be either at a critical point, or on the boundary of the domain/at
infinity.
We start with the case of w = ax2 + bxy + cy 2 , at (0, 0).
Example from Tuesday: w = x2 −2xy+3y 2 : completing the square, w = (x−y)2 +2y 2 , minimum.
b b b2 1 b
If a �= 0, then w = a(x2 + xy)+cy 2 = a(x+ y)2 +(c− )y 2 = (4a2 (x+ y)2 +(4ac−b2 )y 2 ).
a 2a 4a 4a 2a
3 cases: if 4ac − b2 > 0, same signs, if a > 0 then minimum, if a < 0 then maximum; if
4ac − b2 < 0, opposite signs, saddle; if 4ac − b2 = 0, degenerate case.
� x x
This is related to the quadratic formula: w = y 2 a( )2 + b( ) + c .
�
y y
2 2
If b −4ac < 0 then no roots, so at +bt+c has a constant sign, and w is either always nonnegative
or always nonpositive (min or max). If b2 − 4ac > 0 then at2 + bt + c crosses zero and changes sign,
so w can have both signs, saddle.
General case: second derivative test.
∂2f
We look at second derivatives: fxx = , fxy , fyx , fyy . Fact: fxy = fyx .
∂x2
Given f and a critical point (x0 , y0 ), set A = fxx (x0 , y0 ), B = fxy (x0 , y0 ), C = fyy (x0 , y0 ), then:
– if AC − B 2 > 0 then: if A > 0 (or C), local min; if A < 0, local max.
– if AC − B 2 < 0 then saddle.
3