{VERSION 3 0 "IBM INTEL NT" "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 "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 18 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 280 "" 0 1 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-1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 0 "" }{TEXT 257 0 "" }{TEXT 259 49 "GRAPHING IN CYLINDRICAL AND SPHERICAL COORDINA TES" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } {TEXT 260 0 "" }{TEXT 261 0 "" }{TEXT 263 0 "" }{TEXT -1 31 "By now yo u should be expecting:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots);" }}{PARA 12 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }{TEXT 264 0 "" }{TEXT 267 0 "" }{TEXT 268 23 "Cylindr ical Coordinates" }{TEXT 269 0 "" }{TEXT 270 0 "" }{TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 "Recall th at cylindrical coordinates use the variables r, theta, and z, where:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 103 " \+ r and theta are the polar coordinates of the projection of \+ a point P onto the xy-plane" }}{PARA 0 "" 0 "" {TEXT -1 77 " \+ z is the directed distance from the xy-plane to the point P." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 153 "We will use the command 'cylinderplot' to plot functions in cylindrical coord inates. This command assumes you begin with a function written in the form:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 " r = f(theta, z)" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 102 "and you have (or can provide) intervals for theta and z. The syntax for 'cyl inderplot' is as follows:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 34 " cylinderplot( " }{TEXT 272 11 "f(theta, z)" }{TEXT -1 10 ", theta = " }{TEXT 273 12 "lower limit " } {TEXT -1 3 ".. " }{TEXT 274 11 "upper limit" }{TEXT -1 6 ", z = " } {TEXT 275 11 "lower limit" }{TEXT -1 4 " .. " }{TEXT 276 11 "upper lim it" }{TEXT -1 3 " );" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }{TEXT 277 44 "IMPORTANT: You must enter the interval for " }{TEXT 278 0 "" }{TEXT 279 0 "" }{TEXT 280 5 "theta" }{TEXT 281 25 " first in this command!!!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 19 "Let's try graphing:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 101 " \+ r = z^2 (sin (4 theta))^2, theta = 0 to theta = 2 Pi, z = -3 to z = 3." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "cylinderplot(z^2*(sin(4*theta))^2,theta=0..2*Pi,z=-3. .3);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 91 "Interesting, but \"blocky\" again. We need to use 'grid' to ma ke the curve look more smooth." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "cylinderplot(z^2*(sin(4*thet a))^2,theta=0..2*Pi,z=-3..3,grid=[80,25]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 23 "If we want to see axes:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "cylinderplot(z^2*(sin(4*theta))^2,theta=0..2*Pi,z=-3..3,axes=n ormal,grid=[80,25]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 282 0 "" }{TEXT 283 0 "" }{TEXT 284 21 "Spherical Coordinates" }{TEXT 285 0 "" }{TEXT 286 0 "" }{TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 101 "Sphe rical coordinates are usually indicated by using the variables rho, ph i, and theta. Recall that:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 " rho is the distance from t he origin O to a given point P" }}{PARA 0 "" 0 "" {TEXT -1 89 " \+ phi is the angle between the positive z-axis and the lin e segment OP" }}{PARA 0 "" 0 "" {TEXT -1 75 " thet a is the same angle as in cylindrical coordinates." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 145 "We will use the command \+ 'sphereplot' to graph functions given in spherical coordinates. This \+ command assumes your function is given in the form:" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 61 " \+ rho = f(theta, phi)." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 42 "The syntax for 'sphereplot' is as fol lows:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 37 " sphereplot( " }{TEXT 287 13 "f(theta, phi)" } {TEXT -1 10 ", theta = " }{TEXT 288 11 "lower limit" }{TEXT -1 4 " .. \+ " }{TEXT 289 11 "upper limit" }{TEXT -1 8 ", phi = " }{TEXT 290 11 "lo wer limit" }{TEXT -1 4 " .. " }{TEXT 291 11 "upper limit" }{TEXT -1 3 " );" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 292 100 "IMPORTANT: The interval for theta must come before the interval for phi in the 'sphereplot' command." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 24 "Let's try a basic graph: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "sphereplot(6,theta=0..2*Pi,phi=0..2*Pi,axes=normal,sc aling=constrained);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 177 "Note that I included the 'axes' command and th e 'scaling' command. If you do not include the 'scaling' command in t his particular case, the sphere looks \"squashed.\" (Try it!!)" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 78 "Well, thi s is nice, but let's try something a little more interesting. Graph: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 54 " \+ rho = 2 cos (3 theta)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 112 "using the interval [0, 2 Pi] for both theta and phi. You need to fill in the ??? with the app ropriate commands." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "sphereplot(???,???,???,axes=normal,scaling= constrained,grid=[60,25]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 69 "Just so you can see the difference a vari able can make, try graphing:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 " rho = 2 cos (3 phi) " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 33 "over \+ the same intervals as above." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "sphereplot(???,???,???,axes= normal,scaling=constrained);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 123 "(NOTE: I took out the \"grid\" part o f the command because you can see the picture a little better with the default values.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 293 0 "" }{TEXT 294 0 "" }{TEXT 296 16 "Combining graphs" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 154 "Okay, let's try something a littl e more complicated. Suppose we want to graph a sphere that has a cyli ndrical hole drilled through it. How can we do it?" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 142 "Let's suppose the radi us of the sphere is 10 units. This should be easy to graph. You fill in the ??? below to draw the appropriate sphere. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "???" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 214 "N ow let's work on the cylinder. Suppose the cylinder has a radius of 6 units. You draw the cylinder. (Hint: You need to decide how \"tall \" to make the cylinder. I tried setting the interval for z as [-12, \+ 12].)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "???" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 227 "We want to combine these. In particular, we w ant to see the \"leftover\" part of the sphere when this cylinder cuts through the sphere. Let's try the ideas we used when we combined gra phs earlier (hit \"enter\" after each line!):" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "graph1:=sph ereplot(10,theta=0..2*Pi,phi=0..2*Pi):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "graph2:=cylinderplot(6,theta=0..2*Pi,z=-12..12):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "display(\{graph1,graph2\}); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 469 "Okay, if your picture looks like mine did when I tried it, you ha ve a sphere with a cylinder sticking out of it. No hole can be found. We need to do a little mathematics to figure out how we need to conf igure our commands. In particular, we need to know exactly where the \+ cylinder cuts the sphere. It is helpful to consider a cross section o f this figure (we'll look at a vertical cross section in the yz-plane) . Don't forget to hit \"enter\" after every line below." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "gr1: =implicitplot(y^2+z^2=100,y=-15..15,z=-15..15,scaling=constrained):" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "gr2:=implicitplot(y=6,y=-1 5..15,z=-15..15,scaling=constrained):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "gr3:=implicitplot(y=-6,y=-15..15,z=-15..15,scaling=co nstrained):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "display(\{gr 1,gr2,gr3\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 450 "Now, if we connect the origin to the point in the fir st quadrant where the cylinder \"cuts\" the sphere, we can easily see \+ a right triangle. The hypotenuse of this triangle is 10 (the radius o f the sphere), the horizontal leg of this triangle has length 6 (the r adius of the cylinder), and so the vertical leg of this triangle must \+ have length 8 (why?). This tells us how tall we want our cylinder in \+ the final picture (z is in the interval [-8, 8])." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 258 "How do we draw only the \+ part of the sphere we're interested in? Clearly, the radius must stil l be 10 (so rho = 10 will be the equation we use). Since we want to \+ \"keep\" all of the trace of the sphere in the xy-plane, theta must be in the interval [0, 2 Pi]." }}{PARA 0 "" 0 "" {TEXT -1 58 "That leave s phi as the only variable we need to control. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 200 "Recall that phi measures the angle between the z-axis and the point we're using. We can go ba ck to our right triangle and use a little trigonometry to figure how f ar above the xy-plane we need to be:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 73 " max. angle ab ove the xy-plane = arccos (6 / 10)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 402 "Now, this measures the angle between the xy-plane and the \"hypotenuse\" of our triangle. We really need the \+ angle between the z-axis and the hypotenuse of our triangle. It turns out that this angle has measure arccos (8 / 10)--see how the trigonom etry fits in? (You need to think about complementary angles to see wh y this is true.) This means that the portion of our sphere we want to see needs to " }{TEXT 297 5 "start" }{TEXT -1 463 " when phi = arccos (8 / 10). How far do we measure? Using the symmetry of the graph, w e see that the maximum angle below the xy-plane is the same as the max imum angle above the xy-plane. Now, the measure of the (directed) ang le from the positive z-axis to the negative z-axis is Pi, so we need t o draw our graph to the angle Pi - arccos (8 / 10). (Think about the \+ trigonometry and label the angles on the cross section.) So we set up our commands as follows:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "graph1:=sphereplot(10,theta=0..2*Pi ,phi=arccos(8/10)..Pi-arccos(8/10)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "graph2:=cylinderplot(6,theta=0..2*Pi,z=-8..8):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "display(\{graph1,graph2\}); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 1 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }