+ All Categories
Home > Documents > C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf ·...

C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf ·...

Date post: 26-Jun-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
24
C2Ws2: Polar Graphing using Maple 5:00 PM 6/1/98 Purpose The purpose of this lab is to introduce the student to the concept of polar graphing. The topics covered are: 1) translating from cartesian to polar coordinates, polar to cartesian coordinates and 2) how to graph some of the more basic (and used) polar functions . Background At times it becomes important to change circular motion into straight line motion or straight line motion into circular motion. For example it is very helpful to change the up and down motion of the piston in an automobile engine into circular motion of the wheels. One such device for doing this conversion is a gear or cam that will change rectilinear periodic motion (repeated up and down motion of the piston) into circular motion (the turning of the wheels). One such cam looks like the graph in figure 1 below > Figure 1: = ( ) + + x 2 y 2 y 2 + x 2 y 2 > and has the equation: = ( ) + + x 2 y 2 y 2 + x 2 y 2 . Mathematically, it is called a cardioid. (Can you tell why?) To graph its equation as given in the cartesian coordinate system would require a lot of computation and/or analyzing! However, it can be converted to the polar coordinate system and graphed rather easily as the polar equation: r = 1 - sin θ! You can see what a help it would be to mechanical engineering and other fields of study to be able to deal with polar graphs rather than cartesian graphs from time to time. > Relationship Between Cartesian and Polar Systems In figure 1 the postive x-axis or the horizontal half line y = 0, x > 0, called a ray, is called the polar axis and starts at a point (in the center of the graph) called the pole. The pole is the same point as the origin in the cartesian system and the polar axis is the positive x-axis in cartesian system. This arrangement makes it easy to align the two systems so that they may be superimposed on each other;
Transcript
Page 1: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

C2Ws2: Polar Graphing using Maple 5:00 PM 6/1/98

Purpose The purpose of this lab is to introduce the student to the concept of polar graphing. The topics covered are: 1) translating from cartesian to polar coordinates, polar to cartesian coordinates and 2) how to graph some of the more basic (and used) polar functions . Background At times it becomes important to change circular motion into straight line motion or straight line motion into circular motion. For example it is very helpful to change the up and down motion of the piston in an automobile engine into circular motion of the wheels. One such device for doing this conversion is a gear or cam that will change rectilinear periodic motion (repeated up and down motion of the piston) into circular motion (the turning of the wheels). One such cam looks like the graph in figure 1 below>

Figure 1: = ( ) + + x2 y2 y2

+ x2 y2

>

and has the equation: = ( ) + + x2 y2 y2

+ x2 y2. Mathematically, it is called a cardioid. (Can you tell why?) To graph its equation as given in the cartesian coordinate system would require a lot of computation and/or analyzing! However, it can be converted to the polar coordinate system and

graphed rather easily as the polar equation: r = 1 - sin θ! You can see what a help it would be to mechanical engineering and other fields of study to be able to deal with polar graphs rather than cartesian graphs from time to time. >

Relationship Between Cartesian and Polar Systems In figure 1 the postive x-axis or the horizontal half line y = 0, x > 0, called a ray, is called the polar axis and starts at a point (in the center of the graph) called the pole. The pole is the same point as the origin in the cartesian system and the polar axis is the positive x-axis in cartesian system. This arrangement makes it easy to align the two systems so that they may be superimposed on each other;

Page 2: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

see figure 2.>

Figure 2: Castesian Axes Superimposed on Polar System.

>

With the two graphing systems superimposed on each other observe the point (x,y) labeled in figure 2. The point is determined in the cartesian system by the x-value, measured from the y-axis and the y-value, measured from the x-axis. The point is also uniquely determined using the line through the pole that contains the point in question. By measuring the distance along the line from the pole to the point and measuring the angle this line makes with the polar axis (positive x-axis), we define the polar

coordinates of the point: (r, θ). (The ordered pair is always given: (distance, angle).) Thus the point of

intersection at the top of the triangle in figure 2, in polar coordinates, would be the point (5, π/3). >

The relationship between Cartesian and Polar coordinates can be derived from the right triangle formed in figure 2 above. Notice that:

x = r cos θθ and y = r sin θθ>

Example 1: Thus conversion can be made from polar to cartesian coordinates for the point (5, π/3) in polar coordinates to (2.500, 4.330) in cartesian coordinates (to three decimal places) since:

x = 5 cos π/3 = 5(0.500) = 2.500 and y = 5 sin π/3 = 5(0.866) = 4.330.>

Likewise x2 + y2 = r2 and θθ =

arctan

y

x are the conversion factors from cartesian to polar

coordinates.>

Example 2: So for the cartesian point (-2, 3), the conversion to polar coordinates gives

(3.605, 2.159) or (3.605, 123.9°) in polar coordinates since 4 + 9 = 13 = r2 so r = 3.605 and the

arctan(3/-2) = θ = 2.159 radians (approximately). Notice that when written in radians, polar

Page 3: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

coordinatess cannot be distinguished from cartesian coordinates unless the information is provided.>

One big difference in the naming of a point in polar coordinates is that any given point can have more

than one name! The point (5, π/3) can also have the name (5, 2nπ + π/3) for any positive integer. Likewise, since we know what a negative angle is, n can also be any negative integer. Therefore, n can be any integer and will produce the same point in polar coordinates.>

Besides the preceding fact, the radius r is allowed to be negative causing a point to be named in still more ways! A negative radius is defined to be the distance moved in the direction opposite the ray

defining the given angle. To illustrate this idea, again look at the point (5, 1.047), i.e. (5, π/3). Use

figure 2 to check the fact that (-5, π+ π/3) is still the point (5, π/3)! [Or for that matter, so is the

point (-5, π/3-π)].>

Exercise 1: Convert each of the following problems as indicated. Work in radians:(Note: there are buttons on scientific calculators that do this job in one or two strokes. Don't defeat the purpose of this exercise by using your calculator. However, checking the answers with a calculator would be good practice for you on the calculator!) Cartesian -> Polar Polar -> Cartesian

1. (2,-4) 5. (2,1.5708) 2. (-1.257,3.223) 6. (-3.125, 0.785)

3. x2 + y2 = 9 7. 2r sin θ = 3 cos θ

4. x2 - y2 = 16 sqrt(x2 - y2) 8. r + sin ρ = 2 cos ρ>

Polar GraphingIn this section we will learn some of the fundamental polar graphs and how to reproduce them using

Maple. The graph in figure 3 is the graph of θ = π/6.>

Figure 3: θ = π/6

Page 4: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

The circles have been added to emphasize the concept of polar graphing. Its equation in cartesian

coordinates would be y = x tan (π/6). So, in general a line through the pole (origin) is θ = c, c a constant. The Maple command for this graph is:> restart; with(plots);Warning, the name changecoords has been redefined

animate animate3d animatecurve arrow changecoords complexplot complexplot3d, , , , , , ,[

conformal conformal3d contourplot contourplot3d coordplot coordplot3d cylinderplot, , , , , , ,

densityplot display display3d fieldplot fieldplot3d gradplot gradplot3d graphplot3d, , , , , , , ,

implicitplot implicitplot3d inequal interactive listcontplot listcontplot3d listdensityplot listplot, , , , , , , ,

listplot3d loglogplot logplot matrixplot odeplot pareto plotcompare pointplot pointplot3d, , , , , , , , ,

polarplot polygonplot polygonplot3d polyhedra_supported polyhedraplot replot rootlocus, , , , , , ,

semilogplot setoptions setoptions3d spacecurve sparsematrixplot sphereplot surfdata textplot, , , , , , , ,

textplot3d tubeplot, ]> polarplot([t,sin(Pi/6),t=0..4]);

Page 5: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

A more sophisticated version of the command which controls the domain and range of the graph is given by "view=[-5..5, -5..5]" (x-axis, y-axis) and "scaling=constrained" makes the x- and y- axes proportionate. The main part of the command is "[t, sin Pi/6, t=0..6]," where t takes on values from 0

to 6 and θ = Pi/6 for all values of t. Thus we have:> polarplot([t,sin(Pi/6),t=0..6],view=[-5..5,-5..5],color=blue,scali

ng=constrained);

Page 6: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

In the same manner r = constant will produce a circle in polar coordinates. A particular example would be r = 3. The command in Maple for this graph is:> polarplot({3},scaling=constrained);

Page 7: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Again the command can be enhanced as follows:> polarplot({3},color=green,view=[-5..5,-5..5],scaling=constrained);

Page 8: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

In this command "t" is kept constant t = r while θ takes on values from 0 to 2π.>

To put the previous two graphs together along with the polar graphing circles we can use the following commands:> f:=polarplot({1,2,4,5},color=black,view=[-5..5,-5..5]):> g:=polarplot([t,sin(Pi/6),t=0..6],view=[-5..5,-5..5],color=red,sca

ling=constrained):> h:=polarplot({3},color=green,view=[-5..5,-5..5]):> display({f,g,h});

Page 9: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

There are other basic curves easier to work with in polar coordinates rather than cartesian. Some of them are:

n-petal rose: r = cos (n θ), r = sin (n θ)

cardioid: r = a(1 - cos θ), r = a(1 - sin θ)

lemniscate: r2 = a2 cos (2 θ), r2 = a2 sin (2 θ)

spirials: Archimedes: r = n θ

exponential: r = e( )a θ

limacon: r = a +/- b cos θ, r = a +/- sin θ

Page 10: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

(a, b and n constants)>

Example 3: Let r(θ) = 3 cos (2 θ).

Figure 4: r(θ) = 3 cos (2 θ).

>

This graph in figure 4 is known as a "four petal rose." Note that the number of petals in 2 times n and

that the length of each petal is three units, the coefficent of cos (2 θ). If n is even the number of petals is doubled. If n is odd then there are n petals to the rose. The command for the above example is:> polarplot([3*cos(2*theta)],theta=0..2*Pi, scaling=constrained);

Page 11: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Now observe this command:> polarplot([4*sin(3*theta)],theta=0..2*Pi,scaling=constrained);

Page 12: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

To superimpose the polar circles on the previous graph we can use the following commands:> f:=polarplot({1,2,3,4,5},color=black,view=[-5..5,-5..5]):> g:=polarplot([4*sin(3*theta)],theta=0..2*Pi,view=[-5..5,-5..5],col

or=red,scaling=constrained):> display({f,g},view=[-5..5,-5..5]);

Page 13: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Let us now see how this curve is plotted.

The first set of commands will produce the first petal of the "three petal rose.">

polarplot(4*sin(3*t) , t = 0..Pi/3, style = line, adaptive = false, numpoints = 500, scaling=constrained );

Page 14: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

We now produce the first two petals:> polarplot(4*sin(3*t) , t = 0..2*Pi/3, style = line, adaptive =

false, numpoints = 500, scaling=constrained );

Page 15: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

We will then produce all three petals of r = 4sin(3θ) in the next set of commands:> polarplot(4*sin(3*t) , t = 0..2*Pi, style = line, adaptive =

false, numpoints = 500, scaling=constrained );

Page 16: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

Use the "Copy" command (under "Edit") to copy the complete graph of r = 4sin(3θ) into another worksheet and then print out the graph. Call this PRINTOUT 1. Label it and plot at least three points on each of the petals. This will be turned in as part of your report.>

Using the commands listed for your below replace the given function by the following functions, print out a copy of the graphs, label significant points and report any observations you can make:

r = f(θ) = 2 cos 5 θ, r = h(θ) = sin 4 θCall this PRINTOUT 2.> > polarplot(4*sin(3*t) , t = 0..2*Pi, style = line, adaptive =

false, numpoints = 500, scaling=constrained );

Page 17: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Example 4: We return to the first polar function discussed, the cardioid: r = 1- sin θ!> restart; with(plots):Warning, the name changecoords has been redefined

> polarplot(1-sin(t) , t = 0..2*Pi, style = line, adaptive = false, numpoints = 500, scaling=constrained );

Page 18: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Using the commands listed for your below, print out a copy of the graph, label significant points and report any observations you can make for the function:

r = 2(1 - cos θ). Call this PRINTOUT 3. > restart; with(plots):Warning, the name changecoords has been redefined

> polarplot(2*(1-cos(t)) , t = 0..2*Pi, style = line, adaptive = false, numpoints = 500, scaling=constrained );

Page 19: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

Example 5: You have been asked to observe how the computer plots the various curves discussed so far. The next set of graphs are given the name "lemniscates." The general form of the lemniscate is:

r2 = a2 cos (2 θ) or r2 = a2 sin (2 θ)

The function to be graphed is: r2 = 9 cos (2θ). The graph is given in figure 5:>

Figure 5: r2 = 9 cos (2θ)

Page 20: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

In order to help you interpret what is happening on screen copy and fill out the following table:>

Table 1:

θ 0 π6

π4

π3

π2

2 π3

3 π4

5 π6

π 7 π6

5 π4

4 π3

3 π2

5 π3

7 π4

11 π

6 2 π

___________________________________________________________________________

2θ π3

----------------------------------------------------------------------------------------------------

cos 2θ 1

2 1

----------------------------------------------------------------------------------------------------

9cos 2θ 9

2 9

---------------------------------------------------------------------------------------------------

9 ( )cos 2 θ 3

2 3

___________________________________________________________________________>

Here again is the graph of the lemniscate: r2 = 32cos (2θ).> restart; with(plots):Warning, the name changecoords has been redefined

> polarplot(sqrt(9*cos(2*t)) , t = 0..2*Pi, style = line, adaptive = false, numpoints = 1000, scaling=constrained );

Page 21: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

; Now print out an enlarged figure 5 and plot the points of table 1 on it. Call this PRINTOUT 4. >

Example 6: Finally, we will graph the two spirals:

Archimedes: r = nθ and exponential: r = e( )a θ

.

Using the commands given below, plot, copy and label the spirals: r = 2θ and r = eθ̂. Call this PRINTOUT 5.> > f:=polarplot({2,4,6,8,10,12,14},color=black):> z:=polarplot([2*t],t=0..2*Pi,view=[-15..15,-15..15]):> display({f,z},view=[-15..15,-15..15],scaling=constrained);

Page 22: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

> > f:=polarplot({2,4,6,8,10,12,14},color=black):> w:=polarplot([exp(t)],t=0..2*Pi,view=[-15..15,-15..15]):> display({f,w},view=[-15..15,-15..15],scaling=constrained);

Page 23: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

>

At this point we have investigated some of the fundamental polar graphs. If you have been observant you should be able to predict what the coefficient of the sin or cos functions does. Also you should

have some idea of what coefficient of the angle, i.e. the n in "nθ," does in each of the functions. To help you review your work complete the following "Applications" and "Assessments.">

Applications: 1. Label the equations of the curves on "PRINTOUT 1" and label the tips of the points on the petals plus two more points on the first petal of each curve.

Page 24: C2Ws2: Polar Graphing using Maple Purposefacstaff.cbu.edu/.../M232/MapleClassSheets/Proj3.pdf · 2003-03-26 · Use the "Copy" command (under "Edit") to copy the complete graph of

2. Label the equations of the curves on "PRINTOUT 2" and label the tips of the points on the petals plus two more points on the first petal of each curve.

3. Label the equation of the curve on "PRINTOUT 3" and label six significant points on the cardiod.

4. Labe the equation of the curve on "PRINTOUT 4" and label the tips of the points on the lemniscate plus two more points on both halves of the curve.

5. Label the equations of the curves on "PRINTOUT 5" and label the points on the spirals every π2

units on each curve.>

Assessment: 1. Explain why it is significant to understand the basics of polar graphing. 2. Explain why a point in polar coordinates can have more than one set of ordered pairs to "name" it.

3. Explain what will happen in a "rose" such as r = sin nθ if n is even or odd.

4. What effect does a have on the "rose" r = a sin nθ? 5. Why does the "middle" of a lemniscate not appear on the graph of such a function? 6. Why would you expect the graph of the exponential spiral to "grow" faster than the graph of the Archimedean spiral?

7. What values of x and y would you need in the "view=[-x..x, -y..y]" command to get the complete

exponential spiral for 2π radians?

The End> >


Recommended