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2 2 19 1 }}
{SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 49 "Lagrange Multiplier Exper
iments with Level Curves" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26
"with(linalg): with(plots):" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 37 "L
agrange Multipliers and Level Curves" }}{EXCHG {PARA 0 "" 0 "" {TEXT
-1 0 "" }{TEXT 256 78 "We want to find the max and min of f(x,y)=x^3+
x*y+2*y^3 on the constraint set" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }
{TEXT 257 24 "g(x,y)=x^2+x*y+y^2-1=0. " }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 258 48 "First below is a pict
ure of the constraint set. " }}{PARA 0 "" 0 "" {TEXT 259 12 "Remember \+
we " }{TEXT 264 4 "only" }{TEXT 265 63 " care about the values of f(x,
y) on the ellipse pictured below." }}}{EXCHG {PARA 0 "> " 0 ""
{MPLTEXT 1 0 95 "g:=x^2+x*y+y^2-1;\ngr0:=implicitplot(g=0,x=-2..2,y=-2
..2,thickness=2,color=black):\ndisplay(gr0);" }}}{EXCHG {PARA 0 "" 0 "
" {TEXT -1 0 "" }{TEXT 260 91 "Can you make a rough guess about where \+
on the above ellipse x^3+x*y+2*y^3 would be biggest?" }}{PARA 0 "" 0 "
" {TEXT -1 0 "" }{TEXT 261 94 "(e.g. Which quadrant? Closer to the x-a
xis or y-axis? About what might the maximum value be?)" }}{PARA 0 ""
0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 262 65 "Belo
w are some level curves of f(x,y)=x^3+x*y+2*y^3 superimposed." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 263 117 "Look near the point (0,1
) on the top level curve where f(x,y) is 2.\n If you move a littl
e to the right of (0,1) " }{TEXT 266 14 "on the ellipse" }{TEXT 267
96 ", will f be bigger or smaller than 1?\n How about if you move
a little to the left of (0,1)?" }}{PARA 0 "" 0 "" {TEXT -1 6 " \+
" }{TEXT 268 63 "What does this say about the possibility that (1,0) m
ight be a " }{TEXT 270 25 "constrained local maximum" }{TEXT 269 32 " \+
of f restricted to the ellipse?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}
{PARA 0 "" 0 "" {TEXT -1 6 " " }{TEXT 271 105 "Roughly which way \+
are the gradients of f and g pointing at (1,0)? (You can read this fro
m the picture...)" }}{PARA 0 "" 0 "" {TEXT -1 6 " " }{TEXT 272
37 "Could they be parallel at that point?" }}{PARA 0 "" 0 "" {TEXT -1
6 " " }{TEXT 273 44 "Harder but the key to Lagrange Multipliers: \+
" }}{PARA 0 "" 0 "" {TEXT 274 85 " Can you link the no
n-parallelism of the gradients at (1,0) to (1,0) " }{TEXT 275 4 "not \+
" }{TEXT 276 34 "being a constrained local maximum?" }}}{EXCHG {PARA
0 "> " 0 "" {MPLTEXT 1 0 152 "f:=x^3+x*y+2*y^3;\ngr1:=contourplot(f,x=
-2..2,y=-2..2,contours=[-2,1.5,2],coloring=[red,green,blue],thickness=
2):\ndisplay([gr0,gr1],scaling=constrained);" }}}{EXCHG {PARA 0 "" 0 "
" {TEXT -1 0 "" }{TEXT 277 113 "Try and adjust the contours values (yo
u can add more), so that one of the level curves is tangent to the ell
ipse." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "
" }{TEXT 278 118 "You can click on the tangency spot with your mouse a
nd look in the upper left to read the point (x,y) more accurately." }}
{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 280 71 "Or select Plot Display->W
indows from the Options menu for bigger plots." }}{PARA 0 "" 0 ""
{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 282 84 "How many \+
level curves with points of tangency can you find? (We found at least \+
4...)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 283 45 "From the Lagrang
e Multipliers point of view, " }{TEXT 284 14 "each of these " }{TEXT
285 51 "is a possible constrained local minimum or maximum." }}{PARA
0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 291 74
"What do you think are the biggest and smallest values of f on the ell
ipse?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 141 "gr2:=contourplot(
f,x=-2..2,y=-2..2,contours=[-2,1.5,2],coloring=[red,green,blue,violet]
,thickness=2):\ndisplay([gr0,gr2],scaling=constrained);" }}}{EXCHG
{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 20 "Partial Derivatives." }}
{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "f_x:=diff(f,x);\nf_y:=diff(f,y);\ng
_x:=diff(g,x);\ng_y:=diff(g,y);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0
"" }{TEXT 287 64 "You can use numerical solution routines to search fo
r solutions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 288 68 "(The seco
nd form of the command seeks solutions in a certain range.)" }}{PARA
0 "> " 0 "" {MPLTEXT 1 0 150 "sol1:=fsolve(\{f_x=lambda*g_x,f_y=lambda
*g_y,g=0\},\{x,y,lambda\});\nsol2:=fsolve(\{f_x=lambda*g_x,f_y=lambda*
g_y,g=0\},\{x,y,lambda\},\{x=-0.5 .. 0.5,y=0..2\});" }}}{EXCHG {PARA
0 "" 0 "" {TEXT -1 0 "" }{TEXT 289 50 "These lines evaluate f at the p
oints found above. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 290 91 "Ca
n you compare these to the values of f you found for the level curves \+
which were tangent?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "subs(sol1,f)
; subs(sol2,f);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}
{MARK "3" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33
1 1 }