{VERSION 4 0 "SUN SPARC SOLARIS" "4.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 "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 1 14 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 "" 1 14 0 0 0 0 0 1 0 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 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 1 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 " " 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE " " 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 5 " " }{TEXT 256 0 "" }{TEXT 257 11 "MATH 2270-1" }}{PARA 257 "" 0 "" {TEXT -1 0 "" }{TEXT 258 0 " " }{TEXT 259 9 "PROJECT 5" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }{TEXT 260 0 "" }{TEXT 261 19 "Conics and Quadrics" }}{PARA 259 "" 0 "" {TEXT -1 14 "November, 2000" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 262 14 "Conic sections " }{TEXT -1 1 ":" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 125 "with(li nalg):with(plots):#for computations and pictures\nwith(student):#to do algebra computations like completing the square " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 125 "Let's do the problem we \+ did in class yesterday, using Maple: This was example 3 on page 498, \+ which you should look at now. " }}{PARA 0 "" 0 "" {TEXT -1 119 " \+ First let's see what conic section we have, by finding the eigenvalues of the quadratic form part of the equation:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "A:=matrix([[5,-3],[-3,5]]);" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "eigenvalues (A); #compute eigenvalues" }}}{PARA 0 "" 0 "" {TEXT -1 163 "Since both eigenvalues have the same sign, the conic must be an ellipse (possib ly degenerate). We can verify this immediately by using the implicitp lot command: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 217 "implicitplot(5*x^2 -6*x*y + 5*y^2 -24*sqrt(2)*x \n + 8*sqrt(2)*y + 56 = 0,\n x=-1..9,y=-1..9, grid=[100,100] ,\n color=`black`);\n#try it without making a dense grid, and\n# you might get funny looking ellipse" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 28 " Yes, it was an ellipse." }}{PARA 0 "" 0 "" {TEXT -1 346 " Now, what about all that work we did to e xplicitly pick new coordinates in which there was no cross term? If w e really need to do that, we can try to let Maple help, and although t he commands seem a little cumbersome at first, when we're done we'll h ave a template that will work for any quadratic equation with only min or modifictations. " }}{PARA 0 "" 0 "" {TEXT -1 139 " Let's write the quadratic equation in standard form. First we need the matrix B \+ for the linear term, which was zero in this example. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "B:=matrix([[-24*sqrt(2),8*sqrt(2)]]);\n\n C:=56;\n #the constant term" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"B G-%'matrixG6#7#7$,$*$-%%sqrtG6#\"\"#\"\"\"!#C,$F+\"\")" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"CG\"#c" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 281 "fmat:=v->evalm(transpose(v)&*A&*v\n + B&*v +C ) ;\n #this function takes a vector v and computes \n # transp ose(v)Av + Bv + C ,\n #which will be a one by one matrix\nf:=v->fm at(v)[1]; #this extracts the entry of the one\n #by one matrix fma t(v)\n " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%fmatGR6#%\"vG6 \"6$%)operatorG%&arrowGF(-%&evalmG6#,(-%#&*G6$-F16$-%*transposeG6#9$% \"AGF8\"\"\"-F16$%\"BGF8F:%\"CGF:F(F(F(" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGR6#%\"vG6\"6$%)operatorG%&arrowGF(&-%%fmatG6#9$6#\"\"\"F(F (F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 150 "fmat(vector([x,y])) ; #should be a one by one matrix\nf(vector([x,y])); #should get its e ntry, which is what we want.\n #should agree with our example" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#-%'vectorG6#7#,,*&-%%sqrtG6#\"\"#\"\" \"%\"xGF-!#C*(\"\")F-F)F-%\"yGF-F-*&,&F.\"\"&*&\"\"$F-F2F-!\"\"F-F.F-F -*&,&F.!\"$*&F5F-F2F-F-F-F2F-F-\"#cF-" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,,*&-%%sqrtG6#\"\"#\"\"\"%\"xGF)!#C*(\"\")F)F%F)%\"yGF)F)*&,&F*\"\" &*&\"\"$F)F.F)!\"\"F)F*F)F)*&,&F*!\"$*&F1F)F.F)F)F)F.F)F)\"#cF)" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "eqtn:=f([x,y])=0;\n #shoul d be our equation" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "implicitplot(eqtn,x=-1..9,y=-1..9, color=b lack,\n grid=[100,100]);\n #this should give you the same pictur e as above" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 43 "Now let's go about the c hange of variables:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "data: =eigenvects(A);#get eigenvectors" }}}{PARA 0 "" 0 "" {TEXT -1 111 "You pick things out of the object above systematically, using inidices to work through the nesting of brackets:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "data[1];#first piece of data" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "data[1][1];#eigenvalue" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "data[1][2];#algebraic multiplicity" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "data[1][3];#basis for eigenspace" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "data[1][3][1];#actual eige nvector" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 42 "So that's how to extract the eigenvectors:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "v1:=data[1][3][1];#first eigenvector\nv2:=data[ 2][3][1];#second eigenvector\nu1:=v1/norm(v1,2);#normalized\nu2:=v2/no rm(v2,2);#normalized" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 261 "P:=augment(u1,u2);#our orthogonal \+ matrix\n #with 50% probability your P will not be\n #a rotation matr ix, but rather a composition of\n #rotation with reflection. This ma y lead\n #to an interchange of u and v from what you expect\n #based on class work we did." }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "f(evalm(P&*[u,v]));#do the change o f variables" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "simplify(%); #simplify it!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "completesq uare(%,u); #complete the square in u" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "completesquare(%,v);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "Eqtn:=%=0;\n #this will look like the book example a nd class notes,\n #with minor changes \n " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 260 "" 1 "" {TEXT -1 442 "Let's collect everything int o one template . This time it has the data from problem 30 on page 5 01, but obviously you could plug data from any quadratic expression in to it. You can see from where the colons and semicolons are that the output will be the eigenvalues, the transition matrix, a plot, and an equation just short of standard form. (You will get an amusing pl ot at first but can improve it by picking a denser grid size.) " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "restart;with(linalg):with(pl ots):with(student):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name \+ changecoords has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 749 "A:=matrix([[8,-8],[-8,8]]):\nB:=matrix([[33*sqrt(2), -31*sqrt(2)]]):\nC:=70:#the constant term if the rhs is zero\nfmat:=v- >evalm(transpose(v)&*A&*v\n + B&*v + C):\nf:=v->fmat(v )[1]:\neigenvals(A); #show the eigenvalues\ndata:=eigenvectors(A):\nv1 :=data[1][3][1]:#first eigenvector\nv2:=data[2][3][1]:#second eigenvec tor\nu1:=v1/norm(v1,2):#normalized\nu2:=v2/norm(v2,2):#normalized\nP:= augment(u1,u2);#show our orthogonal matrix\nimplicitplot(f([x,y])=0,x= -10..10,y=-10..10,\n grid=[25,25],color=`black`);\n #increase \+ grid size for better picture, but too big\n #takes too long \nf(ev alm(P&*[u,v])):#do the change of variables\nsimplify(%):#simplify it! \ncompletesquare(%,u): #complete the square in u\ncompletesquare(%,v): #and v\nEqtn:=%=0;\n" }}}{PARA 0 "" 0 "" {TEXT -1 247 "1) Check your \+ answers to the book homework problems #25,26, by using the template ab ove, with the correct data from those problems. Also, before you hand in this project you should save it to another file in which you delet e extraneous material." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 264 17 "Quadri c Surfaces:" }}{PARA 0 "" 0 "" {TEXT -1 572 "2) Partially do your boo k homework from section 8.10 [assigned momentarily], by having Maple f ind the eigenvalues of the quadratic part of the equations so that you can compute the eigenvalues and classify the surface. We will start \+ talking about this material on Friday in class, the pictures in sectio n 8.10 will give you an idea about quadric surfaces. Also, verify tha t the plot is what you claimed by drawing a picture of it with Maple. \+ By the way, your book HW problems to hand in from 8.10 are #10,15,2 3,25,26. These problems are due NEXT Friday, December 8." }}{PARA 0 " " 0 "" {TEXT -1 5 " " }{TEXT 263 6 "Hints:" }{TEXT -1 487 " To ma ke 3-d plots you can use implicitplot3d. If you make your grid too fi ne the plot will take a long time to make, so try the default grid at \+ first and adjust if necessary. You might also have to adjust your lim its in the plot to get a better picture. You can manipulate 3d plots \+ with your mouse. There are a lot of interesting plot options which yo u write into the command or access from the plotting toolbar. One tha t helps me see things is to use the ``boxed'' axes option. " }}{PARA 0 "" 0 "" {TEXT -1 488 " The 3d plotting routines have been known \+ to crash Maple, so save your file often. Sometimes what really happen s is that a dialog box gets opened behind one of your windows, where y ou can't see it, so that it will appear that Maple has frozen. If thi s happens, minimize your maple window (the black dot a the upper left \+ corner), and then re-display it. Here's a plot to play with, #1 on pag e 511. You should be able to move it around to make it look like a on e-sheeted hyperboloid." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 118 "i mplicitplot3d(x^2 + y^2 +2*z^2 - 2*x*y -4*x*z -4*y*z + 4*x = 8,\n \+ x=-5..5,y=-5..5,z=-5..5, axes=`boxed`);" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 3 "3) " }{TEXT 265 11 "(OPTIONAL) " }{TEXT -1 783 " Extra credit/for fun?: Create a template to do the reduction into sta ndard form for quadric surfaces, like the one written above for conic \+ sections, and test it on several problems from the book. By the way, \+ if you do this you might want to keep in mind that if your eigenspace \+ is more that one-dimensional Maple might not return an orthogonal basi s for it, so you might have to Gram-Schmidt your basis in that case. \+ And in that case the command ``eigenvector'' will return a different-l ooking object too. Of course, ``most'' quadratic forms don't have tha t ``problem'' and it is O.K. for this project if you don't worry about it. Something you could add to your template is a little subroutine \+ which outputs the type of quadric surface, based on an analysis of the eigenvalues." }}}{MARK "22 0 0" 44 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }