Lecture_FuncMultiVariables
Lecture_FuncMultiVariables
Samy Tindel
Purdue University
Example of function:
√
y = f (x ) = 9 − x2
Questions:
1 Domain of f ?
2 Range of f ?
Domain:
x ∈ [−3, 3]
Range:
y ∈ [0, 3]
Example of function:
√ q
z = f (x , y ) = 9 − x2 − 25 − y 2
Questions:
1 Domain of f ?
2 Range of f ?
Domain:
(x , y ) ∈ [−3, 3] × [−5, 5]
y ∈ [−5, 3]
Definition 1.
Contour curve:
Intersection of the surface (x , y , f (x , y )) and plane z = z0
Level curve:
Projection of contour curve on xy -plane
Function:
f (x , y ) = y − x 2 − 1
y = x 2 + 1 + z0
Function:
f (x , y ) = exp −x 2 − y 2
x 2 + y 2 = − ln(z0 )
Function:
f (x , y ) = 2 + sin(x − y )
Level curves:
For z0 ∈ [1, 3], we get a family of lines
y = x − k π, k∈Z
Situation:
Fraction of students infected by FV is r on 9/12
We have n random encounters with students on 9/12
Function:
The probability of meeting at least one student with FV is
p(n, r ) = 1 − (1 − r )n
Function:
p(n, r ) = 1 − (1 − r )n
Useful values of z:
For p0 ∈ [0, 1], the curve p(n, r ) = p0 is non empty
r = 1 − (1 − p)1/n
Depiction of function:
lim f (x ) = f (a)
x →a
lim f (x , y ) = L
(x ,y )→(a,b)
lim f (x , y ) = f (a, b)
(x ,y )→(a,b)
Function:
1 + y2
!
ln
x2
(1, 0)
f (1, 0) = 0
lim f (x , y ) = f (1, 0) = 0
(x ,y )→(1,0)
Function:
y 2 − 4x 2
f (x , y ) =
2x 2 + y 2
(0, 0)
y 2 − 4x 2
Along x = 0, lim = 1
(x ,y )→(0,0), x =0 2x 2 + y 2
y 2 − 4x 2
Along y = 0, lim = −2
(x ,y )→(0,0), y =0 2x 2 + y 2
We get 2 different limits
Conclusion:
f is not continuous at point (0, 0)
Function:
x2 − y2
f (x , y ) =
x +y
(0, 0)
x2 − y2
Along x = 0, lim = 0
(x ,y )→(0,0), x =0 x +y
x2 − y2
Along y = 0, lim = 0
(x ,y )→(0,0), y =0 x +y
We get the same limit
Partial conclusion:
This is not enough!
x2 − y2
f (x , y ) = =x −y
x +y
The rhs above is continuous
Conclusion: We have
lim f (x , y ) = 0
(x ,y )→(0,0)
f (x + h) − f (x )
f ′ (x ) = lim
h→0 h
Definition 2.
Consider
f function of 2 variables
Then we set
f (x + h, y ) − f (x , y )
fx (x , y ) = lim
h→0 h
f (x , y + h) − f (x , y )
fy (x , y ) = lim
h→0 h
Function:
f (x , y ) = x 8 y 5 + x 3 y
Recall:
f (x , y ) = x 8 y 5 + x 3 y
Partial derivative fx :
fx = 8x 7 y 5 + 3x 2 y
Partial derivative fy :
fy = 5x 8 y 4 + x 3
Function:
f (x , y ) = e x sin(y )
Recall:
f (x , y ) = e x sin(y )
Partial derivative fx :
fx = e x sin(y )
Partial derivative fy :
fy = e x cos(y )
∂ 2f ∂ 2f
fxx = (fx )x = , fyy = (fy )y =
∂x 2 ∂y 2
∂ 2f
fxy = (fx )y =
∂x ∂y
∂ 2f
fyx = (fy )x =
∂y ∂x
Function:
f (x , y ) = e x sin(y )
fyx = fxy
Function:
2y
f (x , y ) = e x
Recall:
2y
f (x , y ) = e x
Partial derivative fx :
2y
fx = 2xy e x
Partial derivative fy :
2y
fy = x 2 e x
Mixed derivatives:
2y
fyx = fxy = 2x x 2 y + 1 e x
Example:
f (x , y , z) = xyz
First derivatives:
fx = yz, fy = xz, fz = xy
fxy = fyx = z
Situation: We have
y = f (x )
x = g(t)
Chain rule:
dy dy dx
=
dt dx dt
Theorem 3.
Let
z = z(x , y )
x = x (t) and y = y (t)
z, x , y differentiable
Then
dz ∂z dx ∂z dy
= +
dt ∂x dt ∂y dt
Derivative: We find
dz ∂z dx ∂z dy
= +
dt ∂x dt ∂y dt
= −16 sin(2t)
dz π
= −16
dt 4
Theorem 4.
Let F (x , y ) be such that
F differentiable
The equation F (x , y ) = 0 defines y = y (x )
x 7→ y (x ) differentiable
Fy ̸= 0
Then we have
dy Fx
=−
dx Fy
Equation:
e y sin(x ) = x + xy
Problem: Find
dy
dx
F (x , y ) = e y sin(x ) − x − xy
Implicit differentiation:
dy Fx e y cos(x ) − 1 − y
=− =−
dx Fy e y sin(x ) − x
Problem: Find
∂z
∂y
Implicit differentiation:
∂z Fy x +z
=− =−
∂y Fz y +x
Definition 5.
Let
f differentiable function at (a, b)
u = ⟨u1 , u2 ⟩ unit vector in xy -plane
Then the directional derivative of f
in the direction of u at (a, b) is
Proposition 6.
Let
f differentiable function at (a, b)
u = ⟨u1 , u2 ⟩ unit vector in xy -plane
Then the directional derivative of f
in the direction of u at (a, b) is given by
Unit vector: * +
1 1
u= √ ,√
2 2
Du f (3, 2)
Unit vector: * +
1 1
u= √ ,√
2 2
Definition 7.
Let
f differentiable function at (x , y )
Then the gradient of f at (x , y ) is
∇f (x , y ) = ⟨fx (x , y ), fy (x , y )⟩
Function:
x 2 xy 2
f (x , y ) = 3 − +
10 10
Problem:
1 Compute ∇f (3, −1)
2 Compute the directional derivative of f
,→ at (3, −1) in the direction of the vector ⟨3, 4⟩
Gradient:
y 2 xy
* +
x
∇f (x , y ) = − + ,
5 10 5
Thus
1 3
∇f (3, −1) = − , −
2 5
Du f (x , y ) = ∇f (x , y ) · u
We get
39
Du f (3, −1) = −
50
Questions:
1 If you are located on the paraboloid at the point (2, − 21 , 35
4
)
,→ In which direction should you move in order to ascend on the
surface at the maximum rate?
2 If you are located on the paraboloid at the point (2, − 21 , 35
4
)
,→ In which direction should you move in order to descend on
the surface at the maximum rate?
3 At the point (3, 1, 16), in what direction(s) is there no change
in the function values?
∇f (x , y ) = ⟨2x , 6y ⟩
Thus
∇f (3, 1) = ⟨6, 6⟩
Theorem 8.
Let
f differentiable function at (x , y )
Hypothesis: ∇f (a, b) ̸= 0
Then:
Function: q
z = f (x , y ) = 1 + 2x 2 + y 2
Questions:
1 Verify that the gradient at (1, 1) is orthogonal to the
corresponding level curve at that point.
2 Find an equation of the line tangent to the level curve at (1, 1)
1 + 2x 2 + y 2 = 4 ⇐⇒ 2x 2 + y 2 = 3
Implicit derivative:
dy Fx 2x
=− =−
dx Fy y
Thus
dy
(1) = −2
dx
t = ⟨1, −2⟩
Gradient of f :
* +
2x y
∇f (x , y ) = √ 2 2
, √
1 + 2x + y 1 + 2x 2 + y 2
Thus
1
∇f (1, 1) = 1,
2
Orthogonality: We have
t · ∇f (1, 1) = 0
that is
y = −2x + 3
Function:
f (x , y , z) = xyz
Gradient:
∇f (x , y , z) = ⟨yz, xz, xy ⟩
Thus
∇f (1, 2, 3) = ⟨6, 3, 2⟩
⟨6, 3, 2⟩ · ⟨x − 1, y − 2, z − 3⟩ = 0
We get
6x + 3y + 2z = 18
Tangent vector at a:
t = (1, f ′ (a))
f (x ) ≃ f (a) + f ′ (a)(x − a)
Definition 9.
Let F (x , y , z) be such that
F differentiable at P(a, b, c)
∇F ̸= 0
S is the surface F (x , y , z) = 0
Then the tangent plane at (a, b, c) is given by
x2 y2
F (x , y , z) = + + z2 − 1 = 0
9 25
Questions:
1 Tangent plane at (0, 4, 53 )
2 What tangent planes to S are horizontal?
Gradient: We have
2x 2y
∇F (x , y , z) = , , 2z
9 25
Thus
3 8 6
∇F (0, 4, ) = 0, ,
5 25 5
Tangent plane:
4y + 15z = 25
∇F (x , y , z) = (0, 0, c) ⇐⇒ Fx = 0, Fy = 0, Fz ̸= 0
Definition 10.
Let f (x , y ) be such that
f differentiable at (a, b)
S is the surface z = f (x , y )
Then the tangent plane to S at (a, b, f (a, b)) is given by
z = f (x , y ) = 32 − 3x 2 − 4y 2
Question:
Tangent plane at (2, 1, 16)
fx = 6x , fy = −8y
Thus
fx (2, 1) = −12, fy (2, 1) = −8
Tangent plane:
z = −12x − 8y + 48
Tangent vector at a:
t = (1, f ′ (a))
f (x ) ≃ f (a) + f ′ (a)(x − a)
Definition 11.
Let f (x , y ) be such that
f differentiable at (a, b)
S is the surface z = f (x , y )
Then the linear approximation to S at (a, b, f (a, b)) is given by
∆z ≃ fx dx + fy dy
Function:
z = f (x , y ) = x 2 y
dz ≃ fx dx + fy dy = 2xy dx + x 2 dy
dz 2xy x2 2 1
= dx + dy = dx + dy
z z z x y
dx dy
If x
= .01 and y
= −.03:
dz
= −.01 = −1%
z
Situation: We have
y = f (x )
f ′ (c) = 0
Definition 12.
Let
f function of 2 variables
(a, b) interior point in the domain of f
Then (a, b) is a critical point of f if
Theorem 13.
For f twice diff. function, define the discriminant of f as
Function:
f (x , y ) = x 2 + 2y 2 − 4x + 4y + 6
Problem:
Use second derivative test to classify the critical points of f
Partial derivatives:
fx = 2x − 4, fy = 4y + 4
Critical point:
(2, −1)
Critical value of f :
f (2, −1) = 0
Second derivatives:
Discriminant:
D(x , y ) = 8 > 0
D(2, −1) > 0, fxx (2, −1) > 0 =⇒ Local minimum at (2, −1)
Function:
f (x , y ) = xy (x − 2)(y + 3)
Problem:
Use second derivative test to classify the critical points of f
Partial derivatives:
Critical points:
3
(0, 0), (2, 0), (1, − ), (0, −3), (2, −3),
2
Proposition 14.
Let
f continuous function of 2 variables
R closed region of R2
In order to find the maximum of f in R, we proceed as follows:
1 Determine the values of f at all critical points in R.
2 Find the maximum and minimum values of f on the
boundary of R.
3 The greatest function value found in Steps 1 and 2 is the
absolute maximum value of f on R.
Function:
z = f (x , y ) = x 2 + y 2 − 2x − 4y
Region:
R = {(x , y ); (x , y ) within triangle with vertices (0, 0), (0, 4), (4, 0)}
Question:
Find global maximum of f on region R
Partial derivatives:
fx = 2x − 2, fy = 2y − 4
Critical point:
(1, 2), with f (1, 2) = −5
Boundary 1: On y = 0, 0 ≤ x ≤ 4 we have
f (x , y ) = x 2 − 2x ≡ g(x ), g ′ (x ) = 2(x − 1)
and
f (0, 0) = 0, f (1, 0) = −1, f (4, 0) = 8
Boundary 2: On y = 4 − x , 0 ≤ x ≤ 4 we have
f (x , y ) = 2x 2 − 6x ≡ h(x ), h′ (x ) = 4x − 6
Boundary 3: On x = 0, 0 ≤ y ≤ 4 we have
f (x , y ) = y 2 − 4y ≡ k(y ), k ′ (y ) = 2(y − 2)
and
f (0, 0) = 0, f (0, 2) = −4, f (0, 4) = 0
f (1, 2) = −5
f (4, 0) = 8
Objective function:
f = f (x , y )
g(x , y ) = 0
∇f (a, b) ∥ ∇g(a, b)
Recipe:
1 Find the values of x , y and λ such that
max f (x , y ), with f (x , y ) = x 2 + y 2 + 2,
g(x , y ) = x 2 + xy + y 2 − 4 = 0
Lagrange constraint 1:
Lagrange constraint 2:
fy = λgy ⇐⇒ 2y = λ (x + 2y ) (2)
x 2 + xy + y 2 − 4 = 0
becomes
x2 − 4 = 0
Solutions:
x = 2, and x = −2
x 2 + xy + y 2 − 4 = 0
becomes
3x 2 − 4 = 0
Solutions:
2 2
x=√ , and x = − √
3 3
Corresponding values of f : We have
! !
2 2 2 2 14
f √ ,√ =f −√ , −√ =
3 3 3 3 3
Absolute maximum:
For function f on the curve C defined by g = 0,
Absolute minimum:
For function f on the curve C defined by g = 0,
! !
14 2 2 2 2
Minimum = , obtained for √ ,√ , −√ , −√
3 3 3 3 3
x 2 + y 2 + z 2 = 1,
g(x , y ) = x 2 + y 2 + z 2 − 1 = 0
∇f (x , y ) = λ ∇g(x , y )
⇐⇒
(λ − 1)x = −1, (λ − 1)y = −2, (λ − 1)z = −3
y = 2x , z = 3x , g(x , y ) = 0,
Thus we get
14x 2 = 1
Solutions:
1 1
x=√ , and x = − √
14 14
Absolute maximum:
Maximal distance from (1, 2, 3) to a point on the sphere is
!
1 2 3
Maximum = 4.74, obtained for −√ , −√ , −√
14 14 14
Absolute minimum:
Minimal distance from (1, 2, 3) to a point on the sphere is
√
!
1 2 3
Minimum = 2.74 = 7.51, obtained for √ ,√ ,√
14 14 14