{VERSION 3 0 "APPLE_PPC_MAC" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 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 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 49 "Math 251 Assignment 3 Sol utions - Maple Component" }}{PARA 19 "" 0 "" {TEXT -1 32 "by J. Hebron , SFU, February 2000" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 126 "This is \+ the Maple component of the solutions to Math 251 Homework Assignment # 03, which was due Wednesday, February 2nd, 2000." }}}{SECT 1 {PARA 4 " " 0 "" {TEXT -1 30 "First, load the plots package:" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 16 "Section 11. 7 #16" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "Let " }{XPPEDIT 18 0 "x = \+ sin(t);" "6#/%\"xG-%$sinG6#%\"tG" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "y = cos(t);" "6#/%\"yG-%$cosG6#%\"tG" }{TEXT -1 6 ", and " }{XPPEDIT 18 0 "z = sin(t)^2;" "6#/%\"zG*$-%$sinG6#%\"tG\"\"#" }{TEXT -1 1 ":" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "x:=sin(t);y:=cos(t);z:=sin(t )^2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "Now let's see if these co rrespond to the intersection of the circular cylinder " }{XPPEDIT 18 0 "x^2+y^2 = 1;" "6#/,&*$%\"xG\"\"#\"\"\"*$%\"yG\"\"#F(\"\"\"" }{TEXT -1 28 " and the parabolic cylinder " }{XPPEDIT 18 0 "z-x^2 = 0;" "6#/, &%\"zG\"\"\"*$%\"xG\"\"#!\"\"\"\"!" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "x^2+y^2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "z-x^2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "Indeed, we see tha t the space curve is the intersection of the two cylinders." }}{PARA 0 "" 0 "" {TEXT -1 66 "Let's plot these cylinders so we can visualize \+ their intersection:" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 30 "Plotting \+ the circular cylinder" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "im plicitplot3d('x'^2+'y'^2=1,'x'=-1..1,'y'=-1..1,'z'=-0.5..2,scaling=con strained,axes=frame,labels=['x','y','z']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "Notice the quotes around the x, y, and z. This is to \" delay the evaluation\" of these names, because they are assigned to " }{XPPEDIT 18 0 "sin(t);" "6#-%$sinG6#%\"tG" }{TEXT -1 2 ". " } {XPPEDIT 18 0 "cos(t);" "6#-%$cosG6#%\"tG" }{TEXT -1 6 ", and " } {XPPEDIT 18 0 "sin(t)^2;" "6#*$-%$sinG6#%\"tG\"\"#" }{TEXT -1 60 ". W ithout the quotes, Maple would produce an error message." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 31 "Plotting the parabolic cylinder" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "plot3d('x'^2,'x'=-1.5..1.5,'y'=-1.5..1.5,scaling=cons trained,axes=frame,labels=['x','y','z']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 141 "Again, notice the quotes around the x, y, and z. This i s again to \"delay the evaluation\" of these names, because they are s till assigned to " }{XPPEDIT 18 0 "sin(t);" "6#-%$sinG6#%\"tG" }{TEXT -1 2 ". " }{XPPEDIT 18 0 "cos(t);" "6#-%$cosG6#%\"tG" }{TEXT -1 6 ", a nd " }{XPPEDIT 18 0 "sin(t)^2;" "6#*$-%$sinG6#%\"tG\"\"#" }{TEXT -1 60 ". Without the quotes, Maple would produce an error message." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 " " {TEXT -1 42 "Putting the two cylinders on the same plot" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 170 "In order to put both cylinders on the sa me plot, we assign each plot to a name, say \"p1\" and \"p2\", and the n use the \"display\" command to put both graphs on the same plot:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "p1:=implicitplot3d('x'^2+'y '^2=1,'x'=-1..1,'y'=-1..1,'z'=-0.5..2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "p2:=plot3d('x'^2,'x'=-1.5..1.5,'y'=-1.5..1.5):" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 220 "Notice the colon used at the end \+ of these statements, rather than a semi-colon. This \"suppresses the \+ output\" of the command. If you don't do this, you will see screenful ls of the internal details of the plot structure." }}{PARA 0 "" 0 "" {TEXT -1 35 "Now we can \"display\" the two plots:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "display(\{p1,p2\},scaling=constrained,axes= frame,labels=['x','y','z']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "O ne can now see clearly what the spacecurve of intersection looks like. Let's plot it." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 40 "Plotting the space curve of inter section" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "spacecurve([x,y, z],t=0..2*Pi,color=red,thickness=3,scaling=constrained,axes=frame,labe ls=['x','y','z']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 156 "This does \+ indeed look like the intersection of the parabolic cylinder and the ci rcular cylinder. To illustrate this, let's put all three on the same \+ graph." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 62 "Putting the two cylinders and the space c urve on the same plot" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "p1: =implicitplot3d('x'^2+'y'^2=1,'x'=-1..1,'y'=-1..1,'z'=-0.5..2):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "p2:=plot3d('x'^2,'x'=-1.5..1 .5,'y'=-1.5..1.5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "p3:=s pacecurve([x,y,z],t=0..2*Pi,color=red,thickness=3):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "display(\{p1,p2,p3\},scaling=constrained, axes=frame,labels=['x','y','z']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "Beautiful!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 16 "Section 11.7 #20" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 28 "The plot, using \"spacecurve\"" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 133 "spacecurve([sin(t),sin(2*t),sin(3* t)],t=0..2*Pi,thickness=3,scaling=constrained,axes=frame,labels=['x',' y','z'],orientation=[65,80]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "It may be a little hard to visualize this in 3 dimensions, so let's a lso plot a \"tubeplot\" of the same function." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 26 "The pl ot, using \"tubeplot\"" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "t ubeplot([sin(t),sin(2*t),sin(3*t)],t=0..2*Pi,radius=1/4,scaling=constr ained,axes=frame,labels=['x','y','z'],orientation=[65,80]);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "The tube plot perhaps gives us a b etter idea of what the 3-dimensional structure is." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 16 " Section 11.7 #56" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "Let's start by clearing the names \"x\", \"y\", and \"z\", which were assigned in 11 .7 #16" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "x:='x'; y:='y'; z :='z';" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 31 "Plotting the parabolic cylinder" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "plot3d([x,x^2,z],x=-1.5..1.5 ,z=-0.5..2.5,axes=frame,labels=['x','y','z'],orientation=[60,55]);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 " " {TEXT -1 38 "Plotting the top half of the ellipsoid" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "implicitplot3d(x^2+4*y^2+4*z^2=16,x=-4.. 4,y=-2..2,z=0..2,axes=frame,labels=['x','y','z'],orientation=[60,55]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 " " 0 "" {TEXT -1 34 "Putting them both on the same plot" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "p1:=plot3d([x,x^2,z],x=-1.5..1.5,z= -0.5..2.5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "p2:=implicit plot3d(x^2+4*y^2+4*z^2=16,x=-4..4,y=-2..2,z=0..2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "display(\{p1,p2\},axes=frame,labels=['x','y ','z'],orientation=[60,55]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "T his gives us a pretty good idea of what the curve of intersection look s like." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 40 "Plotting the space curve of intersection " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "To get the curve of intersecti on, let " }{XPPEDIT 18 0 "x = t;" "6#/%\"xG%\"tG" }{TEXT -1 2 ", " } {XPPEDIT 18 0 "y = t^2;" "6#/%\"yG*$%\"tG\"\"#" }{TEXT -1 17 ", and th en solve " }{XPPEDIT 18 0 "x^2+4*y^2+4*z^2 = 16;" "6#/,(*$%\"xG\"\"#\" \"\"*&\"\"%F(*$%\"yG\"\"#F(F(*&\"\"%F(*$%\"zG\"\"#F(F(\"#;" }{TEXT -1 5 " for " }{XPPEDIT 18 0 "z;" "6#%\"zG" }{TEXT -1 18 " as a function o f " }{XPPEDIT 18 0 "t;" "6#%\"tG" }{TEXT -1 30 ". The curve is thus g iven by:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "intcurve:=[t,t^ 2,1/2*sqrt(16-t^2-4*t^4)];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 25 "We \+ also need to find the " }{XPPEDIT 18 0 "t;" "6#%\"tG" }{TEXT -1 11 " a nd which " }{XPPEDIT 18 0 "z = 0;" "6#/%\"zG\"\"!" }{TEXT -1 1 ":" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "solve(16-t^2-4*t^4=0,t);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "The last two solutions are imaginary so we can \+ ignore them. We thus let " }{XPPEDIT 18 0 "t;" "6#%\"tG" }{TEXT -1 23 " go from -1.37 to 1.37:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "spacecurve(intcurve,t=-1.37..1.37,thickness=3,axes=frame,labels=[' x','y','z'],orientation=[60,55]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "Looking good!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 65 "Putting the cylinder, ellipsoid, \+ and space curve on the same plot" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "p1:=plot3d([x,x^2,z],x=-1.5..1.5,z=-0.5..2.5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "p2:=implicitplot3d(x^2+4*y^2+4*z^2= 16,x=-4..4,y=-2..2,z=0..2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "p3:=spacecurve(intcurve,t=-1.37..1.37,thickness=3,color=red):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "display(\{p1,p2,p3\},axes=fr ame,labels=['x','y','z'],orientation=[60,55]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "Beautiful!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 17 "Section 11.7 #jh1" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "circ1:=[cos(t),sin(t),0];" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "circ2:=[cos(t),0,sin(t)]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "circ3:=[0,cos(t),sin(t) ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 124 "tubeplot(\{circ1,cir c2,circ3\},t=0..2*Pi,radius=1/5,scaling=constrained,\naxes=frame,label s=['x','y','z'],orientation=[22,75]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 17 "Section 11. 7 #jh2" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "tsp:=[sin(8*t),cos (t)*(3+cos(8*t)),sin(t)*(3+cos(8*t))];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 122 "tubeplot(tsp,t=0..2*Pi,radius=1/3,scaling=constraine d,\nnumpoints=100,axes=frame,labels=['x','y','z'],orientation=[40,75]) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 " " 0 "" {TEXT -1 16 "Section 11.9 #16" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "r:=[t+t^3/6,1+t^4/12,1/4+t-1/4*cos(2*t)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "spacecurve(r,t=0..Pi,thickness=3,a xes=normal,labels=['x','y','z'],shading=zhue,orientation=[-20,70]);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 201 "It is a little difficult to vis ualize the 3-dimensional structure of the path from a 3-dimensional gr aph. Sometimes it helps to plot the path with its projection in the \+ xy-plane. This is done below:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 45 "The path with its pro jection in the xy-plane." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 " r_xy:=[t+t^3/6,1+t^4/12,0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "spacecurve(\{r,r_xy\},t=0..Pi,thickness=3,axes=normal,labels=['x' ,'y','z'],shading=zhue,orientation=[-20,70]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{MARK "9 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }