Polar Coordinates Examples


Example 1

> restart:with(plots):with(plottools): #clear memory,load plotting programs

Problem 1: Find area enclosed by r=sin(5 theta ).

> polarplot(sin(5*theta),theta=0..2*Pi,color=blue,thickness=2);

[Maple Plot]

> int(int(r,r=0..sin(5*theta)),theta=0..2*Pi);

1/2*Pi

Now, explain why this is wrong! What is the correcy answer?

Problem 2: Repeat for r=sin(4 theta ).

> polarplot(sin(4*theta),theta=0..2*Pi,color=green,thickness=2);

[Maple Plot]

> int(int(r,r=0..sin(4*theta)),theta=0..2*Pi);

1/2*Pi

Explain why this is correct.

Question: Can you find a general formula for the area enclosed by r = sin (n theta ) ? Hint: It depends on whether n is even or odd.


Example 2

> restart:with(plots):with(plottools): #clear memory,load plotting programs

Problem: Graph r = 3-2*sin(theta) . Then find the mass if f(x,y) = x^2+y^2 is the density function of a metal plate with this shape.

> polarplot(3-2*sin(theta),theta=0..2*Pi,color=orange,thickness=2);

[Maple Plot]

To set up the integral, notice that f = r^2 . Thus, the mass equals

> int(int(r^3,r=0..3-2*sin(theta)),theta=0..2*Pi); 195/2*Pi

> evalf(%); 306.3052838


Example 3

> restart:with(plots):with(plottools): #clear memory,load plotting programs

Problem: Find area inside one petal of r= 3*cos(2*theta); but outside of the circle
r = 2. See the shaded region below.

> graphs:=polarplot({2,3*cos(2*theta)},theta=0..2*Pi,
color=[red,blue],thickness=2):

> for i from 1 to 19 do
theta:=-arccos(2/3)/2 + (i/20)*arccos(2/3);
l[i]:=line([2*cos(theta),2*sin(theta)],
[3*cos(2*theta)*cos(theta),3*cos(2*theta)*sin(theta)],
color=green, linestyle=2, thickness=3);
od:

> display(graphs,seq(l[i],i=1..19));

[Maple Plot]

Question: Can you figure out how I made this plot?

Solution: Below is the intergal I used. We will discuss where it came from in class.

> 2*int(int(r,r=2..3*cos(2*theta)),theta=0..arccos(2/3)/2);

Error, (in int) wrong number (or type) of arguments

The problem is theta was used in the program above and is now regarded as the wrong type of variable. This is easy to fix.

> 2*int(int(r,r=2..3*cos(2*thet)),thet=0..arccos(2/3)/2);

1/2*sqrt(5)+1/4*arccos(2/3)

> evalf(%); 1.328301157

Visually inspect the plot to see if this looks about right.