{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 264 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 266 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 269 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 272 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 276 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 280 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 281 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 282 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 283 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 284 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 285 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 286 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 287 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 288 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 289 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 290 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 291 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 292 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 293 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 294 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 295 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 296 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 297 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 298 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 299 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 300 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 301 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 302 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 303 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 304 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 305 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 306 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 307 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 308 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 309 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 310 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 311 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 312 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 313 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 314 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 315 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 316 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 317 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 318 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 319 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 320 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 321 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 322 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 323 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 324 "" 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 } {CSTYLE "" -1 325 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 326 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 327 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 328 "" 1 10 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 329 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 330 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 331 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 332 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 333 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 334 "" 1 10 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 335 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 336 "" 1 10 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 337 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 338 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 339 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times " 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG }{EXCHG {PARA 256 "" 0 "" {TEXT -1 0 "" }{TEXT 330 0 " " }{TEXT 331 23 "Calculus IV with Maple\n" }{TEXT 332 32 "Copyright 20 02, Dr. Jack Wagner\n" }{TEXT -1 30 "j.wagner@intelligentsearch.com" } }}{EXCHG {PARA 4 "" 0 "" {TEXT -1 11 "\nLesson 3: " }{TEXT 333 91 "App lications of Vector Derivatives: Multivariate extrema, Newton's method and Taylor series" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 5 "" 0 "" {TEXT -1 0 "" }{TEXT 327 0 "" }{TEXT 328 0 "" }{TEXT 329 313 " Topics : The ideas and methods of of the calculus of a single variabl e are extended to the problem of maxima and minima of a function of tw o variables. Degenerate critical points. Taylor series for functions \+ of more than one variable including truncation error estimate Newton' s method with multiple variables." }{TEXT 334 1 " " }}{PARA 5 "" 0 "" {TEXT 335 28 "\nMaple commands introduced: " }{TEXT 336 47 "Eigenvalue s, Hessian, mtaylor, sphere, coeftayl" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 4 "" 0 "" {TEXT -1 0 "" }{TEXT 256 32 "M axima, Minima and Saddle Points" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 18 " Given " }{TEXT 278 1 "F" }{TEXT -1 1 ": " }{XPPEDIT 18 0 "R^3;" "6#*$%\"RG\"\"$" }{TEXT -1 4 " -> " }{TEXT 279 1 "R" }{TEXT -1 17 " on an open set, " }{TEXT 280 2 "U." } {MPLTEXT 0 21 1 " " }{TEXT -1 47 "We define the set of critical points , \{X\}, of " }{TEXT 282 1 "F" }{TEXT -1 5 ", by" }{MPLTEXT 0 21 1 " " }{TEXT -1 0 "" }{TEXT 281 0 "" }{TEXT -1 7 "\{x|grad" }{TEXT 283 1 "F" }{TEXT -1 7 "(x) = 0" }{TEXT 284 1 " " }{TEXT -1 17 "\} for all x \+ in X." }{MPLTEXT 0 21 1 " " }{TEXT -1 9 "A point, " }{XPPEDIT 18 0 "x[ 0];" "6#&%\"xG6#\"\"!" }{TEXT -1 35 ", is a local maximum (minimum) fo r " }{TEXT 285 1 "F" }{TEXT -1 33 " if there exists a neighborhood, " }{TEXT 286 2 "V " }{TEXT -1 3 "of " }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6# \"\"!" }{TEXT -1 28 " , such that for every x in " }{TEXT 287 1 "V" } {TEXT -1 2 ", " }{XPPEDIT 18 0 "F(x) <= F(x[0]);" "6#1-%\"FG6#%\"xG-F% 6#&F'6#\"\"!" }{TEXT -1 19 ". If, at a point, " }{XPPEDIT 18 0 "x[0]; " "6#&%\"xG6#\"\"!" }{TEXT -1 2 ", " }{MPLTEXT 0 21 1 " " }{TEXT -1 94 "F(x) attains a local maximum (minimum), we know from the calculus of a single variable that " }{XPPEDIT 18 0 "Diff(F,x[k]);" "6#-%%Dif fG6$%\"FG&%\"xG6#%\"kG" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\" xG6#\"\"!" }{TEXT -1 28 ") = 0 for every k; i.e grad" }{TEXT 288 1 "F " }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 5 ") = 0" }{MPLTEXT 0 21 1 "." }{TEXT -1 137 "Consequently, every extr eme point of F lies in \{X\} although there may be points in \{X\} tha t are not extreme points. The hypothesis that " }{TEXT 289 1 "U" } {TEXT -1 91 " be open is critical since otherwise a maximum (minimum) \+ point might lie at an endpoint of " }{TEXT 290 1 "U" }{TEXT -1 2 ". " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 259 12 "Example 3.1" }}{PARA 0 "" 0 "" {MPLTEXT 0 21 1 "\n" }{TEXT -1 50 "Find the local maxima and minima of the function:\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 1 " " }{XPPEDIT 18 0 "z = cos(x+ y)+x^2;" "6#/%\"zG,&-%$cosG6#,&%\"xG\"\"\"%\"yGF+F+*$F*\"\"#F+" } {TEXT -1 24 " | x = -1..1, y = " }{XPPEDIT 18 0 "-3*Pi/2;" "6#,$ *(\"\"$\"\"\"%#PiGF&\"\"#!\"\"F)" }{TEXT -1 4 " .. " }{XPPEDIT 18 0 "- 3*Pi/2;" "6#,$*(\"\"$\"\"\"%#PiGF&\"\"#!\"\"F)" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 63 "restart: with(plots):with(VectorCalculus):with (LinearAlgebra): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "F := \+ (x, y) -> cos(x + y) + x^2:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "plot3d([x, y, F(x, y)], x = -1..1, y = \n-1.5 * Pi..1.5 * Pi, a xes = framed, color = blue, style = wireframe, labels = [x, y, z]); \011\n\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "At a local maximum (m inimum)" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "D[v]*F(x[0]);" "6#*&&%\" DG6#%\"vG\"\"\"-%\"FG6#&%\"xG6#\"\"!F(" }{TEXT -1 4 " = 0" }{MPLTEXT 0 21 1 " " }{TEXT -1 81 "for every v. From the plot, however, it is ap parent that there are points where " }{XPPEDIT 18 0 "D[v]*F(x[0]);" " 6#*&&%\"DG6#%\"vG\"\"\"-%\"FG6#&%\"xG6#\"\"!F(" }{TEXT -1 156 " = 0, \+ but which are neither local maxima nor minima because F increases in s ome directions but decreases in others. Such a point is called a saddl e point. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "dF[x] := dif f(F(x, y), x);\n \ndF[y] := diff(F(x, y), y);\n \+ " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 83 "By inspecting the plot we select appropri ate ranges in which to look for solutions." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 61 "fsolve(\{dF[x], dF[y]\}, \{x = -1..1, y = -1/2 * Pi ..1/2 * Pi\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "fsolve(\{ dF[x], dF[y]\}, \{x = -1..1, y = -3/2 * Pi..-1/2 * Pi\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "fsolve(\{dF[x], dF[y]\}, \{x = -1.. 1, y = 1/2 * Pi..3/2 * Pi\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 227 "These points could be visualized wit h pointplot3d, but they would be lost in the plot of F. In order to vi sualize them together with F, we need to see them as small spheres. I n the plottools package there is a sphere function." }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "sphere" 2 "sphere" "" }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "with(plottools):\np1 := sp here([0, 0, F(0, 0)], .07):\np2 := sphere([0, -Pi, F(0, -Pi)], .07): \np3 := sphere([0, Pi, F(0, Pi)], .07):\n" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 137 "P1 := plot3d([x, y, F(x, y)], x = -1..1, y = \n-1 .5 * Pi..1.5 * Pi, axes = framed, color = blue, style = wireframe, lab els = [x, y, z]):\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "disp lay(p1, p2, p3, P1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "The spher es are seen as ellipsoidal because the scaling is not \"constrained\". " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 325 "Now we need a criterion for \+ determining whether a point is a local minimum, maximum or saddle poin t. We are going to look for a generalization of what we already know \+ from the calculus of a single variable; i.e. that the second derivativ e is negative (positive) at a relative maximum (minimum). Since, at a critical point, " }{XPPEDIT 18 0 "Diff(F,x[k]) = 0;" "6#/-%%DiffG6$% \"FG&%\"xG6#%\"kG\"\"!" }{TEXT -1 18 ", for every v = \{" }{XPPEDIT 18 0 "v[1];" "6#&%\"vG6#\"\"\"" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "v[2]; " "6#&%\"vG6#\"\"#" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "v[3];" "6#&%\"vG6 #\"\"$" }{TEXT -1 5 ", ..." }{XPPEDIT 18 0 "v[n];" "6#&%\"vG6#%\"nG" } {TEXT -1 3 "\}, " }{XPPEDIT 18 0 "D[v]*F = Sum(v[k]*Diff(F,x[k]),k = 1 .. n);" "6#/*&&%\"DG6#%\"vG\"\"\"%\"FGF)-%$SumG6$*&&F(6#%\"kGF)-%%Dif fG6$F*&%\"xG6#F1F)/F1;F)%\"nG" }{TEXT -1 4 " = 0" }{MPLTEXT 0 21 1 ". " }{TEXT -1 175 " This alternative criterion for a critical point ext ends naturally to criteria for determining whether a critical point is a local maximum a local minimum or a saddle point. " }{MPLTEXT 0 21 1 " " }{TEXT -1 11 "We look at " }{XPPEDIT 18 0 "D[v]*D[v]*F;" "6#*(&% \"DG6#%\"vG\"\"\"&F%6#F'F(%\"FGF(" }{TEXT -1 183 " ; that is, the deri vative in every direction of the first derivatives. Since every vecto r can be represented in a basis consisting of the coordinate vectors, \+ it suffices to consider" }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 1 " \+ " }{XPPEDIT 18 0 "D[v]*Sum(v[k]*Diff(F,x[k]),k = 1 .. n);" "6#*&&%\"DG 6#%\"vG\"\"\"-%$SumG6$*&&F'6#%\"kGF(-%%DiffG6$%\"FG&%\"xG6#F/F(/F/;F(% \"nGF(" }{TEXT -1 3 " = " }{XPPEDIT 18 0 "Sum(Sum(v[j]*v[k]*Diff(Diff( F,x[k]),x[j]),j = 1 .. n),k = 1 .. n);" "6#-%$SumG6$-F$6$*(&%\"vG6#%\" jG\"\"\"&F*6#%\"kGF--%%DiffG6$-F26$%\"FG&%\"xG6#F0&F86#F,F-/F,;F-%\"nG /F0;F-F>" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "In mat rix form this looks like:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" } {MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "matrix([[v[1], %?, %?, v[n]]]);" " 6#-%'matrixG6#7#7&&%\"vG6#\"\"\"%#%?GF,&F)6#%\"nG" }{XPPEDIT 18 0 "mat rix([[Diff(F,x[1],x[1]), %?, %?, Diff(F,x[1],x[n])], [%?, %?, %?, %?], [%?, %?, %?, %?], [Diff(F,x[n],x[1]), %?, %?, Diff(F,x[n],x[n])]]);" "6#-%'matrixG6#7&7&-%%DiffG6%%\"FG&%\"xG6#\"\"\"&F-6#F/%#%?GF2-F)6%F+& F-6#F/&F-6#%\"nG7&F2F2F2F27&F2F2F2F27&-F)6%F+&F-6#F9&F-6#F/F2F2-F)6%F+ &F-6#F9&F-6#F9" }{TEXT -1 1 " " }{XPPEDIT 18 0 "matrix([[v[1]], [%?], \+ [%?], [v[n]]]);" "6#-%'matrixG6#7&7#&%\"vG6#\"\"\"7#%#%?G7#F-7#&F)6#% \"nG" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 126 "Notice th at, when dealing with matrices, it is necessary to distinguish between horizontal and vertical vectors. The matrix, " }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 2 " " }{XPPEDIT 18 0 "matrix([[Diff(F,x[1],x[1]), \+ %?, %?, Diff(F,x[1],x[n])], [%?, %?, %?, %?], [%?, %?, %?, %?], [Diff( F,x[n],x[1]), %?, %?, Diff(F,x[n],x[n])]]);" "6#-%'matrixG6#7&7&-%%Dif fG6%%\"FG&%\"xG6#\"\"\"&F-6#F/%#%?GF2-F)6%F+&F-6#F/&F-6#%\"nG7&F2F2F2F 27&F2F2F2F27&-F)6%F+&F-6#F9&F-6#F/F2F2-F)6%F+&F-6#F9&F-6#F9" } {MPLTEXT 0 21 2 " " }}{PARA 0 "" 0 "" {TEXT -1 26 "is known as the He ssian, " }{XPPEDIT 18 0 "H[f];" "6#&%\"HG6#%\"fG" }{TEXT -1 2 ". " }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Evaluated at a point x, it is wri tten " }{XPPEDIT 18 0 "H[f(x)];" "6#&%\"HG6#-%\"fG6#%\"xG" }{TEXT -1 0 "" }{MPLTEXT 0 21 1 "." }{TEXT -1 67 "The Hessian is found with the \+ Maple functions, hessian and Hessian." }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "Hessian" 2 "Hessian" "" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "hessian" 2 "hessian" "" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "h[f] := Hessian(F(x, \+ y), [x, y]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "We need a functio nal form." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "H[f] := X -> \+ subs(\{x = X[1], y = X[2]\}, h[f]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 422 "The criteria we are looking for is this. When, at a critical \+ point, the second derivative is negative (positive) in every direction , then that point is a local maximum (minimum). In other words we nee d to determine whether, in some sense, the Hessian is positive or nega tive. What does it mean for the Hessian matrix to be negative (positi ve)? The correct interpretation of this statement is that for any v ector v, " }{XPPEDIT 18 0 "v^T*H[f(x)]*v < 0;" "6#2*()%\"vG%\"TG\"\" \"&%\"HG6#-%\"fG6#%\"xGF(F&F(\"\"!" }{TEXT -1 11 " , (>0) " } {MPLTEXT 0 21 2 ". " }{TEXT -1 222 "It suffices to consider only unit \+ vectors, u, because, if the statement is true for a normalized vector , it will be true of the original vector. We are led therefore, to con sider the following problem. For which x will " }{XPPEDIT 18 0 "H[f( x)];" "6#&%\"HG6#-%\"fG6#%\"xG" }{TEXT -1 1 " " }{MPLTEXT 0 21 1 " " } {TEXT -1 12 "be such that" }{MPLTEXT 0 21 1 " " }{TEXT -1 4 "Max\{" } {XPPEDIT 18 0 "u^T*H[f(x)]*u < 0;" "6#2*()%\"uG%\"TG\"\"\"&%\"HG6#-%\" fG6#%\"xGF(F&F(\"\"!" }{TEXT -1 33 "\}, subject to the constraint that " }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "u^T*u = 1;" "6#/*&)%\"uG%\"TG\" \"\"F&F(F(" }{TEXT -1 0 "" }{MPLTEXT 0 21 7 ".\n\011 " }{TEXT -1 57 "We apply the method of Lagrange multipliers, noting that " } {XPPEDIT 18 0 "H[f(x)]" "6#&%\"HG6#-%\"fG6#%\"xG" }{MPLTEXT 0 21 1 " \+ " }{TEXT -1 70 "is symmetric because of the equality of the mixed part ial derivatives." }{MPLTEXT 0 21 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(u^T,u):" "6#-%%DiffG6$)%\"uG%\"TGF'" }{XPPEDIT 18 0 "H[f(x)];" "6#&%\"HG6#-%\"fG6#%\"xG" }{XPPEDIT 18 0 "u;" "6#%\"uG" } {TEXT -1 4 " = 2" }{XPPEDIT 18 0 "u^T*H[f(x)]:" "6#*&)%\"uG%\"TG\"\"\" &%\"HG6#-%\"fG6#%\"xGF'" }{TEXT -1 53 " Compute the derivative of the primary equation." }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(u^T*u,u) = 2*u^T;" "6#/-%%DiffG6$*&)%\"uG%\"TG\"\"\"F)F+F)*&\"\"#F+)F)F*F+" } {TEXT -1 64 " Compute the derivative of the cons traint." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{XPPEDIT 18 0 "u^T*H[f(x)]; " "6#*&)%\"uG%\"TG\"\"\"&%\"HG6#-%\"fG6#%\"xGF'" }{TEXT -1 3 " = " } {XPPEDIT 18 0 "lambda*u^T;" "6#*&%'lambdaG\"\"\")%\"uG%\"TGF%" }{TEXT -1 59 " Use the Lagrange multiplier principle." }} }{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 4 " " }{TEXT -1 31 "By taking transposes we obtain:" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "H[f(x)]*u ^T;" "6#*&&%\"HG6#-%\"fG6#%\"xG\"\"\")%\"uG%\"TGF+" }{TEXT -1 3 " = " }{XPPEDIT 18 0 "lambda*u^T:" "6#*&%'lambdaG\"\"\")%\"uG%\"TGF%" } {TEXT -1 0 "" }{MPLTEXT 0 21 1 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "Lambda is thus an eigenvalue, and " }{TEXT 275 1 "u" }{TEXT -1 19 " an eigenvector, of" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "H[f(x)];" " 6#&%\"HG6#-%\"fG6#%\"xG" }{MPLTEXT 0 21 1 "." }{TEXT -1 27 "Multiplyin g on the left by " }{XPPEDIT 18 0 "u^T;" "6#)%\"uG%\"TG" }{MPLTEXT 0 21 1 ":" }{XPPEDIT 18 0 "u^T*H[f(x)]*u;" "6#*()%\"uG%\"TG\"\"\"&%\"HG6 #-%\"fG6#%\"xGF'F%F'" }{TEXT -1 3 " = " }{XPPEDIT 18 0 "lambda*u^T*u; " "6#*(%'lambdaG\"\"\")%\"uG%\"TGF%F'F%" }{TEXT -1 0 "" }{MPLTEXT 0 21 3 " = " }{XPPEDIT 18 0 "lambda;" "6#%'lambdaG" }{MPLTEXT 0 21 1 " \+ " }{TEXT -1 8 "Because " }{XPPEDIT 18 0 "H[f(x)]" "6#&%\"HG6#-%\"fG6#% \"xG" }{TEXT -1 121 " is symmetric, we are guaranteed that all its ei genvalues are real. We have found, therefore, that if the eigenvalues \+ of" }{MPLTEXT 0 21 1 " " }{TEXT -1 0 "" }{XPPEDIT 18 0 "H[f(x)]" "6#&% \"HG6#-%\"fG6#%\"xG" }{MPLTEXT 0 21 1 " " }{TEXT -1 18 "are all negati ve, " }{TEXT 276 1 "x" }{TEXT -1 55 " is a local maximum, whereas if t hey are all positive, " }{TEXT 277 1 "x" }{TEXT -1 330 " is a local mi nimum. If some are positive and others negative, then we are at a sa ddle point, where the value of F is increasing in some directions and \+ decreasing in others. \n\011Maple provides a number of functions in th e linalg package for working with eigenvalues and eigenvectors. We wi ll require only one of these functions; " }{TEXT 260 0 "" }{TEXT 261 11 "eigenvalues" }{TEXT 321 2 " " }{TEXT 322 4 "or " }{TEXT 323 0 " " }{TEXT 324 11 "Eigenvalues" }{TEXT 325 0 "" }{TEXT 326 0 "" }}} {EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "Eigenvalues" 2 "Eigenvalues" "" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "eigenvalues " 2 "eigenvalues" "" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Eigenvalues(H[f]([0, Pi]), output = 'list');" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Eigenvalues(H[f]([0, -Pi]), \+ output = 'list');" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Eigenv alues(H[f]([0, 0]), output = 'list');" }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 5 " " }{TEXT -1 20 "The two points, (0, " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 11 ") and (0, " }{XPPEDIT 18 0 "-Pi;" "6#,$%#PiG!\"\"" }{TEXT -1 1 ")" }{MPLTEXT 0 21 1 " " }{TEXT -1 33 "ar e relative minima and the point" }{MPLTEXT 0 21 1 " " }{TEXT -1 6 "(0, 0)" }{MPLTEXT 0 21 1 " " }{TEXT -1 78 "is a saddle point. \n\011With \+ the method now in hand we will try another example. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 11 "Ex ample 3.2" }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "F(x+y);" "6#-%\"FG 6#,&%\"xG\"\"\"%\"yGF(" }{TEXT -1 5 " = " }{XPPEDIT 18 0 "e^cos(x)+e ^sin(x);" "6#,&)%\"eG-%$cosG6#%\"xG\"\"\")F%-%$sinG6#F)F*" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "restart: with(plots) :with(LinearAlgebra): with(VectorCalculus):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "F := X -> exp(cos(X[1])) + exp(cos(X[2])):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "plot3d([x, y, F([x, y])], x = -3/2 * Pi..3/2 * Pi, y = -1..1, axes = framed, color = blue, style \+ = wireframe, labels = [x, y, z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "We need this plot in order to select appropriate ranges for the " }{TEXT 337 6 "fsolve" }{TEXT -1 10 " function." }{MPLTEXT 0 21 8 " \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "dF[x] := diff(F([x , y]), x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "dF[y] := dif f(F([x, y]), y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "fsolve( \{dF[x] = 0, dF[y] = 0\}, \{x, y\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "fsolve(\{dF[x] = 0, dF[y] = 0\}, \{x = 2..4, y = -1.. 1\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "fsolve(\{dF[x] = 0 , dF[y] = 0\}, \{x = -4..-2, y = -1..1\});" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 16 "with(plottools):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 159 "p1 := sphere([0, 0, F([0, 0])], .07):\np2 := spher e([3.141592654, 0, F([3.141592654, 0])], .07):\np3 := sphere([-3.1415 92654, 0, F([-3.141592654, 0])], .07):\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 137 "P1 := plot3d([x, y, F([x, y])], x = -3/2 * Pi..3/2 \+ * Pi, y = -1..1, axes = framed, color = blue, style = wireframe, label s = [x, y, z]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "display( p1, p2, p3, P1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "This plot is not a necessity but it furnishes a satisfying visual confirmation tha t we are on target." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "h[f] := Hessian(F([x, y]), [x, y]);\nH[f] := X -> subs(\{x = X[1], y = X [2]\}, h[f]):\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "Eigenval ues(H[f]([0, Pi]), 'output' = list);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "radsimp(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Eigenvalues(H[f]([0, 0]), 'output' = list);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 45 "Eigenvalues(H[f]([0, -Pi]), 'output' = list) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "radsimp(%);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evalf(F([0, 0]));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalf(F([0, Pi]));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "evalf(F([0, -Pi]));" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "The points" }{MPLTEXT 0 21 1 " " } {TEXT -1 4 "(0, " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 2 ", " } {XPPEDIT 18 0 "3.086161269;" "6#-%&FloatG6$\"+p7;'3$!\"*" }{TEXT -1 1 ")" }{MPLTEXT 0 21 1 "\005" }{TEXT -1 4 " and" }{MPLTEXT 0 21 1 " " } {TEXT -1 4 "(0, " }{XPPEDIT 18 0 "-Pi;" "6#,$%#PiG!\"\"" }{TEXT -1 2 " , " }{XPPEDIT 18 0 "3.086161269;" "6#-%&FloatG6$\"+p7;'3$!\"*" }{TEXT -1 1 ")" }{MPLTEXT 0 21 1 " " }{TEXT -1 31 "are saddle points and the \+ point" }{MPLTEXT 0 21 1 " " }{TEXT -1 19 "(0, 0, 5.436563656)" } {MPLTEXT 0 21 1 " " }{TEXT -1 66 "is a local maximum. \nWhat happens i f the machinery doesn't work? " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 262 0 "" }}{PARA 0 "" 0 "" {TEXT 263 12 "Example 3.3" }} {PARA 0 "" 0 "" {TEXT 339 1 "\n" }{TEXT 264 0 "" }{TEXT -1 48 "Here is a perfectly innocuous looking function. " }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "F(x,y,z) = x^4-12*x^3+54*x^2-108*x+y^4-16*y^3+96*y^2-25 6*y-z^4+339;" "6#/-%\"FG6%%\"xG%\"yG%\"zG,6*$F'\"\"%\"\"\"*&\"#7F-*$F' \"\"$F-!\"\"*&\"#aF-*$F'\"\"#F-F-*&\"$3\"F-F'F-F2*$F(F,F-*&\"#;F-*$F(F 1F-F2*&\"#'*F-*$F(F6F-F-*&\"$c#F-F(F-F2*$F)F,F2\"$R$F-" }{TEXT -1 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "We will look for extreme valu es of F." }{MPLTEXT 0 21 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "restart: with(plots):with(LinearAlgebra): with(VectorCalculus): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "To gain an idea of what we ar e working with we plot the surface" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "F(0)^(-1);" "6#)-%\"FG6#\"\"!,$\"\"\"!\"\"" }{TEXT -1 1 "." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "F := x^4-12 * x^3 + 54 * x^ 2-108 * x + 339 + y^4-16 * y^3 + 96 * y^2-256 * y-z^4:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "r := x = 0..10, y = 0..10, z = 0.. 10:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "implicitplot3d(F, r, axes = boxed, grid=[25,25,25], lightmodel=light2, style = patchnogrid );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "dF[x] := diff(F, x); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "dF[y] := diff(F, y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "dF[z] := diff(F, z);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "fsolve(dF[x], x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "fsolve(dF[y], y);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "fsolve(dF[z], z);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "h := Hessian(F, [x, y, z]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "H := subs(\{x = 3, y = 4, z = 0\}, h);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 502 "If the determinant of the Hessian is zero at a cr itical point, then that point is a degenerate critical point. How to \+ handle this situation in all generality is not a simple question. It \+ requires the use of higher order partial derivatives. A fuller (but \+ not complete) explanation will appear in the section on Taylor polynom ials. The present case is not too difficult because the Hessian is a diagonal matrix whose entries are polynomials in a single variable. \+ Taking third derivatives we have:" }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "matrix([[24*x, %?, %?], [%?, 24*y-192, %?], [%?, %?, -36*z^2]]); " "6#-%'matrixG6#7%7%*&\"#C\"\"\"%\"xGF*%#%?GF,7%F,,&*&F)F*%\"yGF*F*\" $#>!\"\"F,7%F,F,,$*&\"#OF**$%\"zG\"\"#F*F2" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "This is s till the zero matrix at (3, 4, 0). Repeating the process" }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "matrix([[24, %?, %?], [%?, 24, %?], [%? , %?, -72*z]]);" "6#-%'matrixG6#7%7%\"#C%#%?GF)7%F)F(F)7%F)F),$*&\"#s \"\"\"%\"zGF/!\"\"" }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 189 "This matrix has eigenvalues 24, \+ 24, 0, suggesting that the point (3, 4, 0) is a local minimum. This i s easily confirmed by trying values of the variables in a neighborho od of (3, 4, 0)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "f := u napply(F, [x, y, z]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "fo r k from 1 to 20 do v.k := f(2 + .1 * k, 3 + .1 * k, -1 + .1 * k) od: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "S := [seq([n, v.n], n \+ = 1..20)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "pointplot(S, connect = true, labels = [\"k\", \"F\"], title = \"Variation of F(x, \+ y, z) in a neighborhood of (3, 4, 0).\");" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 85 "This plot clearly shows that F is a minimum when k = 10, \+ i.e. at the point [3, 4, 0]." }{MPLTEXT 1 0 1 " " }{TEXT -1 1 " " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 265 0 "" }}{PARA 0 "" 0 " " {TEXT 266 15 "Newton's Method" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "Recall from the calculus of a single variable the recursion formul a for Newton's method." }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "x[n+1] = \+ x[n];" "6#/&%\"xG6#,&%\"nG\"\"\"F)F)&F%6#F(" }{XPPEDIT 18 0 "-f(x[n])/ Diff(f,x)(x[n]);" "6#,$*&-%\"fG6#&%\"xG6#%\"nG\"\"\"--%%DiffG6$F&F)6#& F)6#F+!\"\"F4" }{TEXT -1 0 "" }{MPLTEXT 0 21 3 " . " }{TEXT -1 105 "We would like to have something similar for the multivariate problem. W e seek a solution to the equation" }{MPLTEXT 0 21 1 " " }{TEXT -1 0 " " }{TEXT 291 1 "f" }{TEXT -1 1 "(" }{TEXT 292 1 "x" }{TEXT -1 13 ") = \+ 0, where " }{TEXT 293 9 " x" }{TEXT -1 4 " = (" }{XPPEDIT 18 0 "x[1],x[2],x[3];" "6%&%\"xG6#\"\"\"&F$6#\"\"#&F$6#\"\"$" }{TEXT -1 5 " , ..." }{XPPEDIT 18 0 "x[n];" "6#&%\"xG6#%\"nG" }{TEXT -1 6 "). Let" } {MPLTEXT 0 21 1 " " }{TEXT -1 0 "" }{TEXT 294 0 "" }{TEXT 295 1 "x" } {MPLTEXT 0 21 1 " " }{TEXT -1 26 "be the exact solution and " } {XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{MPLTEXT 0 21 1 " " }{TEXT -1 38 "be the initial approximation. Then, " }}{PARA 0 "" 0 "" {TEXT 296 0 "" }{TEXT 297 1 "x" }{TEXT 298 0 "" }{TEXT -1 1 " " } {XPPEDIT 18 0 "-x[0] = Delta;" "6#/,$&%\"xG6#\"\"!!\"\"%&DeltaG" } {XPPEDIT 18 0 "x;" "6#%\"xG" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 "0 = " }{TEXT 299 1 "f" }{TEXT -1 1 "(" }{TEXT 300 0 "" }{TEXT 301 1 "x" }{TEXT 302 0 "" }{TEXT -1 4 ") = " }{TEXT 303 1 "f" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 3 " + " } {XPPEDIT 18 0 "Delta;" "6#%&DeltaG" }{TEXT -1 6 "x) ~ " }{TEXT 304 1 "f" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 4 ") + " }{TEXT 305 2 "Df" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" " 6#&%\"xG6#\"\"!" }{TEXT -1 2 ")(" }{TEXT 306 0 "" }{TEXT 307 1 "x" } {TEXT 308 0 "" }{TEXT -1 1 "-" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"! " }{TEXT -1 1 ")" }}{PARA 0 "" 0 "" {MPLTEXT 0 21 1 " " }{TEXT -1 0 " " }{MPLTEXT 0 21 1 "\011" }{TEXT -1 24 " Keep in mind that" } {MPLTEXT 0 21 1 " " }{TEXT -1 0 "" }{TEXT 309 2 "Df" }{TEXT -1 1 "(" } {XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 1 ")" }{MPLTEXT 0 21 1 " " }{TEXT -1 36 "is the Jacobian matrix evaluated at " } {XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{MPLTEXT 0 21 2 ". " }{TEXT -1 25 "Our next approximation to" }{MPLTEXT 0 21 1 " " }{TEXT -1 0 "" }{TEXT 310 0 "" }{TEXT 311 1 "x" }{TEXT 312 0 "" }{TEXT -1 0 "" } {MPLTEXT 0 21 2 ", " }{TEXT -1 4 " say" }{MPLTEXT 0 21 1 " " } {XPPEDIT 18 0 "x[1];" "6#&%\"xG6#\"\"\"" }{MPLTEXT 0 21 1 " " }{TEXT -1 24 "will be found by solving" }{MPLTEXT 0 21 2 " " }{TEXT -1 0 "" }{TEXT 313 1 "f" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\" \"!" }{TEXT -1 4 ") + " }{TEXT 314 2 "Df" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 2 ")(" }{TEXT 315 0 "" } {XPPEDIT 18 0 "x[1];" "6#&%\"xG6#\"\"\"" }{TEXT -1 1 "-" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 1 ")" }{MPLTEXT 0 21 3 " = " } {TEXT -1 20 "0, thereby obtaining" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "x[1] = x[0];" "6#/&%\"xG6#\"\"\"&F%6#\"\"!" }{XPPEDIT 18 0 "-D*f(x[ 0])^(-1);" "6#,$*&%\"DG\"\"\")-%\"fG6#&%\"xG6#\"\"!,$F&!\"\"F&F0" } {TEXT -1 3 " * " }{TEXT 316 1 "f" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[0] ;" "6#&%\"xG6#\"\"!" }{TEXT -1 62 "); a result completely analogous t o the single variable case." }{MPLTEXT 0 21 2 " \n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 100 "To implement thi s we need an approximation to the solution. This can be a far from tr ivial problem." }}{PARA 0 "" 0 "" {MPLTEXT 0 21 1 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 267 12 "Example 3.6" }{MPLTEXT 0 21 2 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "Solve:" }{MPLTEXT 0 21 1 " \+ " }{TEXT -1 1 " " }{XPPEDIT 18 0 "4*x^2-y+cos(x+y)-4 = 0;" "6#/,**&\" \"%\"\"\"*$%\"xG\"\"#F'F'%\"yG!\"\"-%$cosG6#,&F)F'F+F'F'F&F,\"\"!" } {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 13 " " } {XPPEDIT 18 0 "y^2-3*x^2+ln(x+y)-3 = 0;" "6#/,**$%\"yG\"\"#\"\"\"*&\" \"$F(*$%\"xGF'F(!\"\"-%#lnG6#,&F,F(F&F(F(F*F-\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "For systems having only two variables, Maple make s it easy." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "restart: with (plots):with(LinearAlgebra):with(VectorCalculus):" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 68 "g1 := 4 * x^2-y + cos(x + y)-4: g2 := y^2 -3 * x^2 + log(x + y)-3:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "implicitplot(\{g1, g2\}, x = 0..4, y = 0..4);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "By pointing and clicking we find the graphical estim ate (1.35, 2.69)\011" }{MPLTEXT 0 21 1 "\011" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "a := <1.35, 2.69>;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 32 "Define a vector valued fu nction." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "F := X -> subs( \{x = X[1], y = X[2]\}, ):\nF(X);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 "Now compute the Jacobian. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "dF := Jacobian(, [x, y]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 64 "Define another vector valued function that is the inver se of dF." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "invdF := Matri xInverse(dF); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "invdF2 := X -> subs(\{x = X[1], y = X[2] \}, invdF ):\ninvdF2(X);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 45 "The Newton recurrence relationship is sim ple." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "Delta := <1.0|1.0 >: while(Norm(Delta, 2)>10^(-7)) do\n Delta := invdF(a).F(a): a := a -Delta: od: print(a);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 20 "We check the answer." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 19 "print(evalf(F(a)));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 191 "Beyond two unknowns, \+ the problem of getting an initial estimate becomes more complex; there may not be a solution. In the case of three variables a 3d plot may \+ give a satisfactory estimate. " }{MPLTEXT 0 21 1 "\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 268 12 "Example 3.4" }{MPLTEXT 0 21 1 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "Solve the following system \+ of equations." }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "x+sin(y)-5 = 0;" "6#/, (%\"xG\"\"\"-%$sinG6#%\"yGF&\"\"&!\"\"\"\"!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{XPPEDIT 18 0 "y^2+ln(x)-10 = 0;" "6#/,(*$%\"yG\"\"#\"\"\"-%# lnG6#%\"xGF(\"#5!\"\"\"\"!" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "x-y-z+5 = 0;" "6#/,*%\"xG\"\"\"%\"yG!\"\"%\"zGF(\"\"&F&\"\"!" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "restart: with(plots):with(L inearAlgebra): with(VectorCalculus):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "f1 := x + sin(y)-5: f2 := y^2 + log(x)-10: f3 := \+ x-y-z + 5:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 294 "p1 := impli citplot3d(f1, x = 0..8, y = 0..8, z=-5..10, color = red):\np2 := impli citplot3d(f2, x = 0..8, y = 0..8, z=-5..10, color = blue, axes = frame d):\np3 := implicitplot3d(f3, x = 0..8, y = 0..8, z=-5..10, color = gr een, axes = framed):\ndisplay(p1,p2,p3, axes = framed, style=patchnogr id); \n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "The intersection of t he three surfaces approximates the solution to the system of equations .. Call the estimated answer " }{TEXT 338 1 "a" }{TEXT -1 1 "." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "a := <5.0, 2.5, 7.5>;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 99 "Wi th the method of the previous example in hand we make a few obvious ch anges for three dimensions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "F := X -> subs(\{x = X[1], y = X[2], z = X[3]\}, ):\n F(X);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "dF := Jacobian(, [x, y, z]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " invdF := MatrixInverse(dF);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "invdF2 := X -> subs(\{x = X[1], y = X[2], z = X[3]\}, invdF):\nin vdF2(X);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 157 "Delta := <1.0 , 1.0, 1.0>: while(Norm(Delta, 2)>10^(-7)) do a := evalf(a-invdF(a). F(a)): Delta := evalf(invdF(a).F(a)): od: print(a); print(evalf(F(a) ));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "In addition to the answer, we have computed the value of F at that point as a check." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 4 "" 0 "" {TEXT -1 0 "" }{TEXT 269 13 "Taylor Series" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 342 "The Taylor series and Taylor remainder f ormula for functions of a single variable generalize to the multivaria te case. Because we can only plot functions in three dimensions we wi ll examine the case of two variables, but the same ideas and principle s apply equally to higher dimensions. We will denote differentiation \+ with respect to x by " }{XPPEDIT 18 0 "D[1];" "6#&%\"DG6#\"\"\"" } {TEXT -1 42 " and differentiation with respect to y by " }{XPPEDIT 18 0 "D[2];" "6#&%\"DG6#\"\"#" }{TEXT -1 50 ". Higher order derivatives \+ will be designated by " }{XPPEDIT 18 0 "D[1,2]*f = Diff(f,x,y);" "6#/* &&%\"DG6$\"\"\"\"\"#F(%\"fGF(-%%DiffG6%F*%\"xG%\"yG" }{TEXT -1 95 " \+ etc. For two variables, x and y, expanded around x = a and y = b the T aylor formula reads, " }}{PARA 0 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "f(x,y) = f(a,b);" "6#/-%\"fG6$%\"xG%\"yG-F%6$%\"aG%\"bG" }{TEXT -1 3 " + " }{XPPEDIT 18 0 "Sum(Sum(D[1]^k*D[2]^(n-k)*(x-a)^k*(y-b)^(n-k)/ (k!*(n-k)!),k = 0 .. n),n = 1 .. p);" "6#-%$SumG6$-F$6$*,)&%\"DG6#\"\" \"%\"kGF-)&F+6#\"\"#,&%\"nGF-F.!\"\"F-),&%\"xGF-%\"aGF5F.F-),&%\"yGF-% \"bGF5,&F4F-F.F5F-*&-%*factorialG6#F.F--FA6#,&F4F-F.F5F-F5/F.;\"\"!F4/ F4;F-%\"pG" }{TEXT -1 3 " + " }{XPPEDIT 18 0 "R[p];" "6#&%\"RG6#%\"pG " }{TEXT -1 0 "" }{MPLTEXT 1 0 0 "" }}{PARA 0 "" 0 "" {TEXT -1 72 "To \+ third degree the Taylor series for a function of two variables is, \+ " }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "f(x,y) = f(a,b)+D[1]*f*(a, b)*(x-a) +D[2]*f*(a, b)*(y-b)+(D[1,1]*f*(a, b)*(x-a)^2+2*D[1,2]*f*(a, b)*(x-a)* (y-b)+D[2,2]*f*(a, b)*(y-b)^2)/2!;" "6#/-%\"fG6$%\"xG%\"yG,*-F%6$%\"aG %\"bG\"\"\"**&%\"DG6#F.F.F%F.6$F,F-F.,&F'F.F,!\"\"F.F.**&F16#\"\"#F.F% F.6$F,F-F.,&F(F.F-F5F.F.*&,(**&F16$F.F.F.F%F.6$F,F-F.,&F'F.F,F5F9F.*.F 9F.&F16$F.F9F.F%F.6$F,F-F.,&F'F.F,F5F.,&F(F.F-F5F.F.**&F16$F9F9F.F%F.6 $F,F-F.,&F(F.F-F5F9F.F.-%*factorialG6#F9F5F." }{TEXT -1 3 " + " }} {PARA 0 "" 0 "" {XPPEDIT 18 0 "(D[1,1,1]*f*(a, b)*(x-a)^3+D[1,1,2]*f*( a, b)*(x-a)^2*(y-b)+D[1,2,2]*f*(a, b)*(x-a)*(y-b)^2+D[2,2,2]*f*(a, b)* (y-b)^3)/3!;" "6#*&,***&%\"DG6%\"\"\"F)F)F)%\"fGF)6$%\"aG%\"bGF),&%\"x GF)F,!\"\"\"\"$F)*,&F'6%F)F)\"\"#F)F*F)6$F,F-F),&F/F)F,F0F5,&%\"yGF)F- F0F)F)*,&F'6%F)F5F5F)F*F)6$F,F-F),&F/F)F,F0F),&F9F)F-F0F5F)**&F'6%F5F5 F5F)F*F)6$F,F-F),&F9F)F-F0F1F)F)-%*factorialG6#F1F0" }{TEXT -1 6 " + \+ R" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "R is the error introduced by truncating the series at this poi nt. \n\011Maple provides the mtaylor function in the standard library (readlib).\n" }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "mtaylor" 2 "mta ylor" "" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 270 11 "Example 3.5" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 118 "As an illustration, up to terms of the f ourth degree, the series for sin(x + y) expanded around the point (1, \+ -2) is:\011" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := sin(x \+ + y):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "`sin(x + y)`[4] := mtaylor(f, \{x = 1, y = -2\}, 5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 345 " When a function is expanded around a point, the expansi on is likely to be most accurate near that point. It is of interest t o know how accurate. That is, we need an upper bound for the truncati on error, R. The upper bound for R in an expansion to fourth degree te rms, can be estimated as follows. If the function is expanded around (" }{TEXT 317 4 "a, b" }{TEXT -1 29 ") and evaluated at a point (" }{XPPEDIT 18 0 "p[1],p[2];" "6$&%\"pG6#\"\"\"&F$6#\"\"#" }{TEXT -1 14 ") then let " }{TEXT 318 1 "h" }{TEXT -1 5 " = ( " }{XPPEDIT 18 0 " p[1],p[2];" "6$&%\"pG6#\"\"\"&F$6#\"\"#" }{TEXT -1 5 ") - (" }{TEXT 319 4 "a, b" }{TEXT -1 4 "), " }{XPPEDIT 18 0 "h[1] = abs(p[1]-a);" " 6#/&%\"hG6#\"\"\"-%$absG6#,&&%\"pG6#F'F'%\"aG!\"\"" }{TEXT -1 4 " , \+ " }{XPPEDIT 18 0 "h[2] = abs(p[2]-b);" "6#/&%\"hG6#\"\"#-%$absG6#,&&% \"pG6#F'\"\"\"%\"bG!\"\"" }{TEXT -1 115 " . Let M be the maximum val ue of all the mixed fifth order derivatives of sin(x + y) evaluated on the interval ( " }{XPPEDIT 18 0 "p[1]-h[1],p[2]-h[2];" "6$,&&%\"pG6# \"\"\"F'&%\"hG6#F'!\"\",&&F%6#\"\"#F'&F)6#F/F+" }{TEXT -1 4 ")..(" } {XPPEDIT 18 0 "p[1]+h[1],p[2]+h[2];" "6$,&&%\"pG6#\"\"\"F'&%\"hG6#F'F' ,&&F%6#\"\"#F'&F)6#F.F'" }{TEXT -1 44 ") Then the truncation error i s bounded by " }{XPPEDIT 18 0 "M*(h[1]+h[2])^5;" "6#*&%\"MG\"\"\"*$,&& %\"hG6#F%F%&F)6#\"\"#F%\"\"&F%" }{TEXT -1 93 " . We will illustrate t he idea with the slightly simpler example of expansion around (0, 0). " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 271 11 "Example 3.6" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 225 "Compute the upper bound on the truncation error, af ter third degree terms, of the Taylor expansion for the function sin(x + y) expanded around (0, 0) and evaluated at (0.1, 0.05); approximate ly x = 5 degrees , y = 3 degrees. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "restart: with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := sin(x + y):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "`sin(x + y)`[4] := mtaylor(f, \{x, y\}, 5);\011" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 124 "All the fourth degree coefficient s are zero so we need to look at the fifth degree coefficients using t he coeftayl function." }}}{EXCHG {PARA 0 "" 0 "" {HYPERLNK 17 "coeftay l" 2 "coeftayl" "" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 657 "This is a tricky syntax. Coeftayl must be informed by the use of an equation, the names of the variables (left side) and the points around which they are to be evaluated (right side). Then you must in sert, as a list, the powers to which each of the variables are to be r aised in the term whose coefficient is being calculated. In the prese nt case, with two variables the fifth order term has the following pos sibilities for the powers of x and y; [5, 0], [4, 1], [3, 2], [2, 3], \+ [1.4], [0, 5]. Because we want to see all the coefficients of fifth o rder terms we create a sequence using coeftayl. First we must call up \+ coeftayl from the standard library." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "C := [seq(coeftayl(f, [x, y] = [0, 0], [a, 5-a] ), a = 0..5)];\n " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 104 "The largest coefficients belong to the t erms containing variables raised to the [3, 2] or [2, 3] powers." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "for k from 3 to 4 do f||k := C[k] * x^(k-1) * y^(6-k)od;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 122 "The easiest way to look for the maxi mum of these terms on the interval ([0, 0], [0.1, 0.05]) is to plot th em each in turn." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "plot3d( f||3, x = 0..1, y = 0..1, axes = framed); " }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 48 "plot3d(f||4, x = 0..1, y = 0..1, axes = framed);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 132 "We rapidly determine that .08 i s the maximum value attained by either of these terms on this interval . Now put the pieces together." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "R := .08 * (.1 + .05)^5;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 137 "This is the maximum error introdu ced by truncating the series at third order terms. To check on the ac curacy of the method we calculate." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "s[1] := subs(\{x = .1, y = .05\}, `sin(x + y)`[4]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "s[2] := sin(.1 + .05); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "s[2]-s[1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 121 "The impo rtance of the Taylor series is not limited to calculation. It finds a pplication in theoretical considerations. " }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 50 "The second degree terms in the Taylor series are, " }}} {EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "(D[1,1]*f*(a, b)*(x-a)^2+2*D[1,2 ]*f*(a, b)*(x-a)*(y-b)+D[2,2]*f*(a, b)*(y-b)^2)/2!;" "6#*&,(**&%\"DG6$ \"\"\"F)F)%\"fGF)6$%\"aG%\"bGF),&%\"xGF)F,!\"\"\"\"#F)*.F1F)&F'6$F)F1F )F*F)6$F,F-F),&F/F)F,F0F),&%\"yGF)F-F0F)F)**&F'6$F1F1F)F*F)6$F,F-F),&F 8F)F-F0F1F)F)-%*factorialG6#F1F0" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "which can be rewritten as:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 " " }{XPPEDIT 18 0 "1/2;" "6#*&\"\"\"F$\"\"#!\"\"" }{TEXT -1 2 "[ \+ " }{XPPEDIT 18 0 "x-a,y-b;" "6$,&%\"xG\"\"\"%\"aG!\"\",&%\"yGF%%\"bGF' " }{TEXT -1 2 "] " }{XPPEDIT 18 0 "matrix([[D[1,1]*f*(a, b), D[1,2]*f* (a, b)], [D[2,1]*f*(a, b), D[2,2]*f*(a, b)]]);" "6#-%'matrixG6#7$7$*(& %\"DG6$\"\"\"F,F,%\"fGF,6$%\"aG%\"bGF,*(&F*6$F,\"\"#F,F-F,6$F/F0F,7$*( &F*6$F4F,F,F-F,6$F/F0F,*(&F*6$F4F4F,F-F,6$F/F0F," }{TEXT -1 1 " " } {XPPEDIT 18 0 "matrix([[x-a], [y-b]]);" "6#-%'matrixG6#7$7#,&%\"xG\"\" \"%\"aG!\"\"7#,&%\"yGF*%\"bGF," }{TEXT -1 5 " = " }{XPPEDIT 18 0 "1/ 2;" "6#*&\"\"\"F$\"\"#!\"\"" }{TEXT -1 1 "[" }{TEXT 320 8 "x-a, y-b" } {TEXT -1 1 "]" }{XPPEDIT 18 0 "H[f(a,b)];" "6#&%\"HG6#-%\"fG6$%\"aG%\" bG" }{XPPEDIT 18 0 "matrix([[x-a], [y-b]]);" "6#-%'matrixG6#7$7#,&%\"x G\"\"\"%\"aG!\"\"7#,&%\"yGF*%\"bGF," }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 242 " By shifting the origin, f(a, b) can al ways be made zero. At a critical point, all the first derivatives are \+ zero, so in a neighborhood of a critical point the function is approx imated by the terms containing second derivatives. If " }{XPPEDIT 18 0 "H[f(a,b)];" "6#&%\"HG6#-%\"fG6$%\"aG%\"bG" }{TEXT -1 195 " = 0, the n the function will be approximated by terms containing third derivati ves, etc. This is the reason why the nature of a critical point must s ometimes be determined by higher derivatives. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 272 8 "Problems" }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 3 "1. " }{TEXT -1 3 "For" }{MPLTEXT 0 21 1 " " }{XPPEDIT 18 0 "f = cos(theta)^2*sin(theta)^2-phi*sin(theta)- theta*cos(phi);" "6#/%\"fG,(*&-%$cosG6#%&thetaG\"\"#-%$sinG6#F*F+\"\" \"*&%$phiGF/-F-6#F*F/!\"\"*&F*F/-F(6#F1F/F4" }{MPLTEXT 0 21 1 " " } {TEXT -1 43 "find the critical points on the interval " }{XPPEDIT 18 0 "theta = 0 .. 2*Pi,phi = 0 .. 2*Pi;" "6$/%&thetaG;\"\"!*&\"\"#\" \"\"%#PiGF)/%$phiG;F&*&F(F)F*F)" }{MPLTEXT 0 21 1 " " }{TEXT -1 27 "an d determine their nature." }}}{EXCHG {PARA 0 "" 0 "" {MPLTEXT 0 21 2 " 2." }{TEXT -1 44 " Solve the following systems of equations." }} {PARA 0 "" 0 "" {MPLTEXT 0 21 10 " a." }{XPPEDIT 18 0 "y = ln(x ^2+y^2);" "6#/%\"yG-%#lnG6#,&*$%\"xG\"\"#\"\"\"*$F$F+F," }{TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 24 " " }{XPPEDIT 18 0 "x^2+2*y^2 = 3;" "6#/,&*$%\"xG\"\"#\"\"\"*&F'F(*$%\"yGF'F(F(\"\"$ " }}{PARA 0 "" 0 "" {TEXT -1 20 " " }{TEXT 257 4 "b . " }{XPPEDIT 18 0 "z = ln(x+y);" "6#/%\"zG-%#lnG6#,&%\"xG\"\"\"%\"yG F*" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 24 " \+ " }{XPPEDIT 18 0 "(x-3)^2+(y-3)^2 = 3;" "6#/,&*$,&%\"xG\"\"\"\"\"$ !\"\"\"\"#F(*$,&%\"yGF(F)F*F+F(F)" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 " " }{XPPEDIT 18 0 "z = x+y-3;" "6 #/%\"zG,(%\"xG\"\"\"%\"yGF'\"\"$!\"\"" }{TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 20 " " }{TEXT 258 4 "c. " }{XPPEDIT 18 0 "z = sin(x*y/3);" "6#/%\"zG-%$sinG6#*(%\"xG\"\"\"%\"yGF*\"\"$!\"\"" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 24 " \+ " }{XPPEDIT 18 0 "2*(x-2)^2+(y-2)^2 = 3;" "6#/,&*&\"\"#\"\"\"*$,&%\"xG F'F&!\"\"F&F'F'*$,&%\"yGF'F&F+F&F'\"\"$" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 " " }{XPPEDIT 18 0 "z = x/2+y -2;" "6#/%\"zG,(*&%\"xG\"\"\"\"\"#!\"\"F(%\"yGF(F)F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 273 3 "3. " }{TEXT -1 31 " Find the T aylor series for " }{XPPEDIT 18 0 "ln(sin(x*y));" "6#-%#lnG6#-%$sinG6 #*&%\"xG\"\"\"%\"yGF+" }{TEXT -1 113 " and find the maximum truncatio n error after terms of fourth degree over the range x = \{.5..1.5\}, \+ y = \{.5..1.5\}" }}}}{MARK "1 0 2" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }