The ThreeDimensional Coordinate System
Functions of Several Variables
Partial Derivatives
Finding Extrema (Max/Min of multivariable
functions)
Session 9 : 9/25 1
Multivariable Functions
p So far, we have been working with functions of two dimensions (one
dependent variable, one independent variable)
Examples: y = 2 x + 1
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:
P ( t , T , w )
Session 9 : 9/25 2
Examples:
D( r , t ) = r × t
Ideal Gas Law :
n = moles
T = temperature
nRT p = pressure
V ( n , T , p ) = R = gas constant
p
Notice that V is not a function of R, because R is a constant.
Session 9 : 9/25 3
Understanding Multivariable Functions Graphically:
The 3-D Coordinate System
y
Now, we have to define
points in 3dimensions.
e xyplane
a n
l
z p
y
x
xzplane
Session 9 : 9/25 4
Points in 3 Dimensions
y
4
3
(1,3,3) 2
4
1 3 (4,0,3)
2
3 2 1 2 3 4
x
1
2 1
(0,0,4) 3
4 2
z 3
Session 9 : 9/25 5
Distance and Midpoint Formulas
The distance between points (x 1 , y 1 , z 1 ) and (x 2 , y 2 , z 2 )
2 2 2
d = ( x 2 - x 1 ) + ( y 2 - y 1 ) + ( z 2 - z 1 )
The midpoint between points (x 1 , y 1 , z 1 ) and (x 2 , y 2 , z 2 )
æ x 1 + x 2 y 1 + y 2 z 1 + z 2 ö
M = ç , , ÷
è 2 2 2 ø
Session 9 : 9/25 6
Equation of a Sphere
p For a sphere centered at (h,k,l) with radius r, the
equation of the sphere is:
( x - h ) 2 + ( y - k ) 2 + ( z - l ) 2 = r 2
Example: What is the equation of a sphere centered at (1,3,3)
with radius 2? y
x
Session 9 : 9/25 7
Functions of Several Variables
p Multivariable functions are evaluated by the same process
as single variable function
p Example:
f ( x , y ) = 3 x 2 + 2 y , evaluated at ( 2,1)
2
f ( x , y , z ) = - x + 3 y + 2 z evaluated at (1,1,4)
2 3
G ( a , T ) = a - evaluated at (3,1)
T
Session 9 : 9/25 9
Monthly Payments
Monthly payment M for an installment loan P (in dollars) taken
out over t years at annual interest rate of r is given by:
P × r
M = f ( P , r , t ) = 12
12 t
é 1 ù
1 - ê ú
ê1 + ( r ) ú
ë 12 û
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
15000 × 0 . 039
M = f ( 15000 , 0 . 039 , 6 ) = 12 = $ 233 . 99
12 ( 6 )
é 1 ù
1 - ê ú
ê1 + ( 0 . 039 ) ú
ë 12 û
Session 9 : 9/25 10
Partial Derivatives: Derivatives when you
have more than one dependent variable
Partial differential of z with respect to x
Partial differential of z with respect to y
Session 9 : 9/25 11
Notation:
p For f(x,y), the partial derivative with respect to
x can be written as:
¶f ¶
= f x ( x , y ) = f x = [ f ( x , y ) ]
¶x ¶x
p For f(x,y), the partial derivative with respect to
y can be written as:
¶f ¶
= f y ( x , y ) = f y = [ f ( x , y ) ]
¶y ¶y
Session 9 : 9/25 12
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 13
Examples
¶ z ¶z
and
p Find of:
¶x ¶y
2 2
A) z = 2 x - xy + 3 y + 1
2
B) z = 2 - 3 y + x + 4 x
Session 9 : 9/25 14
What does the partial derivative mean
graphically?
¶ Evaluated at a point in a 3D coordinate system gives
you the slope in the xdirection at that point
¶x
¶ Evaluated at a point in a 3D coordinate system gives
you the slope in the ydirection at that point
¶y
Session 9 : 9/25 15
Graphically:
y
Slope in ydirection
Slope in xdirection
x
z
Session 9 : 9/25 16
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.
Mathematically, the point (x o ,y 0 ) is a minimum or maximum of f(x,y) if
¶ f ¶f
=0 and = 0
¶x ¶y
when evaluated at (x 0 ,y 0 )
Session 9 : 9/25 17
Example:
p Find the relative extrema (critical point) of:
2 2
f ( x , y ) = 2 x + y + 8 x - 6 y + 20
600
400
200 10
0
10 0
5
0
Session 9 : 9/25
10 18
5
5
10
How do we know if maximum or minimum?
“Second Partials Test for Relative Extrema”
If you have determined an extrema at (a,b,f(a,b)), then find d by:
[
d = f xx ( a , b ) f yy ( a , b ) - f xy ( a , b ) ] 2
Then, use the following principles to determine if
f(a,b) is at a minimum, maximum or neither
Session 9 : 9/25 19
Using Mathematica: Quick Tutorial
Questions:
Session 9 : 9/25 20
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}]
Session 9 : 9/25 21
Tomorrow:
p Trigonometric Functions, their derivatives
and integrals
Session 9 : 9/25 22