Sec2Sess39

Unformatted notes below. Notes on my shorthand method
Lagrange multipliers
Statement of lagrange multipliers: Lagrange multipliers are used to find critical values when not all values in variables can be considered in a computationally efficient way. Constraints can specificity a curve or surface to use for finding critical values given those conditions.
The method is useful for when min max values are search for and variables are not independent
a lagrange multipliers use: to find the minimum or maximum of several variables when the variables are not independent. there is a relationship between the variables.
g(x,y,z)=c can be a relation (lack of independence) between variables. This is considered a "constraint" between variables
example: point closest to the origin on the hyperbola xy = 3
functions that can be used in combination (like overlaying a function on top of another) to find critical points on the original hyperbola. The formula that is the constraint is the one overlayed onto the original formula in the problem. 
1st funct: g(), 2cnd funct: f()
minimize f(x,y)=sqrt(x^2+y^2)
even simpler: f(x,y)=x^2+y^2
subject to constraint xy=3
minimal area of 2cnd function to still intersect with 1st function can find critical points at the intersection points.
observe: at the minimum, level curve of f is tangent to hyperbola g = 3. in that case the level curve of f and the level curve of g are tangent to each other
how to find (x, y) where level curves of f and g are tangent to each other?
in this case the two functions' normal vectors are parallel to each other. in that case g=c, f=a. when this happens, grad(f) is parallel (//) to grad(g). 
vectors are found to be parallel when they are proportional to each other. in that case one equals the other times a scalar value. scalar values are often written as lamda symbols. finding grad(f) // grad(g) can be done when x, y values are found to cause that proportionality.
min/max values search:
2 variables x,y with constraint g(x,y)=c
found using system of equations (|...| are multi-line equations) : 
grad(f) = lamda*grad(g) 
|f_x = lamda*g_x|
|f_y = lamda*g_y|
3 unknown variables are present: x, y, and lamda. Therefore a 3rd equation is included in the system of equations: 
| constraint g=c|
f = x^2+y^2
g = xy 
system of equations used for finding critical points:
|2x = lamda*y| for: f_x = lamda*g_x 
|2y = lamda*x| for: f_y = lamda*g_y
|xy = 3 | for: g=c
sometimes system of equations found using such methods are too hard to solve even with computers, an exact solution in such cases can not be found.
example of solving the system of equations using matrix form:
|2, -lamda||x|=|0| for: 2x-lamda*y=0
|lamda, -2||y|=|0| for: lamda*x -2y=0
with contraint: xy=3
Trivial solution (0,0) does not solve xy=3
Other solutions exist only if det(M)=0
|2, -lamda| = -4 + lamda^2 = 0 occurs when lamda^2 = 4 and therefore lamda = +/- 2
|lamda, -2|
different options to look at: lamda = 2, lamda = -2
given requirements x=y (from 2x = lamda*y and lamda=2) and x^2=3: 
if lamda=2 then solutions could be (sqrt(3),sqrt(3)) or (-sqrt(3),-sqrt(3))
if lamda=-2 then x=-y and -x^2=3 which generates no solutions
it is unknown if critical points are min or max unless checked
lagrange multiplier: lamda in the system of equations, what grad(g) must be multiplied by to get the grad(f)
Format of problems that the lagrange multiplier method can be used on: find critical values of w = f(x,y,z) constrained by g(x,y,z) = c. finding equation grad(f) = lamda*grad(g) and solving for lamda (rearranging equations to have lamda on the right side of the equals symbol) can determine the variables values at critical points. 
An approach to solving for lamda in each equation is "solving symmetrically" (explained in pdf link below). When finding lamda values each variable should be isolated into its own equation in the system of equations used to solve problems. The equations solving for lamda for each variable can be combined by substituting variables into each other and eventually solving for numeric values specified by constraints.
A general approach that can be used is grad(f) is the equation with the x,y,z,etc. from a problem's formula that does not contain the constraint (and having the gradient applied to them). Grad(g) uses the equation with the variables (x,y,z) from a problem's constraint. 
When using this method on a problem, each variable should be first solved symbolically for lamda. Then apply the finite value in the constraint to the symbolic solution to solve for the specific numerical values of the variables that represent the critical points.
E.x. find the critical values in 10yz+xz+15xy=w given constraint x*y*z = 5. grad(f)=<z+15y, 10z+x, 10y+15x> , grad(g)=<y*z, x*z, x*y>. To find the answer use grad(f)=lamda*grad(g) with constraint ("g") x*y*z = 5. 
More details on examples of examples are in: 
https://ocw.mit.edu/courses/mathematics/18-02sc-multivariable-calculus-fall-2010/2.-partial-derivatives/part-c-lagrange-multipliers-and-constrained-differentials/session-39-statement-of-lagrange-multipliers-and-example/MIT18_02SC_notes_21.pdf 
Critical points that are found need to be checked for being values that could be potential real solutions to a given problem and not out of bounds of what could be a real solution.
An important thing to distinguish (disambiguate) is the constraint is g which is used in the grad(f) = lambda*grad(g) formula but that formula must also adhere to the constraint g, which is the formula for g itself.