Lagrange Multipliers

Example 1

f = 20*x^(3/2)*y;

Plot3D[f, {x, 0, 60}, {y, 0, 60}, 
      AxesLabel -> {x, y, z}]

p1 = 
      ContourPlot[f, {x, 0, 60}, {y, 0, 60}, ContourShading -> None, 
        Contours -> 20]

p2 = 
      Plot[60 - x, {x, 0, 60}, PlotRange -> {0, 60}, 
        PlotStyle -> Hue[1]]

Show[p1, p2]

Example 2

U = 10*x^0.6*y^0.4;

Plot3D[U, {x, 0, 30}, {y, 0, 20}, 
      AxesLabel -> {x, y, z}]

p1 = 
      ContourPlot[U, {x, 0, 30}, {y, 0, 20}, ContourShading -> None, 
        Contours -> 20]

p2 = 
      Plot[20 - 2  x/3, {x, 0, 30}, PlotRange -> {0, 20}, 
        PlotStyle -> Hue[1]]

Show[p1, p2]

Example 3

f = x*y;

Plot3D[f, {x, -1, 1}, {y, -1, 1}, 
      AxesLabel -> {x, y, z}]

p1 = 
      ContourPlot[f, {x, -1, 1}, {y, -1, 1}, 
        ContourShading -> None, Contours -> 20]

p2 = 
      Plot[Sqrt[(1 - x^2)/4], {x, -1, 1}, 
        PlotStyle -> Hue[1]]

p3 = 
      Plot[-Sqrt[(1 - x^2)/4], {x, -1, 1}, 
        PlotStyle -> Hue[1]]

Show[p1, p2, p3]