0% found this document useful (0 votes)
99 views4 pages

Functions of Several Variables

1) The document discusses functions of several variables, including plotting graphs, contour plots, partial derivatives, and using partial derivatives to find critical points and determine if a critical point is a local minimum, maximum, or saddle point. 2) It also covers linear approximation of functions near a point using partial derivatives, and applying the method of least squares to find best-fit lines to experimental data. 3) The second derivative test is described for determining the type of critical point by considering the signs of the second partial derivatives at that point.

Uploaded by

Konal Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
99 views4 pages

Functions of Several Variables

1) The document discusses functions of several variables, including plotting graphs, contour plots, partial derivatives, and using partial derivatives to find critical points and determine if a critical point is a local minimum, maximum, or saddle point. 2) It also covers linear approximation of functions near a point using partial derivatives, and applying the method of least squares to find best-fit lines to experimental data. 3) The second derivative test is described for determining the type of critical point by considering the signs of the second partial derivatives at that point.

Uploaded by

Konal Shah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

MIT OpenCourseWare

http://ocw.mit.edu

18.02 Multivariable Calculus


Fall 2007

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

Functions of several variables.


Recall: for a function of 1 variable, we can plot its graph, and the derivative is the slope of the
tangent line to the graph.
Plotting graphs of functions of 2 variables: examples z = −y, z = 1 − x2 − y 2 , using slices by
the coordinate planes. (derived carefully).
Contour plot: level curves f (x, y) = c. Amounts to slicing the graph by horizontal planes z = c.
Showed 2 examples from “real life”: a topographical map, and a temperature map, then did the
examples z = −y and z = 1 − x2 − y 2 . Showed more examples of computer plots (z = x2 + y 2 ,
z = y 2 − x2 , and another one).
Contour plot gives some qualitative info about how f varies when we change x, y. (shown an
example where increasing x leads f to increase).
Partial derivatives.
∂f f (x0 + Δx, y0 ) − f (x0 , y0 )
fx = = lim ; same for fy .
∂x Δx→0 Δx
Geometric interpretation: fx , fy are slopes of tangent lines of vertical slices of the graph of f
(fixing y = y0 ; fixing x = x0 ).
How to compute: treat x as variable, y as constant.
Example: f (x, y) = x3 y + y 2 , then fx = 3x2 y, fy = x3 + 2y.

18.02 Lecture 9. – Thu, Sept 27, 2007


Handouts: PS3 solutions, PS4.
Linear approximation
Interpretation of fx , fy as slopes of slices of the graph by planes parallel to xz and yz planes.
Linear approximation formula: Δf ≈ fx Δx + fy Δy.
Justification: fx and fy give slopes of two lines tangent to the graph:
y = y0 , z = z0 + fx (x0 , y0 )(x − x0 ) and x = x0 , z = z0 + fy (x0 , y0 )(y − y0 ).
We can use this to get the equation of the tangent plane to the graph:
z = z0 + fx (x0 , y0 )(x − x0 ) + fy (x0 , y0 )(y − y0 ).
Approximation formula = the graph is close to its tangent plane.
Min/max problems.
At a local max or min, fx = 0 and fy = 0 (since (x0 , y0 ) is a local max or min of the slice).
Because 2 lines determine tangent plane, this is enough to ensure that tangent plane is horizontal
(approximation formula: Δf � 0, or rather, |Δf | � |Δx|, |Δy|).
Def of critical point: (x0 , y0 ) where fx = 0 and fy = 0.
A critical point may be a local min, local max, or saddle.
Example: f (x, y) = x2 − 2xy + 3y 2 + 2x − 2y.
Critical point: fx = 2x − 2y + 2 = 0, fy = −2x + 6y − 2 = 0, gives (x0 , y0 ) = (−1, 0) (only one
critical point).
1
2

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

Least-squares setup also works in other cases: e.g. exponential laws


y = ceax (taking logarithms: ln y = ln c + ax, so setting b = ln c we reduce to linear case); or
quadratic laws y = ax2 + bx + c (minimizing total square deviation leads to a 3 × 3 linear system
for a, b, c).
Example: Moore’s Law (number of transistors on a computer chip increases exponentially with
time): showed interpolation line on a log plot.
18.02 Lecture 10. – Fri, Sept 28, 2007
Second derivative test.
Recall critical points can be local min (w = x2 + y 2 ), local max (w = −x2 − y 2 ), saddle (w =
y − x2 ); slides shown of each type.
2

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

– if AC − B 2 = 0 then can’t conclude.

Checked quadratic case (fxx = 2a = A, fxy = b = B, fyy = 2c = C, then AC − B 2 = 4ac − b2 ).

General justification: quadratic approximation formula (Taylor series at order 2):

Δf � fx (x − x0 ) + fy (y − y0 ) + 12 fxx (x − x0 )2 + fxy (x − x0 )(y − y0 ) + 12 fyy (y − y0 )2 .


At a critical point, Δf � A2 (x − x0 )2 + B(x − x0 )(y − y0 ) + C2 (y − y0 )2 . In degenerate case, would
need higher order derivatives to conclude.
NOTE: the global min/max of a function is not necessarily at a critical point! Need to check
boundary / infinity.
1
Example: f (x, y) = x + y + xy , for x > 0, y > 0.
fx = 1 − x12 y = 0, fy = 1 − xy
1 2 2
2 = 0. So x y = 1, xy = 1, only critical point is (1, 1).
fxx = 2/x3 y, fxy = 1/x2 y 2 , fyy = 2/xy 3 . So A = 2, B = 1, C = 2.

Question: type of critical point? Answer: AC − B 2 = 2 · 2 − 1 > 0, A


= 2 > 0, local min.

What about the maximum? Answer: f → ∞ near boundary (x → 0 or y → 0) and at infinity.

You might also like