SlideShare a Scribd company logo
1 of 37
Download to read offline
Lesson 28 (Sections 18.2–5)
                Lagrange Multipliers II

                          Math 20


                     November 28, 2007


Announcements
   Problem Set 11 assigned today. Due December 5.
   next OH: Today 1–3 (SC 323)
   Midterm II review: Tuesday 12/4, 7:30-9:00pm in Hall E
   Midterm II: Thursday, 12/6, 7-8:30pm in Hall A
Outline

   A homework problem

   Restating the Method of Lagrange Multipliers
      Statement
      Justifications

   Second order conditions
      Compact feasibility sets
      Ad hoc arguments
      Analytic conditions

   Example: More than two variables

   More than one constraint
Problem 17.1.10

   Problem
   Maximize the quantity f (x, y , z) = Ax a y b z c subject to the
   constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are
   positive constants.)
Problem 17.1.10

   Problem
   Maximize the quantity f (x, y , z) = Ax a y b z c subject to the
   constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are
   positive constants.)

   Solution (By elimination)
   Solving the constraint for z in terms of x and y , we get
                                    m − px − qy
                             z=
                                         r
   So we optimize the unconstrained function
                                  Aab
                                     x y (m − px − qy )c
                    f (x, y ) =
                                  rc
We have
∂f (x, y )   A
           = c ax a−1 y b (m − px − qy )c + x a y b c(m − px − qy )c−1 (−p)
    x       r
             A
           = c x a−1 y b (m − px − qy )c−1 [a(m − px − qy ) − cpx]
            r
Likewise
 ∂f (x, y )   A
            = c x a y b−1 (m − px − qy )c−1 [b(m − px − qy ) − cqy ]
     y       r
So throwing out the critical points where x = 0, y = 0, or z = 0
(these give minimal values of f , not maximal), we get

                      (a + c)px + aqy = am
                      bpx + (b + c)qy = bm
This is a fun exercise in Cramer’s Rule:
                       am    aq                  1  1
                                           amq
                       bm (b + c)q               b b+c
          x=                       =
               (a + c)p     aq           a+c  a
                                      pq
                  bp     (b + c)q          b b+c
                    amqc           m     a
            =                    =
              pq(ac + bc + c 2 )   p a+b+c

It follows that
                       m   b               m   c
                  y=                 z=
                       q a+b+c             r a+b+c
If this is a utility-maximization problem subject to fixed budget,
the portion spent on each good ( px , for instance) is the relative
                                    m
                                                  a
degree to which that good multiplies utility ( a+b+c ).
Outline

   A homework problem

   Restating the Method of Lagrange Multipliers
      Statement
      Justifications

   Second order conditions
      Compact feasibility sets
      Ad hoc arguments
      Analytic conditions

   Example: More than two variables

   More than one constraint
Theorem (The Method of Lagrange Multipliers)
Let f (x1 , x2 , . . . , xn ) and g (x1 , x2 , . . . , xn ) be functions of several
variables. The critical points of the function f restricted to the set
g = 0 are solutions to the equations:
  ∂f                              ∂g
      (x1 , x2 , . . . , xn ) = λ     (x1 , x2 , . . . , xn ) for each i = 1, . . . , n
  ∂xi                             ∂xi
    g (x1 , x2 , . . . , xn ) = 0.

Note that this is n + 1 equations in n + 1 variables x1 , . . . , xn , λ.
Graphical Justification
   In two variables, the critical points of f restricted to the level curve
   g = 0 are found when the tangent to the the level curve of f is
   parallel to the tangent to the level curve g = 0.
These tangents have slopes

                dy            fx       dy            gx
                         =−                     =−
                                 and
                dx            fy       dx            gy
                     f                      g
These tangents have slopes

                dy            fx         dy            gx
                         =−                       =−
                                 and
                dx            fy         dx            gy
                     f                        g

So they are equal when

                                   fy
                     fx  g     f
                        = x =⇒ x =
                     fy  gy    gx  gy
or

                              fx = λgx
                              fy = λgy
Symbolic Justification


   Suppose that we can use the relation g (x1 , . . . , xn ) = 0 to solve for
   xn in terms of the the other variables x1 , . . . , xn−1 , after making
   some choices. Then the critical points of f (x1 , . . . , xn ) are
   unconstrained critical points of f (x1 , . . . , xn (x1 , . . . , xn−1 )).

                               f


               x1        x2                   xn
                                   ···


                                                           xn−1
                              x1         x2        ···
Now for any i = 1, . . . , n − 1,

                           ∂f            ∂f    ∂f    ∂xn
                                     =       +
                           ∂xi           ∂xi   ∂xn   ∂xi
                                 g                         g
                                       ∂f    ∂f ∂g /∂xi
                                           −
                                     =
                                       ∂xi   ∂xn ∂g /∂xn

     ∂f
If             = 0, then
     ∂xi   g

                ∂f /∂xi   ∂g /∂xi    ∂f /∂xi   ∂f /∂xn
                                  ⇐⇒
                        =                    =
                ∂f /∂xn   ∂g /∂xn    ∂g /∂xi   ∂g /∂xn

                  ∂f     ∂g
So as before,         =λ     for all i.
                  ∂xi    ∂xi
Another perspective

   To find the critical points of f subject to the constraint that
   g = 0, create the lagrangian function

                L = f (x1 , x2 , . . . , xn ) − λg (x1 , x2 , . . . , xn )

   If L is restricted to the set g = 0, L = f and so the constrained
   critical points are unconstrained critical points of L . So for each i,
                          ∂L         ∂f     ∂g
                              = 0 =⇒     =λ     .
                          ∂xi        ∂xi    ∂xi
   But also,
                    ∂L
                       = 0 =⇒ g (x1 , x2 , . . . , xn ) = 0.
                    ∂λ
Outline

   A homework problem

   Restating the Method of Lagrange Multipliers
      Statement
      Justifications

   Second order conditions
      Compact feasibility sets
      Ad hoc arguments
      Analytic conditions

   Example: More than two variables

   More than one constraint
Second order conditions




   The Method of Lagrange Multipliers finds the constrained critical
   points, but doesn’t determine their “type” (max, min, neither).
   So what then?
A dash of topology
Cf. Sections 17.2–3



    Definition
    A subset of Rn is called closed if it includes its boundary.
A dash of topology
Cf. Sections 17.2–3



    Definition
    A subset of Rn is called closed if it includes its boundary.




                                 x2 + y2 ≤ 1
      x2 + y2 ≤ 1                                                 y ≥0
                                  not closed                      closed
         closed

    Basically, if a subset is described by ≤ or ≥ inequalities, it is closed.
Definition
A subset of Rn is called bounded if it is contained within some
ball centered at the origin.




                           x2 + y2 ≤ 1
x2 + y2 ≤ 1                                             y ≥0
                            bounded                  not bounded
 bounded
Definition
A subset of Rn is called compact if it is closed and bounded.




                          x2 + y2 ≤ 1
x2 + y2 ≤ 1                                             y ≥0
                          not compact                not compact
  compact
Optimizing over compact sets




   Theorem (Compact Set Method)
   To find the extreme values of function f on a compact set D of
   Rn , it suffices to find
       the (unconstrained) critical points of f “inside” D
       the (constrained) critical points of f on the “boundary” of D.
Ad hoc arguments




  If D is not compact, sometimes it’s still easy to argue that as x
  gets farther away, f becomes larger, or smaller, so the critical
  points are “obviously” maxes, or mins.
Ad hoc arguments




  If D is not compact, sometimes it’s still easy to argue that as x
  gets farther away, f becomes larger, or smaller, so the critical
  points are “obviously” maxes, or mins.
  (Example later)
Analytic conditions
Recall Equation 16.13, cf. Section 18.4


          For the two-variable constrained optimization problem, we
          have (look in the book if you want the gory details):

                                                           Lλλ Lλx    Lλy
                          0          gx           gy
             d 2f
                                              fxy − λgxy = Lxλ Lxx    Lxy
                                     − λgxx
                        = gx   fxx
             dx 2
                                                           Ly λ Lyx   Lyy
                    g                − λgyx   gyy − λgyy
                          gy   fyx

          The critical point is a local max if this determinant is
          negative, and a local min if this is positive.
          The matrix on the right is the Hessian of the Lagrangian. But
          there is still a distinction between this and the unconstrained
          case. The constrained extrema are critical points of the
          Lagrangian, not extrema.
          Don’t worry too much about this!
Outline

   A homework problem

   Restating the Method of Lagrange Multipliers
      Statement
      Justifications

   Second order conditions
      Compact feasibility sets
      Ad hoc arguments
      Analytic conditions

   Example: More than two variables

   More than one constraint
Problem 17.1.10

   Problem
   Maximize the quantity f (x, y , z) = Ax a y b z c subject to the
   constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are
   positive constants.)
Problem 17.1.10

   Problem
   Maximize the quantity f (x, y , z) = Ax a y b z c subject to the
   constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are
   positive constants.)

   Solution
   The Lagrange equations are

                            Aax a−1 y b z c = λp
                            Abx a y b−1 z c = λq
                            Acx a y b z c−1 = λr


   We rule out any solution with x, y , z, or λ equal to 0 (they will
   minimize f , not maximize it).
Dividing the first two equations gives
                      ay   p        bp
                         =   =⇒ y =    x
                      bx   q        aq
Dividing the first and last equations gives
                      az   p       cp
                         =   =⇒ z = x
                      cx   r       ar
Plugging these into the equation of constraint gives
                 bp    cp            m   a
          px +      x + x = m =⇒ x =
                  a     a            p a+b+c
Outline

   A homework problem

   Restating the Method of Lagrange Multipliers
      Statement
      Justifications

   Second order conditions
      Compact feasibility sets
      Ad hoc arguments
      Analytic conditions

   Example: More than two variables

   More than one constraint
General method for more than one constraint

   If we are optimizing f (x1 , . . . , xn ) subject to gj (x1 , . . . , xn ) ≡ 0,
   j = 1, . . . , m we need multiple lambdas for them. The new
   Lagrangian is
                                                            m
            L (x1 , . . . , xn ) = f (x1 , . . . , xn ) −         λj gj (x1 , . . . , xn )
                                                            j=1

                                   ∂L                 ∂L
   The conditions are that               = 0 and            = 0 for all i and j. In
                                   ∂xi                ∂λj
   other words,
                             ∂f        ∂g1              ∂gm
                                           + · · · + λm
                                  = λ1                                           (all i)
                            ∂xi        ∂xi              ∂xi
            gj (x1 , . . . , xn ) = 0                                            (all j)
Example
Find the minimum distance between the curves xy = 1 and
x + 2y = 1.
Example
Find the minimum distance between the curves xy = 1 and
x + 2y = 1.
Reframing this, we can minimize

                f (x, y , u, v ) = (x − u)2 + (y − v )2

subject to the constraints

               xy − 1 = 0                  u + 2v = 1.
•
•
    •
                •   xy = 1
            •
•
    •           •
                    x + 2y = 1
The Lagrangian is

     L = (x − u)2 + (y − v )2 − λ(xy − 1) − µ(u + 2v − 1)

So the Lagrangian equations are

           2(x − u) = λy             −2(x − u) = µ
           2(y − v ) = λx            −2(y − v ) = 2µ

Dividing the two λ equations and the two µ equations gives
              x −u                     x −u
                     y                       1
                   =                        =.
              y −v                     y −v
                     x                       2
Since the left-hand-sides are the same, we have 2y =√ Since
                                                    x.
                                √        1                    1
                                        √ , or x = − 2, y = − √
xy = 1, we can say either x = 2, y = 2                          2
√            1
Suppose x =       2, y =   √.   Then
                            2
                  √                      √
                     2−u   1             32
                             =⇒ 2u − v =
                         =
                    1      2             2
                   √ −v
                     2

This along with u + 2v = 1 gives
                         √                      √
                 1                    1
                                          4−3 2
           u=       1+3 2        v=
                 5                   10
                          √         1
If we instead choose x = − 2, y = − √2 , we get

                        √
                   1                        1      3
                                                2+ √
                     1−3 2
              u=                       v=
                   5                        5        2
√
              1
                9−4 2
              5

          •       •
                        xy = 1
              •
     •

                        x + 2y = 1
     √
1
  9+4 2
5
Because f gets larger as x, y , u, and v get larger, the absolute
minimum is the smaller of these two critical values. So the
                               √
                     1
minimum distance is 5 9 − 4 2 .

More Related Content

What's hot

3.1 derivative of a function
3.1 derivative of a function3.1 derivative of a function
3.1 derivative of a function
btmathematics
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.pps
indu psthakur
 

What's hot (20)

Mathematics and History of Complex Variables
Mathematics and History of Complex VariablesMathematics and History of Complex Variables
Mathematics and History of Complex Variables
 
3.1 derivative of a function
3.1 derivative of a function3.1 derivative of a function
3.1 derivative of a function
 
Lesson 11 plane areas area by integration
Lesson 11 plane areas area by integrationLesson 11 plane areas area by integration
Lesson 11 plane areas area by integration
 
Rational equations
Rational equationsRational equations
Rational equations
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.pps
 
DERIVADA INTRODUCCION (1).pptx
DERIVADA INTRODUCCION (1).pptxDERIVADA INTRODUCCION (1).pptx
DERIVADA INTRODUCCION (1).pptx
 
Lesson 14: Exponential Functions
Lesson 14: Exponential FunctionsLesson 14: Exponential Functions
Lesson 14: Exponential Functions
 
the inverse of the matrix
the inverse of the matrixthe inverse of the matrix
the inverse of the matrix
 
Lesson 1 derivative of trigonometric functions
Lesson 1 derivative of trigonometric functionsLesson 1 derivative of trigonometric functions
Lesson 1 derivative of trigonometric functions
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite Integral
 
Application of definite integrals
Application of definite integralsApplication of definite integrals
Application of definite integrals
 
Ch 3 the derivative
Ch 3 the derivativeCh 3 the derivative
Ch 3 the derivative
 
Quadratic Function.pptx
Quadratic Function.pptxQuadratic Function.pptx
Quadratic Function.pptx
 
CHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdfCHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdf
 
Lesson 8: Derivatives of Polynomials and Exponential functions
Lesson 8: Derivatives of Polynomials and Exponential functionsLesson 8: Derivatives of Polynomials and Exponential functions
Lesson 8: Derivatives of Polynomials and Exponential functions
 
Domain and range
Domain and rangeDomain and range
Domain and range
 
Lesson 2: Limits and Limit Laws
Lesson 2: Limits and Limit LawsLesson 2: Limits and Limit Laws
Lesson 2: Limits and Limit Laws
 
application of partial differentiation
application of partial differentiationapplication of partial differentiation
application of partial differentiation
 
Applied Calculus Chapter 3 partial derivatives
Applied Calculus Chapter  3 partial derivativesApplied Calculus Chapter  3 partial derivatives
Applied Calculus Chapter 3 partial derivatives
 
Maxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITiansMaxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITians
 

Viewers also liked

Lagrange multipliers
Lagrange multipliersLagrange multipliers
Lagrange multipliers
master900211
 
Lesson24 Implicit Differentiation Slides
Lesson24    Implicit  Differentiation SlidesLesson24    Implicit  Differentiation Slides
Lesson24 Implicit Differentiation Slides
Matthew Leingang
 
Lesson20 Tangent Planes Slides+Notes
Lesson20   Tangent Planes Slides+NotesLesson20   Tangent Planes Slides+Notes
Lesson20 Tangent Planes Slides+Notes
Matthew Leingang
 
Lesson 16: Implicit Differentiation
Lesson 16: Implicit DifferentiationLesson 16: Implicit Differentiation
Lesson 16: Implicit Differentiation
Matthew Leingang
 

Viewers also liked (20)

Lesson 27: Lagrange Multipliers I
Lesson 27: Lagrange Multipliers ILesson 27: Lagrange Multipliers I
Lesson 27: Lagrange Multipliers I
 
Lesson 17: The Method of Lagrange Multipliers
Lesson 17: The Method of Lagrange MultipliersLesson 17: The Method of Lagrange Multipliers
Lesson 17: The Method of Lagrange Multipliers
 
Lagrange multipliers
Lagrange multipliersLagrange multipliers
Lagrange multipliers
 
Midterm II Review
Midterm II ReviewMidterm II Review
Midterm II Review
 
Lesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization ILesson 25: Unconstrained Optimization I
Lesson 25: Unconstrained Optimization I
 
Lesson24 Implicit Differentiation Slides
Lesson24    Implicit  Differentiation SlidesLesson24    Implicit  Differentiation Slides
Lesson24 Implicit Differentiation Slides
 
Lesson20 Tangent Planes Slides+Notes
Lesson20   Tangent Planes Slides+NotesLesson20   Tangent Planes Slides+Notes
Lesson20 Tangent Planes Slides+Notes
 
Lesson 29: Areas
Lesson 29: AreasLesson 29: Areas
Lesson 29: Areas
 
Lesson 26: Optimization II: Data Fitting
Lesson 26: Optimization II: Data FittingLesson 26: Optimization II: Data Fitting
Lesson 26: Optimization II: Data Fitting
 
Lesson 25: Indeterminate Forms and L'Hôpital's Rule
Lesson 25: Indeterminate Forms and L'Hôpital's RuleLesson 25: Indeterminate Forms and L'Hôpital's Rule
Lesson 25: Indeterminate Forms and L'Hôpital's Rule
 
Lesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite IntegralsLesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite Integrals
 
Lesson 32: The Fundamental Theorem Of Calculus
Lesson 32: The Fundamental Theorem Of CalculusLesson 32: The Fundamental Theorem Of Calculus
Lesson 32: The Fundamental Theorem Of Calculus
 
Lesson 22: Quadratic Forms
Lesson 22: Quadratic FormsLesson 22: Quadratic Forms
Lesson 22: Quadratic Forms
 
Lesson 23: The Chain Rule
Lesson 23: The Chain RuleLesson 23: The Chain Rule
Lesson 23: The Chain Rule
 
Midterm II Review Session Slides
Midterm II Review Session SlidesMidterm II Review Session Slides
Midterm II Review Session Slides
 
Lesson 24: Implicit Differentiation
Lesson 24: Implicit DifferentiationLesson 24: Implicit Differentiation
Lesson 24: Implicit Differentiation
 
Lesson 34: Introduction To Game Theory
Lesson 34: Introduction To Game TheoryLesson 34: Introduction To Game Theory
Lesson 34: Introduction To Game Theory
 
Lesson 19: Related Rates
Lesson 19: Related RatesLesson 19: Related Rates
Lesson 19: Related Rates
 
Lesson 16: Implicit Differentiation
Lesson 16: Implicit DifferentiationLesson 16: Implicit Differentiation
Lesson 16: Implicit Differentiation
 
Lesson 21: Partial Derivatives in Economics
Lesson 21: Partial Derivatives in EconomicsLesson 21: Partial Derivatives in Economics
Lesson 21: Partial Derivatives in Economics
 

Similar to Lesson 28: Lagrange Multipliers II

Roots equations
Roots equationsRoots equations
Roots equations
oscar
 
Roots equations
Roots equationsRoots equations
Roots equations
oscar
 
Lesson 19: Partial Derivatives
Lesson 19: Partial DerivativesLesson 19: Partial Derivatives
Lesson 19: Partial Derivatives
Matthew Leingang
 
Bai giang ham so kha vi va vi phan cua ham nhieu bien
Bai giang ham so kha vi va vi phan cua ham nhieu bienBai giang ham so kha vi va vi phan cua ham nhieu bien
Bai giang ham so kha vi va vi phan cua ham nhieu bien
Nhan Nguyen
 
X2 T05 06 Partial Fractions
X2 T05 06 Partial FractionsX2 T05 06 Partial Fractions
X2 T05 06 Partial Fractions
Nigel Simmons
 
Lesson 4 - Calculating Limits (Slides+Notes)
Lesson 4 - Calculating Limits (Slides+Notes)Lesson 4 - Calculating Limits (Slides+Notes)
Lesson 4 - Calculating Limits (Slides+Notes)
Matthew Leingang
 

Similar to Lesson 28: Lagrange Multipliers II (20)

Lesson18 Double Integrals Over Rectangles Slides
Lesson18   Double Integrals Over Rectangles SlidesLesson18   Double Integrals Over Rectangles Slides
Lesson18 Double Integrals Over Rectangles Slides
 
Lesson 9: Basic Differentiation Rules
Lesson 9: Basic Differentiation RulesLesson 9: Basic Differentiation Rules
Lesson 9: Basic Differentiation Rules
 
Lesson 21: Curve Sketching II (Section 4 version)
Lesson 21: Curve Sketching  II (Section 4 version)Lesson 21: Curve Sketching  II (Section 4 version)
Lesson 21: Curve Sketching II (Section 4 version)
 
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
 
Lesson 21: Curve Sketching II (Section 10 version)
Lesson 21: Curve Sketching II (Section 10 version)Lesson 21: Curve Sketching II (Section 10 version)
Lesson 21: Curve Sketching II (Section 10 version)
 
Roots equations
Roots equationsRoots equations
Roots equations
 
Roots equations
Roots equationsRoots equations
Roots equations
 
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 10 version)
 
Lesson 25: Evaluating Definite Integrals (Section 10 version)
Lesson 25: Evaluating Definite Integrals (Section 10 version)Lesson 25: Evaluating Definite Integrals (Section 10 version)
Lesson 25: Evaluating Definite Integrals (Section 10 version)
 
Matlab
MatlabMatlab
Matlab
 
Lesson 19: Partial Derivatives
Lesson 19: Partial DerivativesLesson 19: Partial Derivatives
Lesson 19: Partial Derivatives
 
Bai giang ham so kha vi va vi phan cua ham nhieu bien
Bai giang ham so kha vi va vi phan cua ham nhieu bienBai giang ham so kha vi va vi phan cua ham nhieu bien
Bai giang ham so kha vi va vi phan cua ham nhieu bien
 
Lesson 25: Evaluating Definite Integrals (Section 4 version)
Lesson 25: Evaluating Definite Integrals (Section 4 version)Lesson 25: Evaluating Definite Integrals (Section 4 version)
Lesson 25: Evaluating Definite Integrals (Section 4 version)
 
X2 T05 06 Partial Fractions
X2 T05 06 Partial FractionsX2 T05 06 Partial Fractions
X2 T05 06 Partial Fractions
 
Lesson 24: The Definite Integral (Section 10 version)
Lesson 24: The Definite Integral (Section 10 version)Lesson 24: The Definite Integral (Section 10 version)
Lesson 24: The Definite Integral (Section 10 version)
 
Lesson 24: The Definite Integral (Section 4 version)
Lesson 24: The Definite Integral (Section 4 version)Lesson 24: The Definite Integral (Section 4 version)
Lesson 24: The Definite Integral (Section 4 version)
 
Lesson 11: Limits and Continuity
Lesson 11: Limits and ContinuityLesson 11: Limits and Continuity
Lesson 11: Limits and Continuity
 
Lesson 21: Curve Sketching (Section 4 version)
Lesson 21: Curve Sketching (Section 4 version)Lesson 21: Curve Sketching (Section 4 version)
Lesson 21: Curve Sketching (Section 4 version)
 
Midterm I Review
Midterm I ReviewMidterm I Review
Midterm I Review
 
Lesson 4 - Calculating Limits (Slides+Notes)
Lesson 4 - Calculating Limits (Slides+Notes)Lesson 4 - Calculating Limits (Slides+Notes)
Lesson 4 - Calculating Limits (Slides+Notes)
 

More from Matthew Leingang

More from Matthew Leingang (20)

Making Lesson Plans
Making Lesson PlansMaking Lesson Plans
Making Lesson Plans
 
Streamlining assessment, feedback, and archival with auto-multiple-choice
Streamlining assessment, feedback, and archival with auto-multiple-choiceStreamlining assessment, feedback, and archival with auto-multiple-choice
Streamlining assessment, feedback, and archival with auto-multiple-choice
 
Electronic Grading of Paper Assessments
Electronic Grading of Paper AssessmentsElectronic Grading of Paper Assessments
Electronic Grading of Paper Assessments
 
Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)Lesson 27: Integration by Substitution (slides)
Lesson 27: Integration by Substitution (slides)
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)Lesson 26: The Fundamental Theorem of Calculus (slides)
Lesson 26: The Fundamental Theorem of Calculus (slides)
 
Lesson 27: Integration by Substitution (handout)
Lesson 27: Integration by Substitution (handout)Lesson 27: Integration by Substitution (handout)
Lesson 27: Integration by Substitution (handout)
 
Lesson 26: The Fundamental Theorem of Calculus (handout)
Lesson 26: The Fundamental Theorem of Calculus (handout)Lesson 26: The Fundamental Theorem of Calculus (handout)
Lesson 26: The Fundamental Theorem of Calculus (handout)
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)
 
Lesson 25: Evaluating Definite Integrals (handout)
Lesson 25: Evaluating Definite Integrals (handout)Lesson 25: Evaluating Definite Integrals (handout)
Lesson 25: Evaluating Definite Integrals (handout)
 
Lesson 24: Areas and Distances, The Definite Integral (handout)
Lesson 24: Areas and Distances, The Definite Integral (handout)Lesson 24: Areas and Distances, The Definite Integral (handout)
Lesson 24: Areas and Distances, The Definite Integral (handout)
 
Lesson 24: Areas and Distances, The Definite Integral (slides)
Lesson 24: Areas and Distances, The Definite Integral (slides)Lesson 24: Areas and Distances, The Definite Integral (slides)
Lesson 24: Areas and Distances, The Definite Integral (slides)
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)Lesson 23: Antiderivatives (slides)
Lesson 23: Antiderivatives (slides)
 
Lesson 22: Optimization Problems (slides)
Lesson 22: Optimization Problems (slides)Lesson 22: Optimization Problems (slides)
Lesson 22: Optimization Problems (slides)
 
Lesson 22: Optimization Problems (handout)
Lesson 22: Optimization Problems (handout)Lesson 22: Optimization Problems (handout)
Lesson 22: Optimization Problems (handout)
 
Lesson 21: Curve Sketching (slides)
Lesson 21: Curve Sketching (slides)Lesson 21: Curve Sketching (slides)
Lesson 21: Curve Sketching (slides)
 
Lesson 21: Curve Sketching (handout)
Lesson 21: Curve Sketching (handout)Lesson 21: Curve Sketching (handout)
Lesson 21: Curve Sketching (handout)
 
Lesson 20: Derivatives and the Shapes of Curves (slides)
Lesson 20: Derivatives and the Shapes of Curves (slides)Lesson 20: Derivatives and the Shapes of Curves (slides)
Lesson 20: Derivatives and the Shapes of Curves (slides)
 
Lesson 20: Derivatives and the Shapes of Curves (handout)
Lesson 20: Derivatives and the Shapes of Curves (handout)Lesson 20: Derivatives and the Shapes of Curves (handout)
Lesson 20: Derivatives and the Shapes of Curves (handout)
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Lesson 28: Lagrange Multipliers II

  • 1. Lesson 28 (Sections 18.2–5) Lagrange Multipliers II Math 20 November 28, 2007 Announcements Problem Set 11 assigned today. Due December 5. next OH: Today 1–3 (SC 323) Midterm II review: Tuesday 12/4, 7:30-9:00pm in Hall E Midterm II: Thursday, 12/6, 7-8:30pm in Hall A
  • 2. Outline A homework problem Restating the Method of Lagrange Multipliers Statement Justifications Second order conditions Compact feasibility sets Ad hoc arguments Analytic conditions Example: More than two variables More than one constraint
  • 3. Problem 17.1.10 Problem Maximize the quantity f (x, y , z) = Ax a y b z c subject to the constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are positive constants.)
  • 4. Problem 17.1.10 Problem Maximize the quantity f (x, y , z) = Ax a y b z c subject to the constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are positive constants.) Solution (By elimination) Solving the constraint for z in terms of x and y , we get m − px − qy z= r So we optimize the unconstrained function Aab x y (m − px − qy )c f (x, y ) = rc
  • 5. We have ∂f (x, y ) A = c ax a−1 y b (m − px − qy )c + x a y b c(m − px − qy )c−1 (−p) x r A = c x a−1 y b (m − px − qy )c−1 [a(m − px − qy ) − cpx] r Likewise ∂f (x, y ) A = c x a y b−1 (m − px − qy )c−1 [b(m − px − qy ) − cqy ] y r So throwing out the critical points where x = 0, y = 0, or z = 0 (these give minimal values of f , not maximal), we get (a + c)px + aqy = am bpx + (b + c)qy = bm
  • 6. This is a fun exercise in Cramer’s Rule: am aq 1 1 amq bm (b + c)q b b+c x= = (a + c)p aq a+c a pq bp (b + c)q b b+c amqc m a = = pq(ac + bc + c 2 ) p a+b+c It follows that m b m c y= z= q a+b+c r a+b+c If this is a utility-maximization problem subject to fixed budget, the portion spent on each good ( px , for instance) is the relative m a degree to which that good multiplies utility ( a+b+c ).
  • 7. Outline A homework problem Restating the Method of Lagrange Multipliers Statement Justifications Second order conditions Compact feasibility sets Ad hoc arguments Analytic conditions Example: More than two variables More than one constraint
  • 8. Theorem (The Method of Lagrange Multipliers) Let f (x1 , x2 , . . . , xn ) and g (x1 , x2 , . . . , xn ) be functions of several variables. The critical points of the function f restricted to the set g = 0 are solutions to the equations: ∂f ∂g (x1 , x2 , . . . , xn ) = λ (x1 , x2 , . . . , xn ) for each i = 1, . . . , n ∂xi ∂xi g (x1 , x2 , . . . , xn ) = 0. Note that this is n + 1 equations in n + 1 variables x1 , . . . , xn , λ.
  • 9. Graphical Justification In two variables, the critical points of f restricted to the level curve g = 0 are found when the tangent to the the level curve of f is parallel to the tangent to the level curve g = 0.
  • 10. These tangents have slopes dy fx dy gx =− =− and dx fy dx gy f g
  • 11. These tangents have slopes dy fx dy gx =− =− and dx fy dx gy f g So they are equal when fy fx g f = x =⇒ x = fy gy gx gy or fx = λgx fy = λgy
  • 12. Symbolic Justification Suppose that we can use the relation g (x1 , . . . , xn ) = 0 to solve for xn in terms of the the other variables x1 , . . . , xn−1 , after making some choices. Then the critical points of f (x1 , . . . , xn ) are unconstrained critical points of f (x1 , . . . , xn (x1 , . . . , xn−1 )). f x1 x2 xn ··· xn−1 x1 x2 ···
  • 13. Now for any i = 1, . . . , n − 1, ∂f ∂f ∂f ∂xn = + ∂xi ∂xi ∂xn ∂xi g g ∂f ∂f ∂g /∂xi − = ∂xi ∂xn ∂g /∂xn ∂f If = 0, then ∂xi g ∂f /∂xi ∂g /∂xi ∂f /∂xi ∂f /∂xn ⇐⇒ = = ∂f /∂xn ∂g /∂xn ∂g /∂xi ∂g /∂xn ∂f ∂g So as before, =λ for all i. ∂xi ∂xi
  • 14. Another perspective To find the critical points of f subject to the constraint that g = 0, create the lagrangian function L = f (x1 , x2 , . . . , xn ) − λg (x1 , x2 , . . . , xn ) If L is restricted to the set g = 0, L = f and so the constrained critical points are unconstrained critical points of L . So for each i, ∂L ∂f ∂g = 0 =⇒ =λ . ∂xi ∂xi ∂xi But also, ∂L = 0 =⇒ g (x1 , x2 , . . . , xn ) = 0. ∂λ
  • 15. Outline A homework problem Restating the Method of Lagrange Multipliers Statement Justifications Second order conditions Compact feasibility sets Ad hoc arguments Analytic conditions Example: More than two variables More than one constraint
  • 16. Second order conditions The Method of Lagrange Multipliers finds the constrained critical points, but doesn’t determine their “type” (max, min, neither). So what then?
  • 17. A dash of topology Cf. Sections 17.2–3 Definition A subset of Rn is called closed if it includes its boundary.
  • 18. A dash of topology Cf. Sections 17.2–3 Definition A subset of Rn is called closed if it includes its boundary. x2 + y2 ≤ 1 x2 + y2 ≤ 1 y ≥0 not closed closed closed Basically, if a subset is described by ≤ or ≥ inequalities, it is closed.
  • 19. Definition A subset of Rn is called bounded if it is contained within some ball centered at the origin. x2 + y2 ≤ 1 x2 + y2 ≤ 1 y ≥0 bounded not bounded bounded
  • 20. Definition A subset of Rn is called compact if it is closed and bounded. x2 + y2 ≤ 1 x2 + y2 ≤ 1 y ≥0 not compact not compact compact
  • 21. Optimizing over compact sets Theorem (Compact Set Method) To find the extreme values of function f on a compact set D of Rn , it suffices to find the (unconstrained) critical points of f “inside” D the (constrained) critical points of f on the “boundary” of D.
  • 22. Ad hoc arguments If D is not compact, sometimes it’s still easy to argue that as x gets farther away, f becomes larger, or smaller, so the critical points are “obviously” maxes, or mins.
  • 23. Ad hoc arguments If D is not compact, sometimes it’s still easy to argue that as x gets farther away, f becomes larger, or smaller, so the critical points are “obviously” maxes, or mins. (Example later)
  • 24. Analytic conditions Recall Equation 16.13, cf. Section 18.4 For the two-variable constrained optimization problem, we have (look in the book if you want the gory details): Lλλ Lλx Lλy 0 gx gy d 2f fxy − λgxy = Lxλ Lxx Lxy − λgxx = gx fxx dx 2 Ly λ Lyx Lyy g − λgyx gyy − λgyy gy fyx The critical point is a local max if this determinant is negative, and a local min if this is positive. The matrix on the right is the Hessian of the Lagrangian. But there is still a distinction between this and the unconstrained case. The constrained extrema are critical points of the Lagrangian, not extrema. Don’t worry too much about this!
  • 25. Outline A homework problem Restating the Method of Lagrange Multipliers Statement Justifications Second order conditions Compact feasibility sets Ad hoc arguments Analytic conditions Example: More than two variables More than one constraint
  • 26. Problem 17.1.10 Problem Maximize the quantity f (x, y , z) = Ax a y b z c subject to the constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are positive constants.)
  • 27. Problem 17.1.10 Problem Maximize the quantity f (x, y , z) = Ax a y b z c subject to the constraint that px + qy + rz = m. (Here A, a, b, c, p, q, r , m are positive constants.) Solution The Lagrange equations are Aax a−1 y b z c = λp Abx a y b−1 z c = λq Acx a y b z c−1 = λr We rule out any solution with x, y , z, or λ equal to 0 (they will minimize f , not maximize it).
  • 28. Dividing the first two equations gives ay p bp = =⇒ y = x bx q aq Dividing the first and last equations gives az p cp = =⇒ z = x cx r ar Plugging these into the equation of constraint gives bp cp m a px + x + x = m =⇒ x = a a p a+b+c
  • 29. Outline A homework problem Restating the Method of Lagrange Multipliers Statement Justifications Second order conditions Compact feasibility sets Ad hoc arguments Analytic conditions Example: More than two variables More than one constraint
  • 30. General method for more than one constraint If we are optimizing f (x1 , . . . , xn ) subject to gj (x1 , . . . , xn ) ≡ 0, j = 1, . . . , m we need multiple lambdas for them. The new Lagrangian is m L (x1 , . . . , xn ) = f (x1 , . . . , xn ) − λj gj (x1 , . . . , xn ) j=1 ∂L ∂L The conditions are that = 0 and = 0 for all i and j. In ∂xi ∂λj other words, ∂f ∂g1 ∂gm + · · · + λm = λ1 (all i) ∂xi ∂xi ∂xi gj (x1 , . . . , xn ) = 0 (all j)
  • 31. Example Find the minimum distance between the curves xy = 1 and x + 2y = 1.
  • 32. Example Find the minimum distance between the curves xy = 1 and x + 2y = 1. Reframing this, we can minimize f (x, y , u, v ) = (x − u)2 + (y − v )2 subject to the constraints xy − 1 = 0 u + 2v = 1.
  • 33. • • • • xy = 1 • • • • x + 2y = 1
  • 34. The Lagrangian is L = (x − u)2 + (y − v )2 − λ(xy − 1) − µ(u + 2v − 1) So the Lagrangian equations are 2(x − u) = λy −2(x − u) = µ 2(y − v ) = λx −2(y − v ) = 2µ Dividing the two λ equations and the two µ equations gives x −u x −u y 1 = =. y −v y −v x 2 Since the left-hand-sides are the same, we have 2y =√ Since x. √ 1 1 √ , or x = − 2, y = − √ xy = 1, we can say either x = 2, y = 2 2
  • 35. 1 Suppose x = 2, y = √. Then 2 √ √ 2−u 1 32 =⇒ 2u − v = = 1 2 2 √ −v 2 This along with u + 2v = 1 gives √ √ 1 1 4−3 2 u= 1+3 2 v= 5 10 √ 1 If we instead choose x = − 2, y = − √2 , we get √ 1 1 3 2+ √ 1−3 2 u= v= 5 5 2
  • 36. 1 9−4 2 5 • • xy = 1 • • x + 2y = 1 √ 1 9+4 2 5
  • 37. Because f gets larger as x, y , u, and v get larger, the absolute minimum is the smaller of these two critical values. So the √ 1 minimum distance is 5 9 − 4 2 .