Multivariable Functions - Bren School of … Functions p So far, we have been working with functions...
Transcript of Multivariable Functions - Bren School of … Functions p So far, we have been working with functions...
Session 9 : 9/25 1
Multivariable Functions The ThreeDimensional Coordinate System
Functions of Several Variables Partial Derivatives
Finding Extrema (Max/Min of multivariable functions)
Session 9 : 9/25 2
Multivariable Functions p So far, we have been working with functions of two dimensions (one
dependent variable, one independent variable)
2 7 ) ( 1 2 2 − − =
+ = x x x f
x y Examples:
But, in reality, most independent variables are dependent on more than one dependent variable. For example:
Plant growth (P) is dependent on time (t), temperature (T), and water content (w).
Then we can see that P is a function of t, T, and w. This is written mathematically as: ) , , ( w T t P
Session 9 : 9/25 3
Examples:
) , , (
: Law Gas Ideal
) , (
p nRT p T n V
t r t r D
=
⋅ =
n = moles T = temperature p = pressure R = gas constant
Notice that V is not a function of R, because R is a constant.
Session 9 : 9/25 4
Understanding Multivariable Functions Graphically: The 3-D Coordinate System
y
x
xyplane
yzplane
xzplane
Now, we have to define points in 3dimensions.
z
Session 9 : 9/25 5
Points in 3 Dimensions
z
y
x 1 2 3 4 2 3 1
2 3
4
2 3
4
1
2
3
1
2
3
4
(4,0,3)
(0,0,4)
(1,3,3)
Session 9 : 9/25 6
Distance and Midpoint Formulas
+ + +
=
− + − + − =
2 ,
2 ,
2
) z , y , (x and ) z , y , (x points between midpoint The
) ( ) ( ) (
) z , y , (x and ) z , y , (x points between distance The
2 1 2 1 2 1
2 2 2 1 1 1
2 1 2
2 1 2
2 1 2
2 2 2 1 1 1
z z y y x x M
z z y y x x d
Session 9 : 9/25 7
Equation of a Sphere p For a sphere centered at (h,k,l) with radius r, the equation of the sphere is:
2 2 2 2 ) ( ) ( ) ( r l z k y h x = − + − + −
Example: What is the equation of a sphere centered at (1,3,3) with radius 2?
2 2 2 2 2 ) 3 ( ) 3 ( ) 1 ( = − + − + − z y x
x
y
z
Session 9 : 9/25 8
Functions of Several Variables p Multivariable functions are evaluated by the same process as single variable function
p Example:
10 2 12 ) 1 , 2 (
) 1 ( 2 ) 2 ( 3 ) 1 , 2 (
2,1) ( at evaluated , 2 3 ) , (
2
2
= − = −
− + = −
+ =
f
f
y x y x f
2
0
2 4
2
0
2
4
0 20 40 60 80
2
0
2
x
y
f(x)
Session 9 : 9/25 9
Examples:
(3,1) at evaluated 3 ) , (
(1,1,4) at evaluated 2 3 ) , , (
2
2
T a T a G
z y x z y x f
− =
+ + − =
Session 9 : 9/25 10
Monthly Payments
t
r
r P
t r P f M 12
) 12 ( 1 1 1
12 ) , , (
+ −
⋅
= =
Monthly payment M for an installment loan P (in dollars) taken out over t years at annual interest rate of r is given by:
What would your monthly payment have to be for a car loan of $15,000 over 6 years at an annual interest rate of 3.9%
Plug in t = 6, P = 15000, and r = 0.039
99 . 233 $
) 12 039 . 0 ( 1 1 1
12 039 . 0 15000
) 6 , 039 . 0 , 15000 ( ) 6 ( 12 =
+ −
⋅
= = f M
Session 9 : 9/25 11
Partial Derivatives: Derivatives when you have more than one dependent variable
y y x f y y x f
y z
x y x f x x f
x z
y
x
∆ − ∆ +
= ∂ ∂
∆ − ∆ +
= ∂ ∂
→ ∆
→ ∆
) , ( ) , ( lim
) , ( ) ( lim
0
0
Treat y as a constant, differentiate with respect to x
Treat x as a constant, only differentiate with respect to y
Partial differential of z with respect to x
Partial differential of z with respect to y
Session 9 : 9/25 12
Notation: p For f(x,y), the partial derivative with respect to x can be written as:
[ ] ) , ( ) , ( y x f x
f y x f x f
x x ∂ ∂
= = = ∂ ∂
p For f(x,y), the partial derivative with respect to y can be written as:
[ ] ) , ( ) , ( y x f y
f y x f y f
y y ∂ ∂
= = = ∂ ∂
Session 9 : 9/25 13
What does a partial differential mean graphically?
p If we take the partial with respect to x, then we can find the slope in the xdirection at that point.
p If we take the partial with respect to y, we can find the slope in the xdirection at that point.
Session 9 : 9/25 14
Examples p Find of:
y z
x z
∂ ∂
∂ ∂ and
1 3 2 2 2 + + − = y xy x z
2 4 3 2 x x y z + + − =
A)
B)
Session 9 : 9/25 15
What does the partial derivative mean graphically?
x ∂ ∂ Evaluated at a point in a 3D coordinate system gives
you the slope in the xdirection at that point
y ∂ ∂
Evaluated at a point in a 3D coordinate system gives you the slope in the ydirection at that point
Session 9 : 9/25 17
Extrema of multivariable functions Recall that we could find extrema (minimum/maximum) of a function in two dimensions by finding where the derivative with respect to x is 0.
For multivariable functions (i.e. f(x,y)), the maxima and minima occur when the slope in both x and ydirections are 0.
0 and 0 = ∂ ∂
= ∂ ∂
y f
x f
Mathematically, the point (x o ,y 0 ) is a minimum or maximum of f(x,y) if
when evaluated at (x 0 ,y 0 )
Session 9 : 9/25 18
Example: p Find the relative extrema (critical point) of:
20 6 8 2 ) , ( 2 2 + − + + = y x y x y x f
10 5
0
5
10
10
0
10
0
200
400
600
10 5
0
5
Session 9 : 9/25 19
How do we know if maximum or minimum?
[ ] 2 ) , ( ) , ( ) , ( b a f b a f b a f d xy yy xx − =
“Second Partials Test for Relative Extrema”
If you have determined an extrema at (a,b,f(a,b)), then find d by:
Then, use the following principles to determine if f(a,b) is at a minimum, maximum or neither
determine t can' you 0 If . 4 0 if point saddle a is )) , ( , , ( . 3
0 ) , ( and 0 if maximum relative a is ) , ( . 2 0 ) , ( and 0 if minimum relative a is ) , ( . 1
= <
< >
> >
d d b a f b a
b a f d b a f b a f d b a f
xx
xx
Session 9 : 9/25 20
Using Mathematica: Quick Tutorial
Questions:
1. How can I solve for the zeroes of 2x 2 +5x +2? 2. How can I find the derivative of f(x)=3x 2 (x 4 2)(x+1) 3. How can I plot the graph of f(x,y)=3x 2 2y? 4. How can I find the integral of f(x)=2x/(x 2 +4)
Session 9 : 9/25 21
In MatLab: p Solving Solutions:
n Solve[f(x)==a]
p Finding Derivatives: n f[x_]:=Your function of x
p f’[z] evaluates the derivative of f[x] at z
p Plotting in three dimensions: n Plot3D[f(x),{x,a,b},{y,a,b}]
p Integration: n Integrate[f(x),{x,xmin,xmax}]