Absolute extrema of a function with two constraints
Author: Joseph Lo

This graph shows the constaint set \[g(x,y,z) = x^2+z^2-2 = 0 \quad \text{and} \quad h(x,y,z) = y - z = 0\] as a blue curve. The objective is to find the maximum and minimum of \[f(x,y,z) = -2x+3y-5z\] on the constraint set by looking at the level surface of \(f(x,y,z)\).

Blue Curve: Constraint set g(x,y,z) = 0

Question: What are the extreme values
of f(x,y,z) on the constraint set? How 
did you find it?

To rotate the graph: right click and drag.

Circle = Circle((1, 10, 1), (-1, 10, 1), (-1, 10, -1))
Cylinder, c, Cylinder2 = Cylinder(Circle, 20)
i = Plane((1, 1, 1), (-1, 1, 1), (-1, -1, -1))
Constraint = IntersectPath(i, Cylinder2)
C = 3.5 (slider from -6 to 6, step 0.5)
f(x, y) = (0.2 * ((-C) - (2 * x) + (3 * y)))
LevelSurface = Surface(s, t, f(s, t), s, -5, 5, t, -5, 5)
text2: "Red Surface: Level surface f(x,y,z) = " + C + ""