SlideShare a Scribd company logo
Lagrange Multipliers
Lagrange Multipliers
Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
equation in x and y.
Lagrange Multipliers
    Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
    equation in x and y. The graph of z = f(x, y) is a surface and
    g(x, y) = 0 is a curve in the xy-plane,


                     z = f(x, y)




y                     g(x, y) = 0
                                    x
Lagrange Multipliers
    Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
    equation in x and y. The graph of z = f(x, y) is a surface and
    g(x, y) = 0 is a curve in the xy-plane, and we assume this
    curve is in the domain of f(x, y).

                     z = f(x, y)




Domain
                      g(x, y) = 0
y                                   x
Lagrange Multipliers
    Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
    equation in x and y. The graph of z = f(x, y) is a surface and
    g(x, y) = 0 is a curve in the xy-plane, and we assume this
    curve is in the domain of f(x, y).
                                        The set of points (x, y, z = f(x, y))
                     z = f(x, y)
                                        with (x, y) on the curve form a
                                        "trail" on the surface defined by
                                        f(x, y).




Domain
                      g(x, y) = 0
x                                   y
Lagrange Multipliers
    Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
    equation in x and y. The graph of z = f(x, y) is a surface and
    g(x, y) = 0 is a curve in the xy-plane, and we assume this
    curve is in the domain of f(x, y).
                                        The set of points (x, y, z = f(x, y))
                     z = f(x, y)
                                        with (x, y) on the curve form a
                                        "trail" on the surface defined by
                                        f(x, y). Where are the extrema on
                                        this trail? That is, where are the
                                        highest point and the lowest point
                                        on this trail?

Domain
                      g(x, y) = 0
x                                   y
Lagrange Multipliers
    Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an
    equation in x and y. The graph of z = f(x, y) is a surface and
    g(x, y) = 0 is a curve in the xy-plane, and we assume this
    curve is in the domain of f(x, y).
                                        The set of points (x, y, z = f(x, y))
                     z = f(x, y)
                                        with (x, y) on the curve form a
                                        "trail" on the surface defined by
                                        f(x, y). Where are the extrema on
                                        this trail? That is, where are the
                                        highest point and the lowest point
                                        on this trail? The equation
                                        g(x, y) = 0 is called the
Domain                                  constraint equation in the set up.
                      g(x, y) = 0
x                                       These types of problems are
                                    y
                                        known as the "extrema with
                                        constraints" problems.
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
of z = f(x, y) in the xy plane,
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                               z = f(x, y)
of z = f(x, y) in the xy plane,




                                          Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.


                                             Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.


                                             Level curves z = c


                                                                                y
                                                                                    x




                                             Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.
So P could not be an extremum.

                                             Level curves z = c


                                                                                y
                                                                                    x




                                             Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.
So P could not be an extremum.
Thus at an extremum on the trail
over g(x, y) = 0, its tangent must be        Level curves z = c
                                                                      g(x, y) = 0
parallel to the tangent to the contour
                                                                                y
lines.                                                                              x




                                             Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.
So P could not be an extremum.
Thus at an extremum on the trail
over g(x, y) = 0, its tangent must be        Level curves z = c
                                                                      g(x, y) = 0
parallel to the tangent to the contour
                                                                                y
lines. Equivalently, at the extremum,                                               x
the normal vector to the constraint
N = ∇g(x, y), and the gradient
to the surface ∇ f(x, y), must be
parallel,
                                             Level curves z = c
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines
                                                                  z = f(x, y)
of z = f(x, y) in the xy plane,
at a point P where the tangent to
g(x, y) = 0 is different from the tangent
to the contour line means the trail
cuts across the contour line, thus
                                                                  P
the trail is still changing altitude at P.
So P could not be an extremum.
Thus at an extremum on the trail
over g(x, y) = 0, its tangent must be        Level curves z = c
                                                                      g(x, y) = 0
parallel to the tangent to the contour
                                                                                y
lines. Equivalently, at the extremum,                                               x
the normal vector to the constraint
N = ∇g(x, y), and the gradient
to the surface ∇ f(x, y), must be
parallel, i.e. there is a λ such that:
                                             Level curves z = c
∇g(x, y) = λ* ∇ f(x, y).
Lagrange Multipliers
Plot g(x, y) = 0 over the contour lines of z = f(x, y) in the xy
plane. At a point P where the tangent to g(x, y) = 0 is
different from the tangent to the contour line means the trail
cuts across the contour line at P, thus it is still changing
altitude. Therefore P could not be an extremum. Thus the
extrema points on g(x, y) = 0 must be tangential to the
contour lines. Equivalently, at the extremum, the gradient to
g(x, y) = 0 and the gradient to the contour line must be the
multiple of each other.

           P




               g(x, y) = 0
Lagrange Multipliers
    Plot g(x, y) = 0 over the contour lines of z = f(x, y) in the xy
    plane. At a point P where the tangent to g(x, y) = 0 is
    different from the tangent to the contour line means the trail
    cuts across the contour line at P, thus it is still changing
    altitude. Therefore P could not be an extremum. Thus the
    extrema points on g(x, y) = 0 must be tangential to the
    contour lines. Equivalently, at the extremum, the gradient to
    g(x, y) = 0 and the gradient to the contour line must be the
    multiple of each other, that is, there is a λ such that:
                                    ∇g(x, y) = λ* ∇ f(x, y) or that
                     P
                                    dg i + dg j = λ ( df i + df j )
                                    dx     dy         dx       dy
N= ∇g(x, y)
                                   so we have       gx = λfx
            ∇f(x, y)               the system:      gy = λfy
                                                    g(x, y) = 0
                       g(x, y) = 0 We solve this syetem for the extrema.
Lagrange Multipliers
The variable λ is called a multiplier.
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many different multipliers.
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx
                       gy = λfy
                       g(x, y) = 0
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx    that is: 2x = λy       eq1
                       gy = λfy             2y = λx       eq2
                       g(x, y) = 0          x2 + y2 = 2   eq3
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx    that is: 2x = λy       eq1
                       gy = λfy             2y = λx       eq2
                       g(x, y) = 0          x2 + y2 = 2   eq3
                         2x
From eq1, we get λ = y ,
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is: 2x = λy       eq1
                       gy = λfy              2y = λx       eq2
                       g(x, y) = 0           x2 + y2 = 2   eq3
                         2x                             2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is: 2x = λy       eq1
                       gy = λfy              2y = λx       eq2
                       g(x, y) = 0           x2 + y2 = 2   eq3
                         2x                             2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is: 2x = λy       eq1
                       gy = λfy              2y = λx       eq2
                       g(x, y) = 0           x2 + y2 = 2   eq3
                         2x                             2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy       eq1
                       gy = λfy                 2y = λx       eq2
                       g(x, y) = 0              x2 + y2 = 2   eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy       eq1
                       gy = λfy                 2y = λx       eq2
                       g(x, y) = 0              x2 + y2 = 2   eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy         eq1
                       gy = λfy                 2y = λx         eq2
                       g(x, y) = 0              x2 + y2 = 2     eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2                x = ±1
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy         eq1
                       gy = λfy                 2y = λx         eq2
                       g(x, y) = 0              x2 + y2 = 2     eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2                x = ±1
If y = x, there are two pairs of solutions (1, 1), (-1, -1).
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy         eq1
                       gy = λfy                 2y = λx         eq2
                       g(x, y) = 0              x2 + y2 = 2     eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2                x = ±1
If y = x, there are two pairs of solutions (1, 1), (-1, -1).
Substitute y = -x into eq3, we get 2x2 = 2
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy         eq1
                       gy = λfy                 2y = λx         eq2
                       g(x, y) = 0              x2 + y2 = 2     eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2                x = ±1
If y = x, there are two pairs of solutions (1, 1), (-1, -1).
Substitute y = -x into eq3, we get 2x2 = 2              x = ±1
Lagrange Multipliers
The variable λ is called a multiplier. In more complex problems,
we might use many differernt multipliers.
Example: Find the extrema of f(x, y) = xy given the constraint
g(x, y) = x2 + y2 – 2 = 0.
We are to solve:       gx = λfx     that is:    2x = λy         eq1
                       gy = λfy                 2y = λx         eq2
                       g(x, y) = 0              x2 + y2 = 2     eq3
                         2x                                2y
From eq1, we get λ = y ,         from eq2, we get λ = x .
                    2y      2x
Set them equal: x = y
         we get 2y2 = 2x2                   y = ±x
Substitute y = x into eq3, we get 2x2 = 2                x = ±1
If y = x, there are two pairs of solutions (1, 1), (-1, -1).
Substitute y = -x into eq3, we get 2x2 = 2              x = ±1
If y = -x, this gives two more pairs of solutions (1, -1), (-1, 1).
Lagrange Multipliers
To find out which is a max, a min,
or neither, evaluate each with f(x, y):
Lagrange Multipliers
To find out which is a max, a min,
or neither, evaluate each with f(x, y) = xy:
f(1, 1) = 1, f(-1, -1) =1,
f(-1, 1) = -1, f(1, -1) = -1,
Lagrange Multipliers
To find out which is a max, a min,
or neither, evaluate each with f(x, y) = xy:
f(1, 1) = 1, f(-1, -1) =1,
f(-1, 1) = -1, f(1, -1) = -1,
So (1, 1) , (-1, -1) are maxima,
and (-1, 1), (1, -1) are minima.
Lagrange Multipliers
To find out which is a max, a min,
or neither, evaluate each with f(x, y):
f(1, 1) = 1, f(-1, -1) =1,
f(-1, 1) = -1, f(1, -1) = -1,
So (1, 1) , (-1, -1) are maxima,
and (-1, 1), (1, -1) are minima.
Lagrange Multipliers
To find out which is a max, a min,
or neither, evaluate each with f(x, y):
f(1, 1) = 1, f(-1, -1) =1,
f(-1, 1) = -1, f(1, -1) = -1,
So (1, 1) , (-1, -1) are maxima,
and (-1, 1), (1, -1) are minima.
The procedure above is called the method of "Lagrange
Multipliers". It can be used in the case of finding extrema of a
three varaible function w=f(x, y, z) with a constraint
g(x, y, z) = 0. In the three variabe case, we solve the systems:
                          gx = λfx
                          gy = λfy
                          gz = λfz
                          g(x, y, z) = 0
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0.
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx
    gy = λfy
    gz = λfz
    g(x, y, z) = 0
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy
    gz = λfz
    g(x, y, z) = 0
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz
    g(x, y, z) = 0
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:
y + z = λyz
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:
y + z = λyz      y = λyz – z
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:
y + z = λyz      y = λyz – z
              y = (λy – 1)z
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:
y + z = λyz      y = λyz – z
              y = (λy – 1)z
               y
                    =z
             λy – 1
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:         From eq3, we solve for x:
y + z = λyz      y = λyz – z      x + y = λxy
              y = (λy – 1)z
               y
                    =z
             λy – 1
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:         From eq3, we solve for x:
y + z = λyz      y = λyz – z      x + y = λxy      y = λxy – x
              y = (λy – 1)z
               y
                    =z
             λy – 1
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:         From eq3, we solve for x:
y + z = λyz      y = λyz – z      x + y = λxy      y = λxy – x
              y = (λy – 1)z                       y = (λy – 1)x
               y
                    =z
             λy – 1
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:         From eq3, we solve for x:
y + z = λyz      y = λyz – z      x + y = λxy      y = λxy – x
              y = (λy – 1)z                       y = (λy – 1)x
               y                                    y
                    =z                                  =x
             λy – 1                               λy – 1
Lagrange Multipliers
Example: Find the largest volume possibe of a box with a
fixed total surface area.
The volume is V = xyz.
The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system:
    gx = λfx                   y + z = λyz      eq1
    gy = λfy                   x + z = λxz      eq2
    gz = λfz                   x + y = λxy      eq3
                               xy + xz + yz = c/2      eq4
    g(x, y, z) = 0
From eq1, we solve for z:          From eq3, we solve for x:
y + z = λyz        y = λyz – z     x + y = λxy       y = λxy – x
                y = (λy – 1)z                    y = (λy – 1)x
                 y                                 y
                      =z                                =x
               λy – 1                           λy – 1
 Hence either x = z or λy – 1 = 0.
Lagrange Multipliers
Assume λy – 1 = 0,
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
which is impossibe because of eq4 .
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
which is impossibe because of eq4 .
Therefore x = z.
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
which is impossibe because of eq4 .
Therefore x = z.
The system is symmetric so similar algebra yields x = y
and y = z.
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
which is impossibe because of eq4 .
Therefore x = z.
The system is symmetric so similar algebra yields x = y
and y = z.
Therefore x = y = z and the box must be a cube.
Lagrange Multipliers
Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
Put this in eq1 and eq3, then x and z must be 0 also,
which is impossibe because of eq4 .
Therefore x = z.
The system is symmetric so similar algebra yields x = y
and y = z.
Therefore x = y = z and the box must be a cube.

More Related Content

What's hot

3 dot product angles-projection
3 dot product angles-projection3 dot product angles-projection
3 dot product angles-projection
math267
 
24 double integral over polar coordinate
24 double integral over polar coordinate24 double integral over polar coordinate
24 double integral over polar coordinatemath267
 
1 3 d coordinate system
1 3 d coordinate system1 3 d coordinate system
1 3 d coordinate system
math267
 
14 unit tangent and normal vectors
14 unit tangent and normal vectors14 unit tangent and normal vectors
14 unit tangent and normal vectorsmath267
 
27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinatesmath267
 
12 quadric surfaces
12 quadric surfaces12 quadric surfaces
12 quadric surfacesmath267
 
9 determinant and cross product
9 determinant and cross product9 determinant and cross product
9 determinant and cross productmath267
 
22 double integrals
22 double integrals22 double integrals
22 double integralsmath267
 
18 directional derivatives and gradient
18 directional  derivatives and gradient18 directional  derivatives and gradient
18 directional derivatives and gradientmath267
 
2 vectors
2 vectors2 vectors
2 vectors
math267
 
19 min max-saddle-points
19 min max-saddle-points19 min max-saddle-points
19 min max-saddle-pointsmath267
 
4 areas in polar coordinates
4 areas in polar coordinates4 areas in polar coordinates
4 areas in polar coordinatesmath267
 
26 triple integrals
26 triple integrals26 triple integrals
26 triple integralsmath267
 
10 parametric eequations of lines
10 parametric eequations of lines10 parametric eequations of lines
10 parametric eequations of linesmath267
 
11 equations of planes
11 equations of planes11 equations of planes
11 equations of planesmath267
 
16 partial derivatives
16 partial derivatives16 partial derivatives
16 partial derivativesmath267
 
3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiationmath265
 
4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motionsmath265
 
Lesson 16: Exponential Growth and Decay
Lesson 16: Exponential Growth and DecayLesson 16: Exponential Growth and Decay
Lesson 16: Exponential Growth and Decay
Matthew Leingang
 
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014) DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
Panchal Anand
 

What's hot (20)

3 dot product angles-projection
3 dot product angles-projection3 dot product angles-projection
3 dot product angles-projection
 
24 double integral over polar coordinate
24 double integral over polar coordinate24 double integral over polar coordinate
24 double integral over polar coordinate
 
1 3 d coordinate system
1 3 d coordinate system1 3 d coordinate system
1 3 d coordinate system
 
14 unit tangent and normal vectors
14 unit tangent and normal vectors14 unit tangent and normal vectors
14 unit tangent and normal vectors
 
27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates27 triple integrals in spherical and cylindrical coordinates
27 triple integrals in spherical and cylindrical coordinates
 
12 quadric surfaces
12 quadric surfaces12 quadric surfaces
12 quadric surfaces
 
9 determinant and cross product
9 determinant and cross product9 determinant and cross product
9 determinant and cross product
 
22 double integrals
22 double integrals22 double integrals
22 double integrals
 
18 directional derivatives and gradient
18 directional  derivatives and gradient18 directional  derivatives and gradient
18 directional derivatives and gradient
 
2 vectors
2 vectors2 vectors
2 vectors
 
19 min max-saddle-points
19 min max-saddle-points19 min max-saddle-points
19 min max-saddle-points
 
4 areas in polar coordinates
4 areas in polar coordinates4 areas in polar coordinates
4 areas in polar coordinates
 
26 triple integrals
26 triple integrals26 triple integrals
26 triple integrals
 
10 parametric eequations of lines
10 parametric eequations of lines10 parametric eequations of lines
10 parametric eequations of lines
 
11 equations of planes
11 equations of planes11 equations of planes
11 equations of planes
 
16 partial derivatives
16 partial derivatives16 partial derivatives
16 partial derivatives
 
3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation3.2 implicit equations and implicit differentiation
3.2 implicit equations and implicit differentiation
 
4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions4.1 derivatives as rates linear motions
4.1 derivatives as rates linear motions
 
Lesson 16: Exponential Growth and Decay
Lesson 16: Exponential Growth and DecayLesson 16: Exponential Growth and Decay
Lesson 16: Exponential Growth and Decay
 
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014) DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
DOUBLE INTEGRALS PPT GTU CALCULUS (2110014)
 

Similar to 21 lagrange multipliers

Vector calculus
Vector calculusVector calculus
Vector calculusKumar
 
X2 T07 03 addition, subtraction, multiplication & division (2011)
X2 T07 03 addition, subtraction,  multiplication & division (2011)X2 T07 03 addition, subtraction,  multiplication & division (2011)
X2 T07 03 addition, subtraction, multiplication & division (2011)Nigel Simmons
 
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
X2 T04 03 cuve sketching - addition, subtraction,  multiplication and divisionX2 T04 03 cuve sketching - addition, subtraction,  multiplication and division
X2 T04 03 cuve sketching - addition, subtraction, multiplication and divisionNigel Simmons
 
X2 t07 03 addition, subtraction, multiplication & division (2012)
X2 t07 03 addition, subtraction,  multiplication & division (2012)X2 t07 03 addition, subtraction,  multiplication & division (2012)
X2 t07 03 addition, subtraction, multiplication & division (2012)Nigel Simmons
 
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
TabrijiIslam
 
1 review on derivatives
1 review on derivatives1 review on derivatives
1 review on derivatives
math266
 
Reciprocals Oct 13th
Reciprocals Oct 13thReciprocals Oct 13th
Reciprocals Oct 13thingroy
 
Areas of bounded regions
Areas of bounded regionsAreas of bounded regions
Areas of bounded regionsHimani Asija
 
ComplexNumber.ppt
ComplexNumber.pptComplexNumber.ppt
ComplexNumber.ppt
SanjayShuklaITMU
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
Mel Anthony Pepito
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
Matthew Leingang
 
Presentaton on Polynomials....Class 10
Presentaton on Polynomials....Class 10 Presentaton on Polynomials....Class 10
Presentaton on Polynomials....Class 10
Bindu Cm
 
ComplexNumber.ppt
ComplexNumber.pptComplexNumber.ppt
ComplexNumber.ppt
berenvaz
 
Algebric Functions.pdf
Algebric Functions.pdfAlgebric Functions.pdf
Algebric Functions.pdf
MamadArip
 
2.4 defintion of derivative
2.4 defintion of derivative2.4 defintion of derivative
2.4 defintion of derivativemath265
 
Introduccio al calculo vectorial
Introduccio  al calculo vectorialIntroduccio  al calculo vectorial
Introduccio al calculo vectorial
EDESMITCRUZ1
 

Similar to 21 lagrange multipliers (20)

Vector calculus
Vector calculusVector calculus
Vector calculus
 
X2 T07 03 addition, subtraction, multiplication & division (2011)
X2 T07 03 addition, subtraction,  multiplication & division (2011)X2 T07 03 addition, subtraction,  multiplication & division (2011)
X2 T07 03 addition, subtraction, multiplication & division (2011)
 
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
X2 T04 03 cuve sketching - addition, subtraction,  multiplication and divisionX2 T04 03 cuve sketching - addition, subtraction,  multiplication and division
X2 T04 03 cuve sketching - addition, subtraction, multiplication and division
 
X2 t07 03 addition, subtraction, multiplication & division (2012)
X2 t07 03 addition, subtraction,  multiplication & division (2012)X2 t07 03 addition, subtraction,  multiplication & division (2012)
X2 t07 03 addition, subtraction, multiplication & division (2012)
 
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
13.1 Calculus_ch14_Partial_Directional_Derivatives.pptx
 
1 review on derivatives
1 review on derivatives1 review on derivatives
1 review on derivatives
 
Integration. area undera curve
Integration. area undera curveIntegration. area undera curve
Integration. area undera curve
 
Reciprocals Oct 13th
Reciprocals Oct 13thReciprocals Oct 13th
Reciprocals Oct 13th
 
Areas of bounded regions
Areas of bounded regionsAreas of bounded regions
Areas of bounded regions
 
ComplexNumber.ppt
ComplexNumber.pptComplexNumber.ppt
ComplexNumber.ppt
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
Normal
NormalNormal
Normal
 
Presentaton on Polynomials....Class 10
Presentaton on Polynomials....Class 10 Presentaton on Polynomials....Class 10
Presentaton on Polynomials....Class 10
 
ComplexNumber.ppt
ComplexNumber.pptComplexNumber.ppt
ComplexNumber.ppt
 
Algebric Functions.pdf
Algebric Functions.pdfAlgebric Functions.pdf
Algebric Functions.pdf
 
2.4 defintion of derivative
2.4 defintion of derivative2.4 defintion of derivative
2.4 defintion of derivative
 
Introduccio al calculo vectorial
Introduccio  al calculo vectorialIntroduccio  al calculo vectorial
Introduccio al calculo vectorial
 
ppt of Calculus
ppt of Calculusppt of Calculus
ppt of Calculus
 
Calc 3.9a
Calc 3.9aCalc 3.9a
Calc 3.9a
 

Recently uploaded

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

21 lagrange multipliers

  • 2. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y.
  • 3. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y. The graph of z = f(x, y) is a surface and g(x, y) = 0 is a curve in the xy-plane, z = f(x, y) y g(x, y) = 0 x
  • 4. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y. The graph of z = f(x, y) is a surface and g(x, y) = 0 is a curve in the xy-plane, and we assume this curve is in the domain of f(x, y). z = f(x, y) Domain g(x, y) = 0 y x
  • 5. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y. The graph of z = f(x, y) is a surface and g(x, y) = 0 is a curve in the xy-plane, and we assume this curve is in the domain of f(x, y). The set of points (x, y, z = f(x, y)) z = f(x, y) with (x, y) on the curve form a "trail" on the surface defined by f(x, y). Domain g(x, y) = 0 x y
  • 6. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y. The graph of z = f(x, y) is a surface and g(x, y) = 0 is a curve in the xy-plane, and we assume this curve is in the domain of f(x, y). The set of points (x, y, z = f(x, y)) z = f(x, y) with (x, y) on the curve form a "trail" on the surface defined by f(x, y). Where are the extrema on this trail? That is, where are the highest point and the lowest point on this trail? Domain g(x, y) = 0 x y
  • 7. Lagrange Multipliers Let z = f(x,y) be a function in x and y and g(x, y) = 0 be an equation in x and y. The graph of z = f(x, y) is a surface and g(x, y) = 0 is a curve in the xy-plane, and we assume this curve is in the domain of f(x, y). The set of points (x, y, z = f(x, y)) z = f(x, y) with (x, y) on the curve form a "trail" on the surface defined by f(x, y). Where are the extrema on this trail? That is, where are the highest point and the lowest point on this trail? The equation g(x, y) = 0 is called the Domain constraint equation in the set up. g(x, y) = 0 x These types of problems are y known as the "extrema with constraints" problems.
  • 8. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines of z = f(x, y) in the xy plane,
  • 9. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, Level curves z = c
  • 10. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. Level curves z = c
  • 11. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. Level curves z = c y x Level curves z = c
  • 12. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. So P could not be an extremum. Level curves z = c y x Level curves z = c
  • 13. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. So P could not be an extremum. Thus at an extremum on the trail over g(x, y) = 0, its tangent must be Level curves z = c g(x, y) = 0 parallel to the tangent to the contour y lines. x Level curves z = c
  • 14. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. So P could not be an extremum. Thus at an extremum on the trail over g(x, y) = 0, its tangent must be Level curves z = c g(x, y) = 0 parallel to the tangent to the contour y lines. Equivalently, at the extremum, x the normal vector to the constraint N = ∇g(x, y), and the gradient to the surface ∇ f(x, y), must be parallel, Level curves z = c
  • 15. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines z = f(x, y) of z = f(x, y) in the xy plane, at a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line, thus P the trail is still changing altitude at P. So P could not be an extremum. Thus at an extremum on the trail over g(x, y) = 0, its tangent must be Level curves z = c g(x, y) = 0 parallel to the tangent to the contour y lines. Equivalently, at the extremum, x the normal vector to the constraint N = ∇g(x, y), and the gradient to the surface ∇ f(x, y), must be parallel, i.e. there is a λ such that: Level curves z = c ∇g(x, y) = λ* ∇ f(x, y).
  • 16. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines of z = f(x, y) in the xy plane. At a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line at P, thus it is still changing altitude. Therefore P could not be an extremum. Thus the extrema points on g(x, y) = 0 must be tangential to the contour lines. Equivalently, at the extremum, the gradient to g(x, y) = 0 and the gradient to the contour line must be the multiple of each other. P g(x, y) = 0
  • 17. Lagrange Multipliers Plot g(x, y) = 0 over the contour lines of z = f(x, y) in the xy plane. At a point P where the tangent to g(x, y) = 0 is different from the tangent to the contour line means the trail cuts across the contour line at P, thus it is still changing altitude. Therefore P could not be an extremum. Thus the extrema points on g(x, y) = 0 must be tangential to the contour lines. Equivalently, at the extremum, the gradient to g(x, y) = 0 and the gradient to the contour line must be the multiple of each other, that is, there is a λ such that: ∇g(x, y) = λ* ∇ f(x, y) or that P dg i + dg j = λ ( df i + df j ) dx dy dx dy N= ∇g(x, y) so we have gx = λfx ∇f(x, y) the system: gy = λfy g(x, y) = 0 g(x, y) = 0 We solve this syetem for the extrema.
  • 18. Lagrange Multipliers The variable λ is called a multiplier.
  • 19. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many different multipliers.
  • 20. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0.
  • 21. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx gy = λfy g(x, y) = 0
  • 22. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3
  • 23. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x From eq1, we get λ = y ,
  • 24. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x .
  • 25. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y
  • 26. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2
  • 27. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x
  • 28. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2
  • 29. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2 x = ±1
  • 30. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2 x = ±1 If y = x, there are two pairs of solutions (1, 1), (-1, -1).
  • 31. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2 x = ±1 If y = x, there are two pairs of solutions (1, 1), (-1, -1). Substitute y = -x into eq3, we get 2x2 = 2
  • 32. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2 x = ±1 If y = x, there are two pairs of solutions (1, 1), (-1, -1). Substitute y = -x into eq3, we get 2x2 = 2 x = ±1
  • 33. Lagrange Multipliers The variable λ is called a multiplier. In more complex problems, we might use many differernt multipliers. Example: Find the extrema of f(x, y) = xy given the constraint g(x, y) = x2 + y2 – 2 = 0. We are to solve: gx = λfx that is: 2x = λy eq1 gy = λfy 2y = λx eq2 g(x, y) = 0 x2 + y2 = 2 eq3 2x 2y From eq1, we get λ = y , from eq2, we get λ = x . 2y 2x Set them equal: x = y we get 2y2 = 2x2 y = ±x Substitute y = x into eq3, we get 2x2 = 2 x = ±1 If y = x, there are two pairs of solutions (1, 1), (-1, -1). Substitute y = -x into eq3, we get 2x2 = 2 x = ±1 If y = -x, this gives two more pairs of solutions (1, -1), (-1, 1).
  • 34. Lagrange Multipliers To find out which is a max, a min, or neither, evaluate each with f(x, y):
  • 35. Lagrange Multipliers To find out which is a max, a min, or neither, evaluate each with f(x, y) = xy: f(1, 1) = 1, f(-1, -1) =1, f(-1, 1) = -1, f(1, -1) = -1,
  • 36. Lagrange Multipliers To find out which is a max, a min, or neither, evaluate each with f(x, y) = xy: f(1, 1) = 1, f(-1, -1) =1, f(-1, 1) = -1, f(1, -1) = -1, So (1, 1) , (-1, -1) are maxima, and (-1, 1), (1, -1) are minima.
  • 37. Lagrange Multipliers To find out which is a max, a min, or neither, evaluate each with f(x, y): f(1, 1) = 1, f(-1, -1) =1, f(-1, 1) = -1, f(1, -1) = -1, So (1, 1) , (-1, -1) are maxima, and (-1, 1), (1, -1) are minima.
  • 38. Lagrange Multipliers To find out which is a max, a min, or neither, evaluate each with f(x, y): f(1, 1) = 1, f(-1, -1) =1, f(-1, 1) = -1, f(1, -1) = -1, So (1, 1) , (-1, -1) are maxima, and (-1, 1), (1, -1) are minima. The procedure above is called the method of "Lagrange Multipliers". It can be used in the case of finding extrema of a three varaible function w=f(x, y, z) with a constraint g(x, y, z) = 0. In the three variabe case, we solve the systems: gx = λfx gy = λfy gz = λfz g(x, y, z) = 0
  • 39. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area.
  • 40. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz.
  • 41. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2
  • 42. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0.
  • 43. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx gy = λfy gz = λfz g(x, y, z) = 0
  • 44. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy gz = λfz g(x, y, z) = 0
  • 45. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz g(x, y, z) = 0
  • 46. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0
  • 47. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: y + z = λyz
  • 48. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: y + z = λyz y = λyz – z
  • 49. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: y + z = λyz y = λyz – z y = (λy – 1)z
  • 50. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: y + z = λyz y = λyz – z y = (λy – 1)z y =z λy – 1
  • 51. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: From eq3, we solve for x: y + z = λyz y = λyz – z x + y = λxy y = (λy – 1)z y =z λy – 1
  • 52. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: From eq3, we solve for x: y + z = λyz y = λyz – z x + y = λxy y = λxy – x y = (λy – 1)z y =z λy – 1
  • 53. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: From eq3, we solve for x: y + z = λyz y = λyz – z x + y = λxy y = λxy – x y = (λy – 1)z y = (λy – 1)x y =z λy – 1
  • 54. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: From eq3, we solve for x: y + z = λyz y = λyz – z x + y = λxy y = λxy – x y = (λy – 1)z y = (λy – 1)x y y =z =x λy – 1 λy – 1
  • 55. Lagrange Multipliers Example: Find the largest volume possibe of a box with a fixed total surface area. The volume is V = xyz. The constraint is 2xy + 2xz + 2yz = c or xy + xz + yz = c/2 Hence g(x, y, z) = xy + xz + yz – c/2 = 0. Set up the system: gx = λfx y + z = λyz eq1 gy = λfy x + z = λxz eq2 gz = λfz x + y = λxy eq3 xy + xz + yz = c/2 eq4 g(x, y, z) = 0 From eq1, we solve for z: From eq3, we solve for x: y + z = λyz y = λyz – z x + y = λxy y = λxy – x y = (λy – 1)z y = (λy – 1)x y y =z =x λy – 1 λy – 1 Hence either x = z or λy – 1 = 0.
  • 57. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0.
  • 58. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also,
  • 59. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also, which is impossibe because of eq4 .
  • 60. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also, which is impossibe because of eq4 . Therefore x = z.
  • 61. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also, which is impossibe because of eq4 . Therefore x = z. The system is symmetric so similar algebra yields x = y and y = z.
  • 62. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also, which is impossibe because of eq4 . Therefore x = z. The system is symmetric so similar algebra yields x = y and y = z. Therefore x = y = z and the box must be a cube.
  • 63. Lagrange Multipliers Assume λy – 1 = 0, then from y = (λy – 1)z, we get y = 0. Put this in eq1 and eq3, then x and z must be 0 also, which is impossibe because of eq4 . Therefore x = z. The system is symmetric so similar algebra yields x = y and y = z. Therefore x = y = z and the box must be a cube.