Sunteți pe pagina 1din 138

Calculus of Several Variables

Outline-Calculus of Several Variables

Functions of Several Variables

Partial Derivatives

Maxima and Minima of Functions of Several Variables

The Method of Least Squares

Constrained Maxima and Minima and the Method of


Lagrange Multipliers

Double Integrals
Functions of Several Variables

z
f(x, y) = x2 + y2

x2 + y2 = 16

x2 + y2 = 9
x2 + y2 = 4
x2 + y2 = 1
y
x2 + y2 = 0

x
Functions of Two Variables

A real-valued function of two variables f, consists of


1. A set A of ordered pairs of real numbers (x, y)
called the domain of the function.
2. A rule that associates with each ordered pair in
the domain of f one and only one real number,
denoted by z = f(x, y).
Examples
 Let f be the function defined by

f ( x, y )  x  xy  y 2  2

 Compute f(0, 0), f(1, 2), and f(2, 1).


Solution
f (0,0)  0  (0)(0)  02  2  2
f (1,2)  1  (1)(2)  22  2  9

f (2,1)  2  (2)(1)  12  2  7

 The domain of a function of two variables f(x, y), is a set of


ordered pairs of real numbers and may therefore be
viewed as a subset of the xy-plane.
Examples
 Find the domain of the function

f ( x, y )  x 2  y 2

Solution
 f(x, y) is defined for all real values of x and y, so the
domain of the function f is the set of all points (x, y) in the
xy-plane.
Examples
 Find the domain of the function
2
g ( x, y ) 
x y
Solution
 g(x, y) is defined for all x ≠ y, so the domain of the function
g is the set of all points (x, y) in the xy-plane except those
lying on the y = x line. y
y=x

x
Examples
 Find the domain of the function

h ( x, y )  1  x 2  y 2
Solution
 We require that 1 – x2 – y2  0 or x2 + y2  1 which is the set
of all points (x, y) lying on and inside the circle of radius 1
with center at the origin:
y

1
x2 + y2 = 1

x
–1 1

–1
Applied Example: Revenue Functions

 Acrosonic manufactures a bookshelf loudspeaker system


that may be bought fully assembled or in a kit.
 The demand equations that relate the unit price, p and q,
to the quantities demanded weekly, x and y, of the
assembled and kit versions of the loudspeaker systems are
given by
1 1 1 3
p  300  x  y and q  240  x  y
4 8 8 8
a. What is the weekly total revenue function R(x, y)?
b. What is the domain of the function R?
Applied Example: Revenue Functions
Solution
a. The weekly revenue from selling x units assembled speaker
systems at p dollars per unit is given by xp dollars.
Similarly, the weekly revenue from selling y speaker kits at
q dollars per unit is given by yq dollars.
Therefore, the weekly total revenue function R is given by
R( x, y )  xp  yq
 1 1   1 3 
 x  300  x  y   y  240  x  y 
 4 8   8 8 
1 2 3 2 1
  x  y  xy  300 x  240 y
4 8 4
Applied Example: Revenue Functions
Solution
b. To find the domain of the function R, note that the
quantities x, y, p, and q must be nonnegative, which leads
to the following system of linear inequalities:
1 1
300  x y0 Thus, the graph of the domain is:
4 8 y
1 3
240  x  y  0 300 
1 1
x y 0
8 8 2000
4 8

x0
1000 1 3
240  x  y  0
y0 8 8
D
x
1000 2000
Graphs of Functions of Two Variables
 Consider the task of locating P(1, 2, 3) in 3-space:
 One method to achieve this is to start at the origin and
measure out from there, axis by axis:

P(1, 2, 3)

3
y
1
2
x
Graphs of Functions of Two Variables
 Consider the task of locating P(1, 2, 3) in 3-space:
 Another common method is to find the xy coordinate and
from there elevate to the level of the z value:

P(1, 2, 3)

3
y
2
1 (1, 2)
x
Graphs of Functions of Two Variables
 Locate the following points in 3-space:
Q(–1, 2, 3), R(1, 2, –2), and S(1, –1, 0).
Solution

z
Q(–1, 2, 3)

y
S(1, –1, 0)

x –2
R(1, 2, –2)
Graphs of Functions of Two Variables
 The graph of a function in 3-space is a surface.
 For every (x, y) in the domain of f, there is a z value on the
surface.
z
z = f(x, y)

(x, y, z)

(x, y)
x
Level Curves

 The graph of a function of two variables is often difficult


to sketch.
 It can therefore be useful to apply the method used to
construct topographic maps.
 This method is relatively easy to apply and conveys
sufficient information to enable one to obtain a feel for the
graph of the function.
Level Curves
 In the 3-space graph we just saw, we can delineate the
contour of the graph as it is cut by a z = c plane:
z
z = f(x, y)

z=c

f(x, y) = c
x
Examples
 Sketch a contour map of the function f(x, y) = x2 + y2.
Solution
 The function f(x, y) = x2 + y2 is a revolving parabola called
a paraboloid.

z
f(x, y) = x2 + y2

x
Examples
 Sketch a contour map of the function f(x, y) = x2 + y2.
Solution
 A level curve is the graph of the equation x2 + y2 = c, which
describes a circle with radius c .

 Taking different
z values of c we obtain:
f(x, y) = x2 + y2 y
x2 + y2 = 16
4 x2 + y2 = 9
x2 + y2 = 4
x2 + y2 = 16 2 x2 + 2y2 = 1
2
x +y =0
x
–4 –2 2 4
x2 + y2 = 9
–2
x2 y2
+ =4
x2 + y2 = 1
–4
y
x2 + y 2 = 0

x
Examples
 Sketch level curves of the function f(x, y) = 2x2 – y
corresponding to z = –2, –1, 0, 1, and 2.
Solution
 The level curves are the graphs of the equation 2x2 – y = k
or for k = –2, –1, 0, 1, and 2:
y
2x2 – y = – 2
4
2x2 – y = – 1
3 2x2 – y = 0
2 2x2 – y = 1
2x2 – y = 2
1

0 x
–2 –1 1 2
–1

–2
Partial Derivatives

   f   2 f
x   2
f x  x  x

x   f   2 f

x  
y y  x  yx
2 f 2 f
f 
yx xy
   f   2 f
    When both are
f x x  y  xy continuous
y
y    f   2 f
   2
y y  y  y
First Partial Derivatives

First Partial Derivatives of f(x, y)


 Suppose f(x, y) is a function of two variables x and y.
 Then, the first partial derivative of f with respect to x
at the point (x, y) is
f f ( x  h, y )  f ( x , y )
 lim
x h0 h
provided the limit exists.
 The first partial derivative of f with respect to y at the
point (x, y) is
f f ( x, y  k )  f ( x, y )
 lim
y k 0 k
provided the limit exists.
Geometric Interpretation of the Partial Derivative

z
f f(x, y)
What does mean?
x

x
Geometric Interpretation of the Partial Derivative

z f
 slope of f ( x, b)
f f(x, y) x
What does mean?
x f(x, b)

y = b plane

b y
a
(a, b)

x
Geometric Interpretation of the Partial Derivative

z
f f(x, y)
What does mean?
y

x
Geometric Interpretation of the Partial Derivative

z
f f(x, y)
What does mean?
y
f
f(c, y)  slope of f (c, y )
y

x = c plane
d
y

c
(c, d)

x
Examples
 Find the partial derivatives ∂f/∂x and ∂f/∂y of the function

f ( x, y )  x 2  xy 2  y 3
 Use the partials to determine the rate of change of f in the
x-direction and in the y-direction at the point (1, 2) .
Solution
 To compute ∂f/∂x, think of the variable y as a constant and
differentiate the resulting function of x with respect to x:
f ( x, y )  x 2  y 2 x  y 3
f
 2x  y2
x
Examples
 Find the partial derivatives ∂f/∂x and ∂f/∂y of the function

f ( x, y )  x 2  xy 2  y 3
 Use the partials to determine the rate of change of f in the
x-direction and in the y-direction at the point (1, 2).
Solution
 To compute ∂f/∂y, think of the variable x as a constant and
differentiate the resulting function of y with respect to y:
f ( x, y )  x 2  xy 2  y 3
f
 2 xy  3 y 2
y
Examples
 Find the partial derivatives ∂f/∂x and ∂f/∂y of the function

f ( x, y )  x 2  xy 2  y 3
 Use the partials to determine the rate of change of f in the
x-direction and in the y-direction at the point (1, 2).
Solution
 The rate of change of f in the x-direction at the point (1, 2)
is given by
f
 2(1)  22  2
x (1,2)
 The rate of change of f in the y-direction at the point (1, 2)
is given by
f
 2(1)(2)  3(2)2  8
y (1,2)
Examples
 Find the first partial derivatives of the function
xy
w( x, y ) 
x2  y2
Solution
 To compute ∂w/∂x, think of the variable y as a constant and
differentiate the resulting function of x with respect to x:
xy
w( x, y )  2
x  y2

w ( x 2  y 2 ) y  xy (2 x )

x ( x 2  y 2 )2

y( y 2  x2 )
 2
( x  y 2 )2
Examples
 Find the first partial derivatives of the function
xy
w( x, y ) 
x2  y2
Solution
 To compute ∂w/∂y, think of the variable x as a constant and
differentiate the resulting function of y with respect to y:
xy
w( x, y )  2
x  y2

w ( x 2  y 2 ) x  xy (2 y )

y ( x 2  y 2 )2

x( x 2  y 2 )
 2
( x  y 2 )2
Examples
 Find the first partial derivatives of the function

g ( s, t )  ( s 2  st  t 2 )5
Solution
 To compute ∂g/∂s, think of the variable t as a constant and
differentiate the resulting function of s with respect to s:

g ( s, t )  ( s 2  st  t 2 )5

g
 5( s 2  st  t 2 )4  (2 s  t )
s

 5(2s  t )( s 2  st  t 2 )4
Examples
 Find the first partial derivatives of the function

g ( s, t )  ( s 2  st  t 2 )5
Solution
 To compute ∂g/∂t, think of the variable s as a constant and
differentiate the resulting function of t with respect to t:

g ( s, t )  ( s 2  st  t 2 )5

g
 5( s 2  st  t 2 )4  (  s  2t )
t

 5(2t  s)( s 2  st  t 2 )4
Examples
 Find the first partial derivatives of the function
u 2 v 2
h(u, v)  e
Solution
 To compute ∂h/∂u, think of the variable v as a constant and
differentiate the resulting function of u with respect to u:
u2 v 2
h(u, v)  e

h u2 v 2
e  2u
u
u 2 v 2
 2ue
Examples
 Find the first partial derivatives of the function
u 2 v 2
h(u, v)  e
Solution
 To compute ∂h/∂v, think of the variable u as a constant and
differentiate the resulting function of v with respect to v:
u2 v 2
h(u, v)  e

h u2 v 2
e  ( 2v )
u
u2 v 2
 2ve
Examples
 Find the first partial derivatives of the function

w  f ( x, y, z )  xyz  xe yz  x ln y
Solution
 Here we have a function of three variables, x, y, and z, and
we are required to compute
f f f
, ,
x y z
 For short, we can label these first partial derivatives
respectively fx, fy, and fz.
Examples
 Find the first partial derivatives of the function

w  f ( x, y, z )  xyz  xe yz  x ln y
Solution
 To find fx, think of the variables y and z as a constant and
differentiate the resulting function of x with respect to x:

w  f ( x, y, z )  xyz  xe yz  x ln y

f x  yz  e yz  ln y
Examples
 Find the first partial derivatives of the function

w  f ( x, y, z )  xyz  xe yz  x ln y
Solution
 To find fy, think of the variables x and z as a constant and
differentiate the resulting function of y with respect to y:
w  f ( x, y, z)  xyz  xe yz  x ln y
x
f y  xz  xze 
yz

y
Examples
 Find the first partial derivatives of the function

w  f ( x, y, z )  xyz  xe yz  x ln y
Solution
 To find fz, think of the variables x and y as a constant and
differentiate the resulting function of z with respect to z:

w  f ( x, y, z )  xyz  xe yz  x ln y

f z  xy  xye yz
The Cobb-Douglas Production Function

 The Cobb-Douglass Production Function is of the form

f(x, y) = axby1 – b (0 < b < 1)


where
a and b are positive constants,
x stands for the cost of labor,
y stands for the cost of capital equipment, and
f measures the output of the finished product.
The Cobb-Douglas Production Function

 The Cobb-Douglass Production Function is of the form

f(x, y) = axby1 – b (0 < b < 1)

 The first partial derivative fx is called the marginal


productivity of labor.
✦ It measures the rate of change of production with respect
to the amount of money spent on labor, with the level of
capital kept constant.
 The first partial derivative fy is called the marginal
productivity of capital.
✦ It measures the rate of change of production with respect
to the amount of money spent on capital, with the level of
labor kept constant.
Applied Example: Marginal Productivity

 A certain country’s production in the early years following


World War II is described by the function
f(x, y) = 30x2/3y1/3
when x units of labor and y units of capital were used.
 Compute fx and fy.
 Find the marginal productivity of labor and the marginal
productivity of capital when the amount expended on
labor and capital was 125 units and 27 units, respectively.
 Should the government have encouraged capital
investment rather than increase expenditure on labor to
increase the country’s productivity?
Applied Example: Marginal Productivity

f(x, y) = 30x2/3y1/3
Solution
 The first partial derivatives are
1/3
2 1/3 1/3  y
f x  30  x y  20  
3 x
2/3
1 x
f y  30 x 2/3  y 2/3  10  
3  y
Applied Example: Marginal Productivity

f(x, y) = 30x2/3y1/3
Solution
 The required marginal productivity of labor is given by
1/3
 27   3
f x (125, 27)  20    20    12
 125   5
or 12 units of output per unit increase in labor expenditure
(keeping capital constant).
 The required marginal productivity of capital is given by
2/3
 125   25 
f y (125,27)  10    10    27 79
 27   9 
or 27 7/9 units of output per unit increase in capital
expenditure (keeping labor constant).
Applied Example: Marginal Productivity

f(x, y) = 30x2/3y1/3
Solution
 The government should definitely have encouraged capital
investment.
 A unit increase in capital expenditure resulted in a much
faster increase in productivity than a unit increase in labor:
27 7/9 versus 12 per unit of investment, respectively.
Second Order Partial Derivatives

 The first partial derivatives fx(x, y) and fy(x, y) of a function


f(x, y) of two variables x and y are also functions of x and y.
 As such, we may differentiate each of the functions fx and
fy to obtain the second-order partial derivatives of f.
Second Order Partial Derivatives

 Differentiating the function fx with respect to x leads to the


second partial derivative
2 f 
f xx  2  ( f x )
x x
 But the function fx can also be differentiated with respect
to y leading to a different second partial derivative
2 f 
f xy   ( fx )
yx y
Second Order Partial Derivatives

 Similarly, differentiating the function fy with respect to y


leads to the second partial derivative
2 f 
f yy  2  ( f y )
y y

 Finally, the function fy can also be differentiated with


respect to x leading to the second partial derivative
2 f 
f yx   ( fy)
xy x
Second Order Partial Derivatives
 Thus, four second-order partial derivatives can be
obtained of a function of two variables:

   f   2 f
x   2
f x  x  x

x   f   2 f

x  
y y  x  yx
2 f 2 f
f 
yx xy
   f   2 f
    When both are
f x x  y  xy continuous
y
y    f   2 f
   2
y y  y  y
Examples
 Find the second-order partial derivatives of the function

f ( x, y )  x 3  3x 2 y  3xy 2  y 2
Solution
 First, calculate fx and use it to find fxx and fxy:

 3
f x  ( x  3x 2 y  3xy 2  y 2 )
x
 3x 2  6 xy  3 y 2

 
f xx  (3x 2  6 xy  3 y 2 ) f xy  (3x 2  6 xy  3 y 2 )
x y
 6x  6 y  6 x  6 y

 6( x  y )  6( y  x)
Examples
 Find the second-order partial derivatives of the function

f ( x, y )  x 3  3x 2 y  3xy 2  y 2
Solution
 Then, calculate fy and use it to find fyx and fyy:

 3
f y  ( x  3x 2 y  3xy 2  y 2 )
y
 3x 2  6 xy  2 y

 
f yx  ( 3x 2  6 xy  2 y ) f yy  ( 3x 2  6 xy  2 y )
x y
 6 x  6 y  6x  2
 6( y  x)  2(3x  1)
Examples
 Find the second-order partial derivatives of the function

f ( x, y )  e xy 2

Solution
 First, calculate fx and use it to find fxx and fxy:

 xy 2
f x  (e )
x
ye 2 xy 2

 2 xy 2  2 xy 2
f xx  ( y e ) f xy  ( y e )
x y
ye 4 xy 2
 2 ye xy 2
 2 xy e
3 xy 2

 2 ye (1  xy 2 )
xy 2
Examples
 Find the second-order partial derivatives of the function

f ( x, y )  e xy 2

Solution
 Then, calculate fy and use it to find fyx and fyy:

 xy 2
f y  (e )
y
 2 xye xy 2

 
f yx  (2 xye )
xy 2
f yy  (2 xye )
xy 2

x y
 2 ye xy 2
 2 xy e
3 xy 2
 2 xe xy 2
 (2 xy )(2 xy )e xy 2

 2 ye (1  xy )
xy 2 2
 2 xe (1  2 xy 2 )
xy 2
Maxima and Minima
of Functions of Several Variables

x (g, h)
(a, b) y
(c, d)
(e, f )
Relative Extrema of a Function of Two Variables

 Let f be a function defined on a region R


containing the point (a, b).
 Then, f has a relative maximum at (a, b)
if f(x, y)  f(a, b) for all points (x, y) that are
sufficiently close to (a, b).
✦ The number f(a, b) is called a relative
maximum value.
 Similarly, f has a relative minimum at (a, b)
if f(x, y)  f(a, b) for all points (x, y) that are
sufficiently close to (a, b).
✦ The number f(a, b) is called a relative
minimum value.
Graphic Example
 There is a relative maximum at (a, b).

x y
(a, b)
Graphic Example
 There is an absolute maximum at (c, d).
(It is also a relative maximum)
z

x y
(c, d)
Graphic Example
 There is a relative minimum at (e, f ).

x y

(e, f )
Graphic Example
 There is an absolute minimum at (g, h).
(It is also a relative minimum)
z

x (g, h)
y
Relative Minima
 At a minimum point of the graph of a function of two
variables, such as point (a, b) below, the plane tangent to the
graph of the function is horizontal (assuming the surface of
the graph is smooth):
z

(a, b)
x
Relative Minima
 Thus, at a minimum point, the graph of the function has a
slope of zero along a direction parallel to the x-axis:

f
( a , b)  0
x

(a, b)
x
Relative Minima
 Similarly, at a minimum point, the graph of the function
has a slope of zero along a direction parallel to the y-axis:

f
( a , b)  0
y

(a, b)
x
Relative Maxima
 At a maximum point of the graph of a function of two
variables, such as point (a, b) below, the plane tangent to the
graph of the function is horizontal (assuming the surface of
the graph is smooth):
z

y
(a, b)
x
Relative Maxima
 Thus, at a maximum point, the graph of the function has a
slope of zero along a direction parallel to the x-axis:

z
f
( a , b)  0
x

y
(a, b)
x
Relative Maxima
 Similarly, at a maximum point, the graph of the function
has a slope of zero along a direction parallel to the y-axis:

f
( a , b)  0
y

y
(a, b)
x
Saddle Point
 In the case of a saddle point, both partials are equal to zero,
but the point is neither a maximum nor a minimum.

x
Saddle Point
In the case of a saddle point, the function is at a minimum
along one vertical plane…

f
( a , b)  0
x

(a, b)
x
Saddle Point
… but at a maximum along the perpendicular vertical plane.

f
( a , b)  0
y

(a, b)
x
Extrema When Partial Derivatives are Not Defined
 A maximum (or minimum) may also occur when both partial
derivatives are not defined, such as point (a, b) in the graph
below:
z

(a, b, f(a, b))

x (a, b)
Critical Point of a Function

 A critical point of f is a point (a, b) in the domain of f


such that both
f f
( a , b)  0 and ( a , b)  0
x y

or at least one of the partial derivatives does not exist.


Determining Relative Extrema

1. Find the critical points of f(x, y) by solving the system of


simultaneous equations
fx = 0 fy = 0
2. The second derivative test: Let
D(x, y) = fxx fyy – f 2xy
3. Then,
a. D(a, b) > 0 and fxx(a, b) < 0 implies that f(x, y) has a
relative maximum at the point (a, b).
b. D(a, b) > 0 and fxx(a, b) > 0 implies that f(x, y) has a
relative minimum at the point (a, b).
c. D(a, b) < 0 implies that f(x, y) has neither a relative
maximum nor a relative minimum at the point (a, b), it
has instead a saddle point.
d. D(a, b) = 0 implies that the test is inconclusive, so some
other technique must be used to solve the problem.
Examples
 Find the relative extrema of the function

f ( x, y )  x 2  y 2
Solution
 We have fx = 2x and fy = 2y.
 To find the critical points, we set fx = 0 and fy = 0 and solve
the resulting system of simultaneous equations
2x = 0 and 2y = 0
obtaining x = 0, y = 0, or (0, 0), as the sole critical point.
 Next, apply the second derivative test to determine the
nature of the critical point (0, 0).
 We compute fxx = 2, fyy = 2, and fxy = 0,
 Thus, D(x, y) = fxx fyy – f 2xy = (2)(2) – (0)2 = 4.
Examples
 Find the relative extrema of the function

f ( x, y )  x 2  y 2
Solution
 We have D(x, y) = 4, and in particular, D(0, 0) = 4.
 Since D(0, 0) > 0 and fxx = 2 > 0, we conclude that f has a
relative minimum at the point (0, 0).
 The relative minimum value, f (0, 0) = 0, also happens to
be the absolute minimum of f.
Examples
 Find the relative extrema of the function

f ( x, y )  x 2  y 2
Solution
 The relative minimum
value, f(0, 0) = 0, also z
f(x, y) = x2 + y2
happens to be the
absolute minimum
of f:

y
Absolute
minimum
at (0, 0, 0).
x
Examples
 Find the relative extrema of the function
f ( x, y )  3x 2  4 xy  4 y 2  4 x  8 y  4
Solution
 We have f x  6x  4 y  4 and f y  4 x  8 y  8
 To find the critical points, we set fx = 0 and fy = 0 and solve
the resulting system of simultaneous equations
6x – 4y – 4 = 0 and – 4x + 8y + 8 = 0
obtaining x = 0, y = –1, or (0, –1), as the sole critical point.
 Next, apply the second derivative test to determine the
nature of the critical point (0, –1).
 We compute fxx = 6, fyy = 8, and fxy = – 4,
 Thus, D(x, y) = fxx · fyy – f 2xy = (6)(8) – (– 4)2 = 32.
Examples
 Find the relative extrema of the function
f ( x, y )  3x 2  4 xy  4 y 2  4 x  8 y  4
Solution
 We have D(x, y) = 32, and in particular, D(0, –1) = 32.
 Since D(0, –1) > 0 and fxx = 6 > 0, we conclude that f has a
relative minimum at the point (0, –1).
 The relative minimum value, f (0, –1) = 0, also happens to
be the absolute minimum of f.
Examples
 Find the relative extrema of the function
f ( x, y )  4 y 3  x 2  12 y 2  36 y  2
Solution
 We have f x  2x and f y  12 y 2  24 y  36
 To find the critical points, we set fx = 0 and fy = 0 and solve
the resulting system of simultaneous equations
2 x  0 and 12 y 2  24 y  36  0
 The first equation implies that x = 0, while the second
equation implies that y = –1 or y = 3.
 Thus, there are two critical points of f : (0, –1) and (0, 3).
 To apply the second derivative test, we calculate
fxx = 2 fyy = 24(y – 1) fxy = 0

D(x, y) = fxx · fyy – f 2xy = (2)· 24(y – 1) – (0)2 = 48(y – 1)


Examples
 Find the relative extrema of the function
f ( x, y )  4 y 3  x 2  12 y 2  36 y  2
Solution
 Apply the second derivative test to the critical point (0, –1):
 We have D(x, y) = 48(y – 1).
 In particular, D(0, –1) = 48[(–1) – 1] = – 96.
 Since D(0, –1) = – 96 < 0 we conclude that f has a saddle
point at (0, –1).
 The saddle point value is f (0, –1) = 22, so there is a saddle
point at (0, –1, 22).
Examples
 Find the relative extrema of the function
f ( x, y )  4 y 3  x 2  12 y 2  36 y  2
Solution
 Apply the second derivative test to the critical point (0, 3):
 We have D(x, y) = 48(y – 1).
 In particular, D(0, 3) = 48[(3) – 1] = 96.
 Since D(0, –1) = 96 > 0 and fxx (0, 3) = 2 > 0, we conclude that
f has a relative minimum at the point (0, 3).
 The relative minimum value, f (0, 3) = –106, so there is a
relative minimum at (0, 3, –106).
Applied Example: Maximizing Profit
 The total weekly revenue that Acrosonic realizes in
producing and selling its loudspeaker system is given by
1 2 3 2 1
R( x, y )   x  y  xy  300 x  240 y
4 8 4
where x denotes the number of fully assembled units and y
denotes the number of kits produced and sold each week.
 The total weekly cost attributable to the production of
these loudspeakers is
C( x, y )  180 x  140 y  5000
 Determine how many assembled units and how many kits
should be produced per week to maximize profits.
Applied Example: Maximizing Profit
Solution
 The contribution to Acrosonic’s weekly profit stemming
from the production and sale of the bookshelf loudspeaker
system is given by
P( x, y )  R( x, y )  C ( x, y )
 1 2 3 2 1 
   x  y  xy  300 x  240 y   (180 x  140 y  5000)
 4 8 4 
1 3 1
  x 2  y 2  xy  120 x  100 y  5000
4 8 4
Applied Example: Maximizing Profit
Solution
1 2 3 2 1
 We have P( x, y )   x  y  xy  120 x  100 y  5000
4 8 4
 To find the relative maximum of the profit function P, we
first locate the critical points of P.
 Setting Px and Py equal to zero, we obtain
1 1 3 1
Px   x  y  120  0 and Py   y  x  100  0
2 4 4 4
 Solving the system of equations we get x = 208 and y = 64.
 Therefore, P has only one critical point at (208, 64).
Applied Example: Maximizing Profit
Solution
 To test if the point (208, 64) is a solution to the problem, we
use the second derivative test.
 We compute
1 3 1
Pxx   Pyy   Pxy  
2 4 4
 So,
2
 1  3   1  3 1 5
D( x, y )             
 2  4   4  8 16 16

 In particular, D(208, 64) = 5/16 > 0.


 Since D(208, 64) > 0 and Pxx(208, 64) < 0, the point (208, 64)
yields a relative maximum of P.
Applied Example: Maximizing Profit
Solution
 The relative maximum at (208, 64) is also the absolute
maximum of P.
 We conclude that Acrosonic can maximize its weekly profit
by manufacturing 208 assembled units and 64 kits.
 The maximum weekly profit realizable with this output is

1 2 3 2 1
P( x, y )   x  y  xy  120 x  100 y  5000
4 8 4
1 3 1
P(208,64)   (208) 2  (64) 2  (208)(64)
4 8 4
 120(208)  100(64)  5000
 $10,680
The Method of Least Squares

y d5 L
10

d3
d4
5 d2

d1

x
5 10
The Method of Least Squares
 Suppose we are given the data points
P1(x1, y1), P2(x2, y2), P3(x3, y3), P4(x4, y4), and P5(x5, y5)
that describe the relationship between two variables x
and y.
 By plotting these data points, we obtain a scatter diagram:

y
P5
10 P3

P2
P4
5

P1

x
5 10
The Method of Least Squares
 Suppose we try to fit a straight line L to the data points
P1, P2, P3, P4, and P5.
 The line will miss these points by the amounts
d1, d2, d3, d4, and d5 respectively.

y d5 L
10

d3
d4
5 d2

d1

x
5 10
The Method of Least Squares
 The principle of least squares states that the straight line L
that fits the data points best is the one chosen by requiring
that the sum of the squares of d1, d2, d3, d4, and d5, that is
d12  d 22  d32  d 42  d52
be made as small as possible.

y d5 L
10

d3
d4
5 d2

d1

x
5 10
The Method of Least Squares
 Suppose the regression line L is y = f(x) = mx + b, where m
and b are to be determined.
 The distances d1, d2, d3, d4, and d5, represent the errors the
line L is making in estimating these points, so that
d1  f ( x1 )  y1 , d 2  f ( x2 )  y2 , d 3  f ( x3 )  y3 , and so on.

y d5 L
10

d3
d4
5 d2

d1

x
5 10
The Method of Least Squares
 Observe that
d12  d 22  d32  d 42  d52
 [ f ( x1 )  y1 ]2  [ f ( x2 )  y2 ]2  [ f ( x3 )  y3 ]2
 [ f ( x4 )  y4 ]2  [ f ( x5 )  y5 ]2
 [mx1  b  y1 ]2  [mx2  b  y2 ]2  [mx3  b  y3 ]2
 [mx4  b  y4 ]2  [mx5  b  y5 ]2
 This may be viewed as a function of two variables m and b.
 Thus, the least-squares criterion is equivalent to minimizing
the function
f (m, b)  (mx1  b  y1 )2  (mx2  b  y2 )2  (mx3  b  y3 )2
 (mx4  b  y4 )2  (mx5  b  y5 )2
The Method of Least Squares
 We want to minimize

f (m, b)  (mx1  b  y1 )2  (mx2  b  y2 )2  (mx3  b  y3 )2


 (mx4  b  y4 )2  (mx5  b  y5 )2
 We first find the partial derivative with respect to m:
f
 2(mx1  b  y1 ) x1  2(mx2  b  y2 ) x2  2(mx3  b  y3 ) x3
m
 2(mx4  b  y4 ) x4  2(mx5  b  y5 ) x5

 2[mx12  bx1  y1 x1  mx22  bx2  y2 x2  mx32  bx3  y3 x3


 mx42  bx4  y4 x4  mx52  bx5  y5 x5 ]

 2[( x12  x22  x32  x42  x52 )m  ( x1  x2  x3  x4  x5 )b


 ( y1 x1  y2 x2  y3 x3  y4 x4  y5 x5 )]
The Method of Least Squares
 We want to minimize

f (m, b)  (mx1  b  y1 )2  (mx2  b  y2 )2  (mx3  b  y3 )2


 (mx4  b  y4 )2  (mx5  b  y5 )2
 We now find the partial derivative with respect to b:
f
 2(mx1  b  y1 )  2(mx2  b  y2 )  2(mx3  b  y3 )
b
 2(mx4  b  y4 )  2(mx5  b  y5 )
 2[( x1  x2  x3  x4  x5 )m  5b  ( y1  y2  y3  y4  y5 )]
The Method of Least Squares
 Setting
f f
0 and 0
m b
gives
( x12  x22  x32  x42  x52 )m  ( x1  x2  x3  x4  x5 )b
 y1 x1  y2 x2  y3 x3  y4 x4  y5 x5
and
( x1  x2  x3  x4  x5 )m  5b  y1  y2  y3  y4  y5

 Solving the two simultaneous equations for m and b then


leads to an equation y = mx + b.
 This equation will be the ‘best fit’ line, or regression line for
the given data points.
The Method of Least Squares

 Suppose we are given n data points:


P1(x1, y1), P2(x2, y2), P3(x3, y3), … , Pn(xn, yn)
 Then, the least-squares (regression) line for the data
is given by the linear equation
y = f(x) = mx + b
where the constants m and b satisfy the equations
( x12  x22  x32  ...  xn2 )m  ( x1  x2  x3  ...  xn )b
 y1 x1  y2 x2  y3 x3  ...  yn xn
and
( x1  x2  x3  ...  xn )m  nb  y1  y2  y3  ...  yn
simultaneously.
 These last two equations are called normal equations.
Example
 Find the equation of the least-squares line for the data
P1(1, 1), P2(2, 3), P3(3, 4), P4(4, 3), and P5(5, 6)

y
6
5
4
3
2
1
x
1 2 3 4 5
Example
 Find the equation of the least-squares line for the data
P1(1, 1), P2(2, 3), P3(3, 4), P4(4, 3), and P5(5, 6)
Solution
 Here, we have n = 5 and
x1 = 1 x2 = 2 x3 = 3 x4 = 4 x5 = 5
y1 = 1 y2 = 3 y3 = 4 y4 = 3 y5 = 6
 Substituting in the first equation we get
( x12  x22  x32  ...  xn2 )m  ( x1  x2  x3  ...  xn )b
 y1 x1  y2 x2  y3 x3  ...  yn xn

(12  22  32  42  52 )m  (1  2  3  4  5)b
 (1)(1)  (3)(2)  (4)(3)  (3)(4)  (6)(5)
55m  15b  61
Example
 Find the equation of the least-squares line for the data
P1(1, 1), P2(2, 3), P3(3, 4), P4(4, 3), and P5(5, 6)
Solution
 Here, we have n = 5 and
x1 = 1 x2 = 2 x3 = 3 x4 = 4 x5 = 5
y1 = 1 y2 = 3 y3 = 4 y4 = 3 y5 = 6
 Substituting in the second equation we get

( x1  x2  x3  ...  xn )m  5b  y1  y2  y3  ...  yn

(1  2  3  4  5)m  5b  1  3  4  3  6

15m  5b  17
Example
 Find the equation of the least-squares line for the data
P1(1, 1), P2(2, 3), P3(3, 4), P4(4, 3), and P5(5, 6)
Solution
 Solving the simultaneous equations
55m  15b  61 15m  5b  17
gives m = 1 and b = 0.4.
 Therefore, the required least-squares line is
y = x + 0.4
Example
 Find the equation of the least-squares line for the data
P1(1, 1), P2(2, 3), P3(3, 4), P4(4, 3), and P5(5, 6)
Solution
 Below is the graph of the required least-squares line
y = x + 0.4
y
6 L

5
4
3
2
1
x
1 2 3 4 5
Applied Example: Maximizing Profit
 A market research study provided the following data
based on the projected monthly sales x (in thousands) of
an adventure movie DVD.
p 38 36 34.5 30 28.5
x 2.2 5.4 7.0 11.5 14.6

 Find the demand equation if the demand curve is the least-


squares line for these data.
 The total monthly cost function associated with producing
and distributing the DVD is given by
C(x) = 4x + 25
where x denotes the number of discs (in thousands)
produced and sold, and C(x) is in thousands of dollars.
 Determine the unit wholesale price that will maximize
monthly profits.
Applied Example: Maximizing Profit
Solution
 The calculations required for obtaining the normal
equations may be summarized as follows:

x p x2 xp
2.2 38.0 4.84 83.6
5.4 36.0 29.16 194.4
7.0 34.5 49.00 241.5
11.5 30.0 132.25 345.0
14.6 28.5 213.16 416.1
40.7 167.0 428.41 1280.6

 Thus, the nominal equations are


5b  40.7m  167 and 40.7b  428.41m  1280.6
Applied Example: Maximizing Profit
Solution
 Solving the system of linear equations simultaneously, we
find that
m  0.81 and b  39.99
 Therefore, the required demand equation is given by

p  f ( x)  0.81x  39.99 (0  x  49.37)


Applied Example: Maximizing Profit
Solution
 The total revenue function in this case is given by
R( x )  xp
 x ( 0.81x  39.99)
 0.81x 2  39.99 x
 Since the total cost function is
C(x) = 4x + 25
we see that the profit function is
P( x )  R  C
 0.81x 2  39.99 x  (4 x  25)
 0.81x 2  35.99 x  25
Applied Example: Maximizing Profit
Solution
 To find the absolute maximum of P(x) over the closed
interval [0, 49.37], we compute
P( x)  1.62 x  35.99
 Since P(x) = 0 , we find that x ≈ 22.22 as the only critical
point of P.
 Finally, from the table

x 0 22.22 49.37
P(x) –25 374.78 – 222.47

we see that the optimal wholesale price is


p  0.81(22.22)  39.99  21.99
or $21.99 per disc.
Constrained Maxima and Minima and the
Method of Lagrange Multipliers

z
f(x, y) = 2x2 + y2

h(x) = 3x2 – 2x + 1

(a, b, f(a, b))

y
(a, b)
g(x, y) = 0

x
Constrained Maxima and Minima

 In many practical optimization problems, we must


maximize or minimize a function in which the independent
variables are subjected to certain further constraints.

 We shall discuss a powerful method for determining


relative extrema of a function f(x, y) whose independent
variables x and y are required to satisfy one or more
constraints of the form g(x, y) = 0.
Example
 Find the relative minimum of f(x, y) = 2x2 +y2 subject to
the constraint g(x, y) = x + y – 1 = 0.
Solution
 Solving the constraint equation for y explicitly in terms
of x, we obtain
y=–x+1
 Substituting this value of y into f(x, y) results in a
function of x,

h( x)  2 x 2  ( x  1)2  3x 2  2 x  1
Example
 Find the relative minimum of f(x, y) = 2x2 +y2 subject to
the constraint g(x, y) = x + y – 1 = 0.
Solution
 We have
z
h(x) = 3x2 – 2x + 1. f(x, y) = 2x2 + y2

 The function h describes


the curve lying on the
graph of f on which the
constrained relative
minimum point (a, b)
of f occurs: h(x) = 3x2 – 2x + 1 (a, b, f(a, b))

y
(a, b)
g(x, y) = 0

x
Example
 Find the relative minimum of f(x, y) = 2x2 +y2 subject to
the constraint g(x, y) = x + y – 1 = 0.
Solution
 To find this point (a, b), we determine the relative extrema
of a function of one variable:
h( x)  6 x  2  2(3x  1)
1
 Setting h′ = 0 gives x = 3 as the sole critical point of h.
1
 Next, we find h″(x) = 6 and, in particular, h″( ) = 6 > 0.
3
 Therefore, by the second derivative test, the point gives
rise to a relative minimum of h.
1
 Substitute x = into the constraint equation x +y – 1 = 0 to
3
get y = 1 .
3
Example
 Find the relative minimum of f(x, y) = 2x2 +y2 subject to
the constraint g(x, y) = x + y – 1 = 0.
Solution
1 2
 Thus, the point ( 3 , 3 ) gives rise to the required constrained
relative minimum of f.
2 2
1 2 1  2 2
 Since 
f ,   2      , the required constrained
3 3 3  3 3

2 1 2
relative minimum value of f is at the point  , .
3 3 3
2
 It may be shown that is in fact a constrained absolute
3
minimum value of f.
The Method of Lagrange Multipliers

To find the relative extrema of the function f(x, y)


subject to the constraint g(x, y) = 0 (assuming that
these extreme values exist),
1. Form an auxiliary function
F ( x, y,  )  f ( x, y )   g ( x, y )
called the Lagrangian function (the variable λ is
called the Lagrange multiplier).
2. Solve the system that consists of the equations
Fx = 0 Fy = 0 Fλ = 0
for all values of x, y, and λ.
3. The solutions found in step 2 are candidates for
the extrema of f.
Example
 Using the method of Lagrange multipliers, find the
relative minimum of the function f(x, y) = 2x2 +y2 subject
to the constraint x + y = 1.
Solution
 Write the constraint equation
x+y=1
in the form
g(x, y) = x + y – 1 = 0
 Then, form the Lagrangian function

F ( x , y ,  )  f ( x, y )   g ( x , y )
 (2 x 2  y 2 )   ( x  y  1)
Example
 Using the method of Lagrange multipliers, find the
relative minimum of the function f(x, y) = 2x2 +y2 subject
to the constraint x + y = 1.
Solution
 We have F  2 x 2  y 2   ( x  y  1)
 To find the critical point(s) of the function F, solve the
system composed of the equations
Fx  4 x    0 Fy  2 y    0 F  x  y  1  0
 Solving the first and second equations for x and y in terms
of λ, we obtain
1 1
x  and y 
4 2
 Which, upon substitution into the third equation yields
1 1 4
    1  0 or 
4 2 3
Example
 Using the method of Lagrange multipliers, find the
relative minimum of the function f(x, y) = 2x2 +y2 subject
to the constraint x + y = 1.
Solution
4 1 1
 Substituting    into x    and y   
3 4 2
1 4 1 1 4 2
yields x   ( )  and y   ( ) 
4 3 3 2 3 3
2 1 2
 Therefore, x  1 and y  , and  3 , 3  results in a
3 3
constrained minimum of the function f.
Applied Example: Designing a Cruise-Ship Pool

 The operators of the Viking Princess, a luxury cruise liner,


are contemplating the addition of another swimming pool
to the ship.
 The chief engineer has suggested that an area of the form
of an ellipse located in the rear of the promenade deck
would be suitable for this purpose.
 It has been determined that the shape of the ellipse may be
described by the equation
x2 + 4y2 = 3600
where x and y are measured in feet.
 Viking’s operators would like to know the dimensions of
the rectangular pool with the largest possible area that
would meet these requirements.
Applied Example: Designing a Cruise-Ship Pool
Solution
 We want to maximize the area of the rectangle that will fit the
ellipse: y
(x, y)

x2 + 4y2 = 3600

 Letting the sides of the rectangle be 2x and 2y feet, we see that


the area of the rectangle is A = 4xy.
 Furthermore, the point (x, y) must be constrained to lie on the
ellipse so that it satisfies the equation x2 + 4y2 = 3600.
Applied Example: Designing a Cruise-Ship Pool
Solution
 Thus, the problem is equivalent to the problem of maximizing
the function
f(x, y) = 4xy
subject to the constraint
g(x, y) = x2 + 4y2 – 3600 = 0
 The Lagrangian function is

F ( x, y,  )  f ( x, y )   g ( x, y )  4 xy   ( x 2  4 y 2  3600)

 To find the critical points of F, we solve the system of


equations
Fx  4 y  2 x  0
Fy  4 x  8 y  0
F  x 2  4 y 2  3600  0
Applied Example: Designing a Cruise-Ship Pool
Solution
 We have Fx  4 y  2 x  0
Fy  4 x  8 y  0
F  x 2  4 y 2  3600  0
2y
 Solving the first equation for λ, we obtain 
x
 Which, substituting into the second equation, yields

 2y 
4x  8   y  0 or x2  4 y 2  0
 x 
 Solving for x yields x = ± 2y.
Applied Example: Designing a Cruise-Ship Pool
Solution
 We have Fx  4 y  2 x  0
Fy  4 x  8 y  0
F  x 2  4 y 2  3600  0
 Substituting x = ± 2y into the third equation, we have
4 y 2  4 y 2  3600  0
 Which, upon solving for y yields

y   450  15 2
 The corresponding values of x are
x  2 y  2(15 2)  30 2
 Since both x and y must be nonnegative, we have

x  30 2 and y  15 2
or approximately 42 ☓ 85 feet.
Double Integrals

z = f(x, y) = y

R y

x y  1  x2
A Geometric Interpretation of the Double Integral
 You may recall that we can do a Riemann sum to
approximate the area under the graph of a function of one
variable by adding the areas of the rectangles that form
below the graph resulting from small increments of x (x)
within a given interval [a, b]:

y
x

y= f(x)

x
a b
A Geometric Interpretation of the Double Integral
 Similarly, it is possible to obtain an approximation of the
volume of the solid under the graph of a function of two
variables.
z

y= f(x, y)

c d
y
a
R
b
x
A Geometric Interpretation of the Double Integral
 To find the volume of the solid under the surface, we can
perform a Riemann sum of the volume Si of parallelepipeds
with base Ri = x ☓ y and height f(xi, yi):
z

z = f(x, y)

c d
y
a
x
y
R
b
x
A Geometric Interpretation of the Double Integral
 To find the volume of the solid under the surface, we can
perform a Riemann sum of the volume Si of parallelepipeds
with base Ri = x ☓ y and height f(xi, yi):
z

z = f(x, y)

Si
c d
y
a
x
y
R
b
x
A Geometric Interpretation of the Double Integral
 To find the volume of the solid under the surface, we can
perform a Riemann sum of the volume Si of parallelepipeds
with base Ri = x ☓ y and height f(xi, yi):
z

z = f(x, y)

c d
y
a

b
x
A Geometric Interpretation of the Double Integral
 The limit of the Riemann sum obtained when the number of
rectangles m along the x-axis, and the number of subdivisions n
along the y-axis tends to infinity is the value of the double
integral of f(x, y) over the region R and is denoted by
z
  f ( x, y )dA
R

z = f(x, y)

c y ·n d
y
a
x
x ·m y
R
b
x
Theorem 1
Evaluating a Double Integral Over a Plane Region

a. Suppose g1(x) and g2(x) are continuous functions on [a, b] and


the region R is defined by R = {(x, y)| g1(x)  y  g2(x); a  x  b}.
Then,
b
 g2 ( x )
 dx
R  f ( x , y ) dA  a  g1 ( x ) f ( x , y ) dy

y

y = g2(x)

y = g1(x)

x
a b
Theorem 1
Evaluating a Double Integral Over a Plane Region

b. Suppose h1(y) and h2(y) are continuous functions on [c, d] and


the region R is defined by R = {(x, y)| h1(y)  x  h2(y); c  y  d}.
Then,
d
 h2 ( y )
 dy
R  f ( x , y ) dA  c  h1 ( y ) f ( x , y ) dx

y

R
x = h1(y) x = h2(y)

c
x
Examples
 Evaluate ∫R∫f(x, y)dA given that f(x, y) = x2 + y2 and R is the
region bounded by the graphs of g1(x) = x and g2(x) = 2x
for 0  x  2.
Solution
 The region under consideration is:

y g2(x) = 2x

4 g1(x) = x
3

2 R
1

x
1 2 3 4
Examples
 Evaluate ∫R∫f(x, y)dA given that f(x, y) = x2 + y2 and R is the
region bounded by the graphs of g1(x) = x and g2(x) = 2x
for 0  x  2.
Solution
 Using Theorem 1, we find:


2  1 3 
2x
 
f ( x, y )dA    ( x  y )dy dx    x y  y   dx
2 2x

2 2 2
0  x 
 3  x 
R 0

2  3 8 3   3 1 3  
   2 x  x    x  x   dx
0
 3   3 
2
10 3
2 5 4
 x dx  x  13 13
0 3 6 0
Examples
 Evaluate ∫R∫f(x, y)dA, where f(x, y) = xey and R is the plane
region bounded by the graphs of y = x2 and y = x.
Solution
 The region under consideration is:
 The points of intersection of
the two curves are found by y
2
solving the equation x = x,
giving x = 0 and x = 1. 1

g2(x) = x

R
g1(x) = x2
x
1
Examples
 Evaluate ∫R∫f(x, y)dA, where f(x, y) = xey and R is the plane
region bounded by the graphs of y = x2 and y = x.
Solution
 Using Theorem 1, we find:

f ( x, y )dA    2 xe dy dx    xe  2  dx
  
1 x x

1
y y
R 0
 x  0 x 
1 1
  ( xe  xe )dx  0 xe dx  0 xe dx
1 x2
x x2 x
0

1
 1 
 ( x  1)e x  e x 
2
Integrating by parts on
 2 0 the right-hand side

1  1 1
  e   1    (3  e)
2  2 2
The Volume of a Solid Under a Surface

 Let R be a region in the xy-plane and let f be


continuous and nonnegative on R.
 Then, the volume of the solid under a surface
bounded above by z = f(x, y) and below by R is
given by
V   f ( x, y )dA
R
Example
 Find the volume of the solid bounded above by the plane
z = f(x, y) = y and below by the plane region R defined by
y  1  x2 (0  x  1)
Solution
 The graph of the region R is:
 Observe that f(x, y) = y > 0 for (x, y) ∈ R.

1
y  1  x2

x
1
Example
 Find the volume of the solid bounded above by the plane
z = f(x, y) = y and below by the plane region R defined by
y  1  x2 (0  x  1)
Solution
 Therefore, the required volume is given by

1 1 x2 
V    ydA     ydy  dx
R 0
 0 


1 1
1 x 2 
11
  y 2
 dx   (1  x 2 )dx

0 2
 0 2
 0

1
1 1 3 1
 x x  
2 3 0 3
Example
 Find the volume of the solid bounded above by the plane
z = f(x, y) = y and below by the plane region R defined by
y  1  x2 (0  x  1)
Solution
z
 The graph of the solid
in question is: z = f(x, y) = y

R y

x y  1  x2
Conclusion about the Status of Neural Networks

 Most of the reported applications are


still in research stage

 No formal proofs, but they seem to


have useful applications that work
Thank you

S-ar putea să vă placă și