Mathematica Lab 2:  Polar Coordinates

Math 113, Fall 2017
Dr. John Gemmer
Wake Forest University

Plotting in Polar Coordinates

Plotting in polar coordinates is straight forward. The command is simply PolarPlot. However, to make your code look “nice” you will need to use the symbol θ. To do this simply type esc th esc . When you type esc a colon should appear. Typing th and then esc again will generate the symbol. There is a huge number of “secret” symbols and the entire Greek alphabet can generated this way in Mathematica. Here is an example of a polar plot.

f1[θ_]:=Cos[θ]^2;
f2[θ_]:=Cos[θ]^2+Cos[2*θ]^2;
f3[θ_]:=Cos[θ]^2+Cos[2*θ]^2+Cos[3*θ]^2;
f4[θ_]:=Cos[θ]^2+Cos[2*θ]^2+Cos[3*θ]^2+Cos[4*θ]^2;
f5[θ_]:=Cos[θ]^2+Cos[2*θ]^2+Cos[3*θ]^2+Cos[4*θ]^2+Cos[5*θ]^2;

PolarPlot[{f1[θ],f2[θ],f3[θ],f4[θ],f5[θ]},{θ,0,2*π},AxesLabel->{"x","y"},TicksStyle->{{Black,14},{Black,14}},PlotRange->{{-5,5},{-4,4}},AspectRatio->Full]

Mathematica Task #1:

Complete these problems.

Generate the symbol α in Mathematica.

For n=1,2,3,4,5,6. In a single figure, plot the functions r[θ_]:=|Sin[θ]|+|Sin[2θ]|+|Sin[3θ]|+…+|Sin[nθ]|. If needed, look up in the Wolfram Documentation how to use the absolute value. Make sure you change the plot range to adequatly show all of the plots.

If you did part 2 correctly, all of the plots meet at certain points but never cross. Explain why this is true. Think about at what angles each of the graphs intersect.

Manipulating Plots

The Manipulate command allows you to see the effect that parameters have on a problem. Using the Manipulate command generate a figure with a slider that allows one to quickly scan through the various plots. Here is an example.

Manipulate[PolarPlot[Sin[n*θ]^2,{θ,0,2*π},PlotRange->{{-1,1},{-1,1}},AxesLabel->{"x","y"}],{n,0,10}]

Mathematica Task #2:

Using Manipulate plot in polar coordinates the function r[θ_]:=Sin[n*θ]^2+Cos[m*θ]^2 for both n and m ranging from 0 to 10.

What condition on n and m must be satisfied in order for this curve to close up when θ=2π?