0% found this document useful (0 votes)
12 views173 pages

Isrt Multivariable 2020 Lagrange Multipliers

like

Uploaded by

mislam13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views173 pages

Isrt Multivariable 2020 Lagrange Multipliers

like

Uploaded by

mislam13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 173

Functions of Several Variables

Dr. Litan Kumar Saha


Associate Professor
Department of Applied Mathematics
University of Dhaka
Notation for Functions of Several Variables

Previously we have studied functions of one variable, y = f(x) in


which x was the independent variable and y was the dependent
variable. We are going to expand the idea of functions to include
functions with more than one independent variable. For example,
consider the functions below:

f x , y   2x 2  y 2
or
g x , y , z   2xe yz
or
h x1 , x2 , x3, x 4   2x1  x2  4x3  x 4
Hopefully you can see the notation for functions of several
variables is similar to the notation you’ve used with single variable
functions.

z  f x , y   2x 2  y 2
or
w  g x , y , z   2xe yz
or
h x1 , x2 , x3, x 4   2x1  x2  4x3  x 4

The function z = f(x, y) is a function of two variables. It has


independent variables x and y, and the dependent variable z.

Likewise, the function w = g(x, y, z) is a function of three


variables. The variables x, y and z are independent variables and
w is the dependent variable.

The function h is similar except there are four independent


variables.
When finding values of the several variable functions instead of
just substituting in an x-value, we will substitute in values for each
of the independent variables:

For example, using the function f on the previous slide, we will


evaluate the function f(x, y) for (2, 3) , (4, -3) and (5, y).

f x , y   2x 2  y 2

f 2,3  2  22  32  2  4  9  17

f 4,3  2  42   3  2  16  9  41
2

f 5, y   2  52  y 2  2  25  y 2  50  y 2
The operations we performed with one-variable functions can also
be performed with functions of several variables.

For example, for the two-variable functions f and g:

f  g x , y   f x , y   g x , y 

f  g x , y   f x , y   g x , y 

f  f x , y  In general we will not


 x , y   , Provided g x , y   0
g
  g x , y  consider the composition of
two multi-variable functions.
Ex 1: The volume V of a circular cylinder depends on its radius r and
its height h. In fact, we know that V =  r2h. We say that V is a
function of r and h, and we write V(r, h) =  r2h.

Ex 2: In regions with severe winter weather, the wind-chill index is


often used to describe the apparent severity of the cold.
This index W is a subjective temperature that depends on the actual
temperature T and the wind speed v.
So W is a function of T and v, and we can write W = f (T, v).

Table 1 records values of W compiled by the National Weather


Service of the US and the Meteorological Service of Canada.

For instance, the table shows that if the temperature is


–5C and the wind speed is 50 km/h, then subjectively it would feel
as cold as a temperature of about –15C with no wind.

So
f(–5, 50) = –15
Domains of Functions of Several Variables:
Unless the domain is given, assume the domain is the set of all
points for which the equation is defined.
For example, consider the functions

1
f x , y   3x 2  y 2 and g x , y  
xy

The domain of f(x,y) is the entire xy-plane. Every ordered pair in


the xy-plane will produce a real value for f.

The domain of g(x, y) is the set of all points (x, y) in the xy-plane
such that the product xy is greater than 0. This would be all the
points in the first quadrant and the third quadrant.
Example 1: Find the domain of the function: f x , y   25  x 2  y 2

Solution: The domain of f(x, y) is the set of all points that satisfy the
inequality:

25  x  y  0
2 2 or 25  x 2  y 2

You may recognize that this is similar to the equation of a circle and
the inequality implies that any ordered pair on the circle or inside
the circle x  y  25 is in the domain.
2 2

y
The highlighted area is the
domain to f.
x
Example 2: Find the domain of the function:

g x , y , z   x 2  y 2  z 2  16

Solution:
Note that g is a function of three variables, so the domain is NOT an
area in the xy-plane. The domain of g is a solid in the 3-dimensional
coordinate system.

The expression under the radical must be nonnegative, resulting in


the inequality:
x 2  y 2  z 2  16  0 or x 2  y 2  z 2  16

This implies that any ordered triple outside of the sphere centered
at the origin with radius 4 is in the domain.
Example 3: Find the domain of the function: h x , y   lnxy 

Solution:
We know the argument of the natural log must be greater than zero.

So, x  y  0

This occurs in quadrant I and quadrant III. The domain is


highlighted below. Note the x-axis and the y-axis are NOT in the
domain.
y

x
Graphs of Functions of Several Variables
As you learned in 2-dimensional space the graph of a function can be
helpful to your understanding of the function. The graph gives an
illustration or visual representation of all the solutions to the
equation. We also want to use this tool with functions of two
variables.

The graph of a function of two variables, z = f(x, y), is the set of


ordered triples, (x, y, z) for which the ordered pair, (x, y) is in the
domain.

*The graph of z = f(x, y) is a surface in 3-dimensional space.

The graph of a function of three variables, w = f(x, y, z) is the set of


all points (x, y, z, w) for which the ordered triple, (x, y, z) is in the
domain.

*The graph of w = f(x, y, z) is in 4 dimensions.

We can’t draw this graph or the graphs of any functions with 3 or


more independent variables.
Example 4: Find the domain and range of the function and then
sketch the graph.

z  f x , y   25  x 2  y 2

Solution: From Example 1 we know the domain is all ordered pairs


(x, y) on or inside the circle centered at the origin with radius 5.

All ordered pairs satisfying the inequality: x  y  25


2 2

The range is going to consist of all possible outcomes for z.


The range must be nonnegative since z equals a principle square
root and furthermore, with the domain restriction:x  y  25 ,
2 2

the value of the radicand will only vary between 0 and 25.

Thus, the range is 0  z  5 .


Solution to Example 4 Continued:
Now let’s consider the sketch of the function: z  25  x 2  y 2

Squaring both sides and simplifying: z 2


 25  x 2
 y 2

x 2  y 2  z 2  25

You may recognize this equation from Chapter 7 - A sphere with


radius 5. This is helpful to sketching the function, but we must be
careful !!

The function z  25  x 2
 y 2
and the equation x 2
 y 2
 z 2
 25

are not exactly the same. The equation does NOT represent z as a
function of x and y – meaning there is not a unique value for z for
each (x, y). Keep in mind that the function had a range of 0  z  5 ,
which means the function is only the top half of the sphere.
As you have done before when sketching a surface in 3-dimensions
it may be helpful for you to use the traces in each coordinate plane.

1. The trace in the xy-plane, z = 0, is the equation:

0  25  x 2  y 2 or x 2  y 2  25 The circle centered at the


origin with radius 5 in the xy-
plane.

2. The trace in the yz-plane, x = 0, is the equation:


The circle centered at the
z  25  y 2 or y 2  z 2  25 origin with radius 5 in the yz-
plane.

3. The trace in the xz-plane, y = 0, is the equation:


The circle centered at the
z  25  x 2
or x  z  25
2 2
origin with radius 5 in the xz-
plane.
Along with sketching the traces in each coordinate plane, it may
be helpful to sketch traces in planes parallel to the coordinate
planes.

4. Let z = 3: 3  25  x 2  y 2 or x 2  y 2  16

So on the plane z = 3, parallel to the xy-plane, the trace is a circle


centered at (0,0,3) with radius 4.

5. Let z = 4: 4  25  x 2  y 2 or x 2  y 2  9

So on the plane z = 4, parallel to the xy-plane, the trace is a circle


centered at (0,0,4) with radius 3.
Here is a SKETCH with the three traces in the coordinate planes
and the additional two traces in planes parallel to the xy-plane.

Keep in mind that this is just a sketch. It is giving you a rough


idea of what the function looks like. It may also be helpful to use
a 3-dimensional graphing utility to get a better picture.

z=4

z=3
Here is a graph of the function using the 3-dimensional
graphing utility DPGraph.
z

x
Example 5: Sketch the surface: z  9  x 2  y 2

Solution: The domain is the entire xy-plane and the range is z  9 .

1. The trace in the xy-plane, z = 0, is the equation:

x2 y2  9 Circle

2. The trace in the yz-plane, x = 0, is the equation:

z  y 2  9 Parabola

3. The trace in the xz-plane, y = 0, is the equation:

z  x 2  9 Parabola
Solution to Example 5 Continued:

Traces parallel to the xy-plane include the following two.

4. The trace in the plane, z = 5, is the equation:

5  9x2 y2
or
Circle centered at (0, 0, 5) with
x2 y2  4 radius 2.

5. The trace in the plane, z = -7, is the equation:

7  9x2 y2
or
Circle centered at (0, 0, -7) with
x  y  16
2 2
radius 4.
Here is a sketch of the traces in z
each coordinate plane.
This paraboloid extends below the
xy-plane.

z  y 2  9

z  x 2  9

x2 y2  9

x
Here’s a graph of the surface using DPGraph.
Level Curves

In the previous two examples, traces in the coordinate


planes and traces parallel to the xy-plane were used to
sketch the function of two variables as a surface in the
3-dimensional coordinate system.

When the traces parallel to the xy-plane or in other


words, the traces found when z or f(x,y) is set equal to a
constant, are drawn in the xy-plane, the traces are called
level curves. When several level curves, also called
contour lines, are drawn together in the xy-plane the
image is called a contour map.
Level Curves

A level curve f(x, y) = k is the set of all points in the domain of f at


which f takes on a given value k.
In other words, it shows where the graph of f has height k.
Level Curves
Figure 13 shows a weather map of the world indicating the
average January temperatures. The isothermals are the
curves that separate the colored bands.

World mean sea-level temperatures in January in degrees


Celsius Figure 13
Level Curves
For some purposes, a contour map is more useful than a
graph. It is true in estimating function values. Figure 19
shows some computer-generated level curves together
with the corresponding computer-generated graphs.

Figure 19
Level Curves

Figure 19(c) Figure 19(d)

Notice that the level curves in Figure 19(c) crowd together


near the origin. That corresponds to the fact that the graph
in Figure 19(d) is very steep near the origin.
Example 6: Sketch a contour map of the function in Example 4,
z  f x , y   25  x 2  y 2 using the level curves at c = 5,4,3,2,1 and 0.

Solution: c = a means the curve when z has a value of a.

c 5: 5  25  x 2  y 2  x2  y2  0  Point at 0,0 

c  4: 4  25  x 2  y 2  x2  y 2  9  Circle with r  3

c  3: 3  25  x 2  y 2  x2  y 2  16  Circle with r  4

c 2: 2  25  x 2  y 2  x2  y2  21  Circle with r  21

c 1: 1  25  x 2  y 2  x2  y 2  24  Circle with r  24

c 0: 0  25  x 2  y 2  x2  y 2  25  Circle with r  5


Solution to Example 6 Continued: Contour map with point (0, 0) for c
= 5 and then circles expanding out from the center for the remaining
values of c.

Note: The values of c were


uniformly spaced, but the level
curves are not.

When the level curves are


spaced far apart (in the center),
there is a gradual change in the
function values.

When the level curves are close


together (near c = 5), there is a
steep change in the function
values.
Example 7: Sketch a contour map of the function,z  f x , y   x  2y
2 2

using the level curves at c = 0, 2, 4, 6 and 8.

Solution: Set the function equal to each constant.

c  0 : 0  x 2  2y 2  Point at 0,0 

x2 y2
c 2: 2  x 2
 2y 2
 Ellipse :  1
2 1

x2 y2
c  4: 4 x 2
 2y 2
 Ellipse :  1
4 2

x2 y2
c  6: 6  x 2
 2y 2
 Ellipse :  1
6 3

x2 y2
c  8: 8  x 2
 2y 2
 Ellipse :  1
8 4
Solution to Example 7 Continued: Contour map with point (0, 0) for c
= 0 and then ellipses expanding out from the center for the
remaining values of c.
Example 7 Continued:

Here is a graph of the surface z  f x , y   x  2y .


2 2

z  x2  y 2
Note:

1. Sketching functions of two variables in 3-dimensions is


challenging and will take quite a bit of practice. Using the
traces and level curves can be extremely beneficial.

In the beginning, using 3-dimensional graphing utility will help


you visualize the surfaces and see how the traces and level
curves relate.

2. The idea of a level curve can be extended to functions of


three variables. If w = g(x, y, z) is a function of three
variables and k is a constant, then g(x, y, z) = k is considered a
level surface of the function g. Though we may be able to
draw the level surface, we still cannot draw the function g in 4
dimensions.
L. K. Saha
LIMITS AND CONTINUITY

L. K. Saha
LIMITS AND CONTINUITY

L. K. Saha
LIMITS AND CONTINUITY

L. K. Saha
Partial Derivatives
On a hot day, extreme humidity makes us think the
temperature is higher than it really is, whereas in very dry
air we perceive the temperature to be lower than the
thermometer indicates.

The National Weather Service has devised the heat index


(also called the temperature-humidity index, or humidex, in
some countries) to describe the combined effects of
temperature and humidity.

The heat index I is the perceived air temperature when the


actual temperature is T and the relative humidity is H.
So I is a function of T and H and we can write I = f(T, H).
Partial Derivatives
The following table of values of I is an excerpt from a table
compiled by the National Weather Service.

Heat index I as a function


of
temperature and humidity
Table 1
Partial Derivatives
If we concentrate on the highlighted column of the table,
which corresponds to a relative humidity of H = 70%, we
are considering the heat index as a function of the single
variable T for a fixed value of H. Let’s write g(T) = f(T, 70).

Then g(T) describes how the heat index I increases as the


actual temperature T increases when the relative humidity
is 70%.

The derivative of g when T = 96F is the rate of change of


I with respect to T when T = 96F:
Partial Derivatives
We can approximate g(96) using the values in Table 1 by
taking h = 2 and –2:

Averaging these values, we can say that the derivative


g(96) is approximately 3.75.
Partial Derivatives
This means that, when the actual temperature is 96F and
the relative humidity is 70%, the apparent temperature
(heat index) rises by about 3.75F for every degree that the
actual temperature rises!
Partial Derivatives
Now let’s look at the highlighted row in Table 1, which
corresponds to a fixed temperature of T = 96F.

Heat index I as a function


of
temperature and humidity
Table 1
Partial Derivatives
The numbers in this row are values of the function
G(H) = f(96, H), which describes how the heat index
increases as the relative humidity H increases when the
actual temperature is T = 96F.

The derivative of this function when H = 70% is the rate of


change of I with respect to H when H = 70%:
Partial Derivatives
By taking h = 5 and –5, we approximate G(70) using the
tabular values:

By averaging these values we get the estimate


G(70)  0.9. This says that, when the temperature is 96F
and the relative humidity is 70%, the heat index rises about
0.9F for every percent that the relative humidity rises.
Partial Derivatives
In general, if f is a function of two variables x and y,
suppose we let only x vary while keeping y fixed, say y = b,
where b is a constant.

Then we are really considering a function of a single


variable x, namely, g(x) = f(x, b). If g has a derivative at a,
then we call it the partial derivative of f with respect to x
at (a, b) and denote it by fx(a, b). Thus
Partial Derivatives
By the definition of a derivative, we have

and so Equation 1 becomes


Partial Derivatives
Similarly, the partial derivative of f with respect to y at
(a, b), denoted by fy(a, b), is obtained by keeping x fixed
(x = a) and finding the ordinary derivative at b of the
function G(y) = f(a, y):

With this notation for partial derivatives, we can write the


rates of change of the heat index I with respect to the
actual temperature T and relative humidity H when
T = 96F and H = 70% as follows:
fT (96, 70)  3.75 fH(96, 70)  0.9
Partial Derivatives
If we now let the point (a, b) vary in Equations 2 and 3,
fx and fy become functions of two variables.
Partial Derivatives
There are many alternative notations for partial derivatives.

For instance, instead of fx we can write f1 or D1f (to indicate


differentiation with respect to the first variable) or ∂f/∂x.

But here ∂f/∂x can’t be interpreted as a ratio of differentials.


Partial Derivatives
To compute partial derivatives, all we have to do is
remember from Equation 1 that the partial derivative with
respect to x is just the ordinary derivative of the function g
of a single variable that we get by keeping y fixed.

Thus we have the following rule.


Example 1
If f(x, y) = x3 + x2y3 – 2y2, find fx(2, 1) and fy(2, 1).

Solution:
Holding y constant and differentiating with respect to x,
we get
fx(x, y) = 3x2 + 2xy3
and so fx(2, 1) = 3  22 + 2  2  13 = 16

Holding x constant and differentiating with respect to y,


we get
fy(x, y) = 3x2y2 – 4y
fy(2, 1) = 3  22  12 – 4  1 = 8
Interpretations of Partial Derivatives
Interpretations of Partial Derivatives
To give a geometric interpretation of partial derivatives, we
recall that the equation z = f(x, y) represents a surface
S (the graph of f ). If f(a, b) = c, then the point P(a, b, c) lies
on S.

By fixing y = b, we are restricting our attention to the curve


C1 in which the vertical plane y = b intersects S. (In other
words, C1 is the trace of S in the plane y = b.)
Interpretations of Partial Derivatives
Likewise, the vertical plane x = a intersects S in a curve C2.
Both of the curves C1 and C2 pass through the point P.
(See Figure 1.)

Notice that the curve C1 is the


graph of the function
g(x) = f(x, b), so the slope of its
tangent T1 at P is g(a) = fx (a, b).

The curve C2 is the graph of the


The partial derivatives of f at (a, b)
function G(y) = f(a, y), so the are
the slopes of the tangents to C1 and
Figure 1
slope of its tangent T2 at P is C2.
G(b) = fy (a, b).
Interpretations of Partial Derivatives
Thus the partial derivatives fx(a, b) and fy(a, b) can be
interpreted geometrically as the slopes of the tangent lines
at P(a, b, c) to the traces C1 and C2 of S in the planes y = b
and x = a.

As we have seen in the case of the heat index function,


partial derivatives can also be interpreted as rates of
change.

If z = f(x, y), then ∂z/∂x represents the rate of change of z


with respect to x when y is fixed. Similarly, ∂z/∂y
represents the rate of change of z with respect to y when x
is fixed.
Example 2
If f(x, y) = 4 – x2 – 2y2, find fx(1, 1) and fy(1, 1) and interpret
these numbers as slopes.

Solution:
We have
fx(x, y) = –2x fy(x, y) = –4y

fx(1, 1) = –2 fy(1, 1) = –4
Example 2 – Solution cont’d

The graph of f is the paraboloid z = 4 – x2 – 2y2 and the


vertical plane y = 1 intersects it in the parabola z = 2 – x2,
y = 1. (As in the preceding discussion, we label it C1 in
Figure 2.)

The slope of the tangent line to


this parabola at the point
(1, 1, 1) is fx(1, 1) = –2.

Figure 2
Example 2 – Solution cont’d

Similarly, the curve C2 in which the plane x = 1 intersects


the paraboloid is the parabola z = 3 – 2y2, x = 1, and the
slope of the tangent line at (1, 1, 1) is fy(1, 1) = –4. (See
Figure 3.)

Figure 3
Functions of More Than Two
Variables
Functions of More Than Two Variables
Partial derivatives can also be defined for functions of three
or more variables. For example, if f is a function of three
variables x, y, and z, then its partial derivative with respect
to x is defined as

and it is found by regarding y and z as constants and


differentiating f(x, y, z) with respect to x.
Functions of More Than Two Variables
If w = f(x, y, z), then f x = ∂w/∂x can be interpreted as the
rate of change of w with respect to x when y and z are held
fixed. But we can’t interpret it geometrically because the
graph of f lies in four-dimensional space.

In general, if u is a function of n variables,


u = f(x1, x2,…, xn), its partial derivative with respect to the
ith variable xi is

and we also write


Example 5
Find fx, fy, and fz if f(x, y, z) = exy ln z.

Solution:
Holding y and z constant and differentiating with respect
to x, we have

fx = yexy ln z

Similarly,

fy = xexy ln z and fz =
Higher Derivatives
Higher Derivatives
If f is a function of two variables, then its partial derivatives
fx and fy are also functions of two variables, so we can
consider their partial derivatives (fx)x, (fx)y, (fy)x, and (fy)y,
which are called the second partial derivatives of f.
If z = f(x, y), we use the following notation:
Higher Derivatives

Thus the notation fxy (or ∂2f/∂y ∂x) means that we first
differentiate with respect to x and then with respect to y,
whereas in computing fyx the order is reversed.
Example 6
Find the second partial derivatives of
f(x, y) = x3 + x2y3 – 2y2

Solution:
In Example 1 we found that
fx(x, y) = 3x2 + 2xy3 fy(x, y) = 3x2y2 – 4y

Therefore
fxx = (3x2 + 2xy3)

= 6x + 2y3
Example 6 – Solution cont’d

fxy = (3x2 + 2xy3)

= 6xy2

fyx = (3x2y2 – 4y)

= 6xy2

fyy = (3x2y2 – 4y)

= 6x2y – 4
Higher Derivatives
Notice that fxy = fyx in Example 6. This is not just a
coincidence.

It turns out that the mixed partial derivatives fxy and fyx are
equal for most functions that one meets in practice.

The following theorem, which was discovered by the


French mathematician Alexis Clairaut (1713–1765), gives
conditions under which we can assert that fxy = fyx.
Higher Derivatives
Partial derivatives of order 3 or higher can also be defined.
For instance,

and using Clairaut’s Theorem it can be shown that


fxyy = fyxy = fyyx if these functions are continuous.
Example (Computing Partial Derivatives)

L. K. Saha
Exampe (Computing Partial Derivatives)

This gives the rate of change of temperature relative to a change in


pressure (with volume held constant).

L. K. Saha
Exercise (Computing Partial Derivatives)

1.

2.

3. Find all second-order partial derivatives of


f (x, y) = x2 y − y3 + ln x.

L. K. Saha
Exercise (Computing Partial Derivatives)

Find all second-order partial derivatives of


f (x, y) = x2 y − y3 + ln x.

L. K. Saha
Exercise (Computing Partial Derivatives)

L. K. Saha
Exercise (Computing Partial Derivatives)

L. K. Saha
Exercise (Computing Partial Derivatives)

L. K. Saha
Exercise (Computing Partial Derivatives)

L. K. Saha
Partial Differential Equations
Partial Differential Equations
Partial derivatives occur in partial differential equations that
express certain physical laws.

For instance, the partial differential equation

is called Laplace’s equation after Pierre Laplace


(1749–1827).

Solutions of this equation are called harmonic functions;


they play a role in problems of heat conduction, fluid flow,
and electric potential.
Example 8
Show that the function u(x, y) = ex sin y is a solution of
Laplace’s equation.

Solution:
We first compute the needed second-order partial
derivatives:

ux = ex sin y uy = ex cos y
uxx = ex sin y uyy = –ex sin y

So uxx + uyy = ex sin y – ex sin y = 0

Therefore u satisfies Laplace’s equation.


Partial Differential Equations
The wave equation

describes the motion of a waveform, which could be an


ocean wave, a sound wave, a light wave, or a wave
traveling along a vibrating string.
Partial Differential Equations
For instance, if u(x, t) represents the displacement of a
vibrating violin string at time t and at a distance x from one
end of the string (as in Figure 8), then u(x, t) satisfies the
wave equation.

Figure 8

Here the constant a depends on the density of the string


and on the tension in the string.
Partial Differential Equations
Partial differential equations involving functions of three
variables are also very important in science and
engineering. The three-dimensional Laplace equation is

and one place it occurs is in geophysics. If u(x, y, z)


represents magnetic field strength at position (x, y, z), then
it satisfies Equation 5. The strength of the magnetic field
indicates the distribution of iron-rich minerals and reflects
different rock types and the location of faults.
Partial Differential Equations
Figure 9 shows a contour map of the earth’s magnetic field
as recorded from an aircraft carrying a magnetometer and
flying 200 m above the surface of the ground. The contour
map is enhanced by color-coding of the regions between
the level curves.

Magnetic field strength of the


earth
Figure 9
Partial Differential Equations
Figure 10 shows a contour map for the second-order partial
derivative of u in the vertical direction, that is, uzz. It turns
out that the values of the partial derivatives uxx and uyy are
relatively easily measured from a map of the magnetic field.
Then values of uzz can be calculated from Laplace’s
equation .

Second vertical derivative of the magnetic


field
Figure 10
The Chain Rule
Recall that the Chain Rule for functions of a single variable
gives the rule for differentiating a composite function:
If y = f(x) and x = g(t), where f and g are differentiable
functions, then y is indirectly a differentiable function of t
and

For functions of more than one variable, the Chain Rule


has several versions, each of them giving a rule for
differentiating a composite function.
The Chain Rule
The first version (Theorem 2) deals with the case where
z = f(x, y) and each of the variables x and y is, in turn, a
function of a variable t.

This means that z is indirectly a function of t,


z = f(g(t), h(t)), and the Chain Rule gives a formula for
differentiating z as a function of t. We assume that f is
differentiable.
The Chain Rule
Recall that this is the case when fx and fy are continuous.

Since we often write ∂z/∂x in place of ∂f/∂x, we can rewrite


the Chain Rule in the form
Example 1
If z = x2y + 3xy4, where x = sin 2t and y = cos t, find dz/dt
when t = 0.

Solution:
The Chain Rule gives

It’s not necessary to substitute the expressions for x and y


in terms of t.
Example 1 – Solution cont’d

We simply observe that when t = 0, we have x = sin 0 = 0


and y = cos 0 = 1.

Therefore
The Chain Rule
We now consider the situation where z = f(x, y) but each of
x and y is a function of two variables s and t:
x = g(s, t), y = h(s, t).

Then z is indirectly a function of s and t and we wish to find


∂z/∂s and ∂z/∂t.

Recall that in computing ∂z/∂t we hold s fixed and compute


the ordinary derivative of z with respect to t.

Therefore we can apply Theorem 2 to obtain


The Chain Rule
A similar argument holds for ∂z/∂s and so we have proved
the following version of the Chain Rule.

Case 2 of the Chain Rule contains three types of variables:


s and t are independent variables, x and y are called
intermediate variables, and z is the dependent variable.
The Chain Rule
Notice that Theorem 3 has one term for each intermediate
variable and each of these terms resembles the
one-dimensional Chain Rule in Equation 1.

To remember the Chain Rule, it’s helpful to draw the tree


diagram in Figure 2.

Figure 2
The Chain Rule
We draw branches from the dependent variable z to the
intermediate variables x and y to indicate that z is a
function of x and y. Then we draw branches from x and y to
the independent variables s and t.

On each branch we write the corresponding partial


derivative. To find ∂z/∂s, we find the product of the partial
derivatives along each path from z to s and then add these
products:
The Chain Rule
Similarly, we find ∂z/∂t by using the paths from z to t.

Now we consider the general situation in which a


dependent variable u is a function of n intermediate
variables x1, …, xn, each of which is, in turn, a function of m
independent variables t1,…, tm.

Notice that there are n terms, one for each intermediate


variable. The proof is similar to that of Case 1.
The Chain Rule
Exercise (Computing Partial Derivatives)
The sag in a beam of length L, width w and
height h is given by

for some constant c. Show that

and

L. K. Saha
L. K. Saha
L. K. Saha
L. K. Saha
Implicit Differentiation
Implicit Differentiation
The Chain Rule can be used to give a more complete
description of the process of implicit differentiation.
We suppose that an equation of the form F(x, y) = 0
defines y implicitly as a differentiable function of x, that is,
y = f(x), where F(x, f(x)) = 0 for all x in the domain of f.

If F is differentiable, we can apply Case 1 of the Chain Rule


to differentiate both sides of the equation F(x, y) = 0 with
respect to x.

Since both x and y are functions of x, we obtain


Implicit Differentiation
But dx/dx = 1, so if ∂F/∂x ≠ 0 we solve for dy/dx and obtain

To derive this equation we assumed that F(x, y) = 0 defines


y implicitly as a function of x.
Implicit Differentiation
The Implicit Function Theorem, proved in advanced
calculus, gives conditions under which this assumption is
valid:

It states that if F is defined on a disk containing (a, b),


where F(a, b) = 0, Fy(a, b) ≠ 0, and Fx and Fy are
continuous on the disk, then the equation F(x, y) = 0
defines y as a function of x near the point (a, b) and the
derivative of this function is given by Equation 6.
Example 8
Find y if x3 + y3 = 6xy.

Solution:
The given equation can be written as
F(x, y) = x3 + y3 – 6xy = 0

so Equation 6 gives
Implicit Differentiation
Now we suppose that z is given implicitly as a function
z = f(x, y) by an equation of the form F(x, y, z) = 0.

This means that F(x, y, f(x, y)) = 0 for all (x, y) in the
domain of f. If F and f are differentiable, then we can use
the Chain Rule to differentiate the equation F(x, y, z) = 0 as
follows:
Implicit Differentiation
But and

so this equation becomes

If ∂F/∂z ≠ 0, we solve for ∂z/∂x and obtain the first formula


in Equations 7.

The formula for ∂z/∂y is obtained in a similar manner.


Implicit Differentiation

Again, a version of the Implicit Function Theorem


stipulates conditions under which our assumption is valid:

If F is defined within a sphere containing (a, b, c), where


F(a, b, c) = 0, Fz (a, b, c) ≠ 0, and Fx, Fy, and Fz are
continuous inside the sphere, then the equation
F(x, y, z) = 0 defines z as a function of x and y near the
point (a, b, c) and this function is differentiable, with partial
derivatives given by .
13.7 Maximum and Minimum Values

Dr. Litan Kumar Saha, AST105


Maximum and Minimum Values
• In this section we see how to use partial derivatives to
locate maxima and minima of functions of two variables.

• Look at the hills and valleys in the graph of f shown in


Figure 1.

Figure 1
Dr. Litan Kumar Saha, AST105
Maximum and Minimum Values
• There are two points (a, b) where f has a local maximum,
that is, where f(a, b) is larger than nearby values of f(x, y).

• The larger of these two values is the absolute maximum.



• Likewise, f has two local minima, where f(a, b) is smaller
than nearby values.

• The smaller of these two values is the absolute minimum.

Dr. Litan Kumar Saha, AST105


Maximum and Minimum Values

• If the inequalities in Definition 1 hold for all points (x, y)


in the domain of f, then f has an absolute maximum
(or absolute minimum) at (a, b).
Maximum and Minimum Values
• A point (a, b) is called a critical point (or stationary
point) of f if f x(a, b) = 0 and f y (a, b) = 0, or if one of these
partial derivatives does not exist.

• Theorem 2 says that if f has a local maximum or


minimum at (a, b), then (a, b) is a critical point of f.

• However, as in single-variable calculus, not all critical


points give rise to maxima or minima.

• At a critical point, a function could have a local maximum


or a local minimum or neither.
Dr. Litan Kumar Saha, AST105
Maximum and Minimum Values

Dr. Litan Kumar Saha, AST105


Example 1
• Let f(x, y) = x2 + y2 – 2x – 6y + 14.

• Then

• f x(x, y) = 2x – 2 f y (x, y) = 2y – 6

• These partial derivatives are equal to 0 when x = 1 and


y = 3, so the only critical point is (1, 3).

• By completing the square, we find that

• f(x, y) = 4 + (x – 1)2 + (y – 3)2


Example 1 cont’d

• Since (x – 1)2  0 and (y – 3)2  0, we have f(x, y)  4 for


all values of x and y.
• Therefore f(1, 3) = 4 is a local minimum, and in fact it is
the absolute minimum of f.
• This can be confirmed geometrically
from the graph of f, which is the
elliptic paraboloid with vertex
(1, 3, 4) shown in Figure 2.

z = x2 + y2 – 2x – 6y + 14
Figure 2

Dr. Litan Kumar Saha, AST105


Maximum and Minimum Values
• The following test, is analogous to the Second Derivative
Test for functions of one variable.

• In case (c) the point (a, b) is called a saddle point of f


and the graph of f crosses its tangent plane at (a, b).
Dr. Litan Kumar Saha, AST105
Maximum and Minimum Values
Locate all relative extrema and saddle points of

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum
Values

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum Values
• For a function f of one variable, the Extreme Value
Theorem says that if f is continuous on a closed interval
[a, b], then f has an absolute minimum value and an
absolute maximum value.

• According to the Closed Interval Method, we found these


by evaluating f not only at the critical numbers but also at
the endpoints a and b.

• There is a similar situation for functions of two variables.


Just as a closed interval contains its endpoints, a closed
set in is one that contains all its boundary points.

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum Values
• [A boundary point of D is a point (a, b) such that every
disk with center (a, b) contains points in D and also
points not in D.]

• For instance, the disk

• D = {(x, y)| x2 + y2  1}

• which consists of all points on and inside the circle


x2 + y2 = 1, is a closed set because it contains all of its
boundary points (which are the points on the circle
x2 + y2 = 1).

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum Values
• But if even one point on the boundary curve were
omitted, the set would not be closed. (See Figure 11.)

Closed sets Sets that are not closed


Figure 11(a) Figure 11(b)

• A bounded set in is one that is contained within


some disk.

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum Values
• In other words, it is finite in extent.

• Then, in terms of closed and bounded sets, we can state


the following counterpart of the Extreme Value Theorem
in two dimensions.

Dr. Litan Kumar Saha, AST105


Absolute Maximum and Minimum Values
• To find the extreme values guaranteed by Theorem 8,
we note that, by Theorem 2, if f has an extreme value at
(x1, y1), then (x1, y1) is either a critical point of f or a
boundary point of D.

• Thus we have the following extension of the Closed


Interval Method.

Dr. Litan Kumar Saha, AST105


Example 7
• Find the absolute maximum and minimum values of the
function f(x, y) = x2 – 2xy + 2y on the rectangle
D = {(x, y)|0  x  3, 0  y  2}.

• Solution:
Since f is a polynomial, it is continuous on the closed,
bounded rectangle D, so Theorem 8 tells us there is both
an absolute maximum and an absolute minimum.

• According to step 1 in , we first find the critical points.


These occur when

• fx = 2x – 2y = 0 fy = –2x + 2 = 0
Dr. Litan Kumar Saha, AST105
Example 7 – Solution cont’d

• so the only critical point is (1, 1), and the value of f there
is f(1, 1) = 1.

• In step 2 we look at the values of f on the boundary of D,


which consists of the four line segments L1, L2, L3, L4
shown in Figure 12.

Figure 12

Dr. Litan Kumar Saha, AST105


Example 7 – Solution cont’d

• On L1 we have y = 0 and

• f(x, 0) = x2 0x3

• This is an increasing function of x, so its minimum value


is f(0, 0) = 0 and its maximum value is f(3, 0) = 9.
• On L2 we have x = 3 and

• f(3, y) = 9 – 4y 0y2

• This is a decreasing function of y, so its maximum value


is f(3, 0) = 9 and its minimum value is f(3, 2) = 1.
Dr. Litan Kumar Saha, AST105
Example 7 – Solution cont’d

• On L3 we have y = 2 and

• f(x, 2) = x2 – 4x + 4 0x3

• Simply by observing that f(x, 2) = (x – 2)2, we see that


the minimum value of this function is f(2, 2) = 0 and the
maximum value is f(0, 2) = 4.

Dr. Litan Kumar Saha, AST105


Example 7 – Solution cont’d

• Finally, on L4 we have x = 0 and

• f(0, y) = 2y 0y2

• with maximum value f(0, 2) = 4 and minimum value


f(0, 0) = 0.

• Thus, on the boundary, the minimum value of f is 0 and


the maximum is 9.

Dr. Litan Kumar Saha, AST105


Example 7 – Solution cont’d

• In step 3 we compare these values with the value


f(1, 1) = 1 at the critical point and conclude that the
absolute maximum value of f on D is f(3, 0) = 9 and the
absolute minimum value is f(0, 0) = f(2, 2) = 0.

• Figure 13 shows the graph of f.

f(x, y) = x2 – 2xy + 2y
Figure 13
Dr. Litan Kumar Saha, AST105
13.8 Lagrange Multipliers

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• In this section we present Lagrange’s method for
maximizing or minimizing a general function f(x, y, z)
subject to a constraint (or side condition) of the form
g(x, y, z) = k.

• It’s easier to explain the geometric basis of Lagrange’s


method for functions of two variables. So we start by
trying to find the extreme values of f(x, y) subject to a
constraint of the form g(x, y) = k.

• In other words, we seek the extreme values of f(x, y)


when the point (x, y) is restricted to lie on the level curve
g(x, y) = k.
Dr. Litan Kumar Saha, AST105
Lagrange Multipliers
• Figure 1 shows this curve together with several level
curves of f.

Figure 1

• These have the equations f(x, y) = c, where c = 7, 8, 9,


10, 11.
Dr. Litan Kumar Saha, AST105
Lagrange Multipliers
• To maximize f(x, y) subject to g(x, y) = k is to find the
largest value of c such that the level curve f(x, y) = c
intersects g(x, y) = k.

• It appears from Figure 1 that this happens when these


curves just touch each other, that is, when they have a
common tangent line. (Otherwise, the value of c could be
increased further.)

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• This means that the normal lines at the point (x0, y0)
where they touch are identical. So the gradient vectors
are parallel; that is, f(x0, y0) =  g(x0, y0) for some
scalar .

• This kind of argument also applies to the problem of


finding the extreme values of f(x, y, z) subject to the
constraint
g(x, y, z) = k.

• Thus the point (x, y, z) is restricted to lie on the level


surface S with equation g(x, y, z) = k.

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• Instead of the level curves in Figure 1, we consider the
level surfaces f(x, y, z) = c and argue that if the
maximum value of f is f(x0, y0, z0) = c, then the level
surface
f(x, y, z) = c is tangent to the level surface g(x, y, z) = k
and so the corresponding gradient vectors are parallel.

Figure 1

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• This intuitive argument can be made precise as follows.
Suppose that a function f has an extreme value at a
point P(x0, y0, z0) on the surface S and let C be a curve
with
vector equation r(t) = x(t), y(t), z(t) that lies on S and
passes through P.

• If t0 is the parameter value corresponding to the point P,


then r(t0) = x0, y0, z0.

• The composite function h(t) = f(x(t), y(t), z(t)) represents


the values that f takes on the curve C.

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• Since f has an extreme value at (x0, y0, z0), it follows that
h has an extreme value at t0, so h(t0) = 0. But if f is
differentiable, we can use the Chain Rule to write
• 0 = h(t0)
• = fx(x0, y0, z0)x(t0) + fy(x0, y0, z0)y(t0) + fz(x0, y0, z0)z(t0)
• = f(x0, y0, z0)  r(t0)

• This shows that the gradient vector f(x0, y0, z0) is


orthogonal to the tangent vector r(t0) to every such
curve C. But we already know that the gradient vector of
g,
g(x0, y0, z0), is also orthogonal to r(t0) for every such
curve.
Dr. Litan Kumar Saha, AST105
Lagrange Multipliers
• This means that the gradient vectors f(x0, y0, z0) and
g(x0, y0, z0) must be parallel. Therefore, if
g(x0, y0, z0)  0, there is a number  such that

• The number  in Equation 1 is called a Lagrange


multiplier.

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• The procedure based on Equation 1 is as follows.

Dr. Litan Kumar Saha, AST105


Lagrange Multipliers
• If we write the vector equation f =  g in terms of
components, then the equations in step (a) become

• fx = gx fy = gy fz = gz g(x, y, z) = k

• This is a system of four equations in the four unknowns


x, y, z, and , but it is not necessary to find explicit
values
for .

• For functions of two variables the method of Lagrange


multipliers is similar to the method just described.
Dr. Litan Kumar Saha, AST105
Lagrange Multipliers
• To find the extreme values of f(x, y) subject to the
constraint g(x, y) = k, we look for values of x, y, and 
such that

• f(x, y) =  g(x, y) and g(x, y) = k

• This amounts to solving three equations in three


unknowns:

• fx = gx fy = gy g(x, y) = k

Dr. Litan Kumar Saha, AST105


Example 1 – Maximizing a volume using Lagrange multipliers

• A rectangular box without a lid is to be made from 12 m2


of cardboard. Find the maximum volume of such a box.

• Solution:
Let x, y, and z be the length, width, and height,
respectively, of the box in meters.

• Then we wish to maximize

• V = xyz

• subject to the constraint

• g(x, y, z) = 2xz + 2yz + xy = 12

Dr. Litan Kumar Saha, AST105


Example 1 – Solution
• Using the method of Lagrange multipliers, we look for
values of x, y, z, and  such that V =  g and
g(x, y, z) = 12.

• This gives the equations

• Vx = gx

• Vy = gy

• Vz = gz

• 2xz + 2yz + xy = 12

Dr. Litan Kumar Saha, AST105


Example 1 – Solution
• Which become
• yz = (2z + y)

• xz = (2z + x)

• xy = (2x + 2y)

• 2xz + 2yz + xy = 12

Dr. Litan Kumar Saha, AST105


Example 1 – Solution
• There are no general rules for solving systems of
equations. Sometimes some ingenuity is required.
• In the present example you might notice that if we
multiply
by x, by y, and by z, then the left sides of these
equations will be identical.
• Doing this, we have
• xyz = (2xz + xy)

• xyz = (2yz + xy)

• xyz = (2xz + 2yz)


Dr. Litan Kumar Saha, AST105
Example 1 – Solution
• We observe that   0 because  = 0 would imply
yz = xz = xy = 0 from , , and and this would
contradict

• Therefore, from and we have


• 2xz + xy = 2yz + xy
• which gives xz = yz.

• But z  0 (since z = 0 would give V = 0), so x = y.

Dr. Litan Kumar Saha, AST105


Example 1 – Solution
• From and we have

• 2yz + xy = 2xz + 2yz


• which gives 2xz = xy and so (since x  0) y = 2z.

• If we now put x = y = 2z in we get

• 4z2 + 4z2 + 4z2 = 12

• Since x, y, and z are all positive, we therefore have z = 1


and so x = 2 and y = 2.

Dr. Litan Kumar Saha, AST105


Example
Find the points on the sphere x2 + y2 + z2 = 36 that are
closest to and farthest from the point (1, 2, 2).

Dr. Litan Kumar Saha, AST105


Two Constraints

Dr. Litan Kumar Saha, AST105


Two Constraints
• Suppose now that we want to find the maximum and
minimum values of a function f(x, y, z) subject to two
constraints (side conditions) of the form g(x, y, z) = k and
h(x, y, z) = c.

• Geometrically, this means that


we are looking for the extreme
values of f when (x, y, z) is
restricted to lie on the curve of
intersection C of the level
surfaces g(x, y, z) = k and
h(x, y, z) = c. (See Figure 5.)
Figure 5

Dr. Litan Kumar Saha, AST105


Two Constraints
• Suppose f has such an extreme value at a point
P(x0, y0, z0). We know from the beginning of this section
that f is orthogonal to C at P.

• But we also know that g is orthogonal to g(x, y, z) = k


and h is orthogonal to h(x, y, z) = c, so g and h are
both orthogonal to C.

• This means that the gradient vector f(x0, y0, z0) is in the
plane determined by g(x0, y0, z0) and h(x0, y0, z0). (We
assume that these gradient vectors are not zero and not
parallel.)
Dr. Litan Kumar Saha, AST105
Two Constraints
• So there are numbers  and  (called Lagrange
multipliers) such that

• In this case Lagrange’s method is to look for extreme


values by solving five equations in the five unknowns
x, y, z, , and .

Dr. Litan Kumar Saha, AST105


Two Constraints
• These equations are obtained by writing Equation 16 in
terms of its components and using the constraint
equations:

• fx = gx + hx

• fy = gy + hy

• fz = gz + hz

• g(x, y, z) = k

• h(x, y, z) = c
Dr. Litan Kumar Saha, AST105
Example 5 – A maximum problem with two constraints

• Find the maximum value of the function


f(x, y, z) = x + 2y + 3z on the curve of intersection of the
plane x – y + z = 1 and the cylinder x2 + y2 = 1.

• Solution:
• We maximize the function f(x, y, z) = x + 2y + 3z subject
to the constraints g(x, y, z) = x – y + z = 1 and
h(x, y, z) = x2 + y2 = 1.

Dr. Litan Kumar Saha, AST105


Example 5 – Solution cont’
d
• The Lagrange condition is f =  g +  h, so we solve
the equations
• 1 =  + 2x

• 2 = – + 2y

• 3=

• x–y+z=1

• x2 + y2 = 1

• Putting  = 3 [from ] in , we get 2x = –2, so x = –


1/. Similarly, gives y = 5/(2).
Example 5 – Solution cont’
d
• Substitution in then gives

• and so  2 = ,= .

• Then x = y= and, from


• z=1–x+y=1 .

Dr. Litan Kumar Saha, AST105


Example 5 – Solution cont’
d
• The corresponding values of f are

• Therefore the maximum value of f on the given curve is

Dr. Litan Kumar Saha, AST105

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy