Math 152 Lab 5 - Parametic Equations and Polar CoordinatesIntroductionPreviously, we have been dealing with situations where one variable, y, was a function of another variable, x. We had equationsthat related y to x, and everything was nice and simple. However, not all real-world problems are so simple or clear-cut. What if yis still directly related to x, but it isn't a function? One of the easiest ways to simplify a complicated problem is throughparametrization. In parametrization, the variables of interest are not directly related. Instead, they are both functions of someintermediate variable.In this lab, we will explore the concept graphically. We will learn how to plot parametrically-defined curves in Mathematica, andwill visualize the parametrization through animations. Later, we will focus specifically on the polar coordinate system, which is aspecific parametrization that makes certain types of problems significantly easier to work with.Parametric EquationsLet's say we have the following parametric relationship:In[1]:=x@t_D := Cos@tDy@t_D := Sin@tDWe can plot the curve using the ParametricPlot command. The first argument is a list containing the expressions for the xand y coordinates, and the second argument is the variable and range:In[3]:=ParametricPlot@8x@tD,y@tD<, 8t, 0, 3 ∗ Pi ê 2<DOut[3]=-1.0 -0.5 0.5 1.0-1.0-0.50.51.0Just like with Plot, we can do multiple plots by passing a list for the first argument:2 Lab 5 - ParametricPolar.nbIn[4]:=x2@t_D := Cos@tD + 0.1 ∗ Sin@30 ∗ tDy2@t_D := Sin @tDParametricPlot@88x@tD,y@tD<, 8x2@tD,y2@tD<<, 8t, 0, 3 ∗ Pi ê 2<DOut[6]=-1.0 -0.5 0.5 1.0-1.0-0.50.51.0We can imagine a parametric plot as slowly drawing out the curve as the parameter increases.. We can visualize this with theManipulate command, which we've seen a few times before. The first argument to Manipulate is another plot command,and the second argument is the variable to use for our parameter along with its range:In[7]:=Manipulate@ParametricPlot@88x@uD,y@uD<, 8x2@uD,y2@uD<<, 8u, 0, t<D,8t, 0.001, 3 ∗ Pi ê 2<DOut[7]=t1.0005 1.0010 1.0015 1.0020 1.0025 1.00300.00020.00040.00060.00080.0010We can stop the axes from changing by fixing them in the plot command itself, using the PlotRange command:Lab 5 - ParametricPolar.nb 3In[8]:=Manipulate@ParametricPlot@88x@uD,y@uD<, 8x2@uD,y2@uD<<,8u, 0, t<, PlotRange → 88−1.1, 1.1<, 8−1, 1<<D, 8t, 0.001, 3 ∗ Pi ê 2<DOut[8]=t-1.0 -0.5 0.5 1.0-1.0-0.50.51.0We can use Manipulate with multiple different types of plots at the same time. One example which uses this is called thecycloid, which is generated by tracking one point along a circle that is rolling along a flat surface. The parametric equations for acircle that is moving look like this:xHq, tL =-r sinHqL + rstyHq, tL = r cosHqL + rWhere t is time, s is speed, and q is the parameter for the curve. Let's say we've got a circle of radius 1 and moving at a constantspeed of 1. The animation of the circle rolling looks like this:4 Lab 5 - ParametricPolar.nbIn[9]:=Manipulate@ParametricPlot@8− Sin@thetaD + t, Cos@thetaD + 1<,8theta, 0, 2 Pi<, PlotRange → 88− 1, 4 ∗ Pi + 1.01<, 80, 2<<D, 8t, 0.001, 4 Pi<DOut[9]=t0 2 4 6 8 10 120.51.01.52.0We've also got the cycloid curve itself:xHtL = rst- r sinHstLyHtL = rH1 - cos HstLLIn[10]:=Manipulate@ParametricPlot@8u − Sin@uD,1− Cos@uD<,8u, 0, t<, PlotRange → 88− 1, 4 ∗ Pi + 1.01<, 80, 2<<D, 8t, 0.001, 4 Pi<DOut[10]=t0 2 4 6 8 10 120.51.01.52.0Finally, we have the point on the circle:Lab 5 - ParametricPolar.nb 5In[11]:=Manipulate@ListPlot@88t − Sin@tD,1− Cos@tD<<,PlotRange → 88− Pi ê 2, 4 ∗ Pi + 1.01<, 80, 2<<D, 8t, 0.001, 4 Pi<DOut[11]=t0 2 4 6 8 10 120.51.01.52.0All three at once would look like this:In[12]:=Manipulate@Show@8ParametricPlot@8− Sin@thetaD + t, Cos@thetaD + 1<,8theta, 0, 2 Pi<, PlotRange → 88− 1, 4 ∗ Pi + 1.01<, 80, 2<<D,ParametricPlot@8u − Sin@uD,1− Cos@uD<, 8u, 0, t<,PlotRange → 88− 1, 4 ∗ Pi + 1.01<, 80, 2<<D,ListPlot@88t − Sin@tD,1− Cos@tD<<,PlotRange → 88− Pi ê 2, 4 ∗ Pi + 1.01<, 80, 2<<D<D,8t,0.001,4Pi<DOut[12]=t0 2 4 6 8 10 120.51.01.52.0If there are multiple parameters involved, we can show all of them with Manipulate by passing extra ranges. Let's try the cycloidwith variable parameters:6 Lab 5 - ParametricPolar.nbIn[13]:=Manipulate@Show@8ParametricPlot@8− r Sin@thetaD + rst,rCos@thetaD + r<, 8theta, 0, 2 Pi<,PlotRange → 88− r, 4 ∗ r ∗ s ∗ Pi + r ∗ 1.01<, 80, 2 r<<D,ParametricPlot@8rsu − r Sin@suD,r− r Cos@suD<, 8u, 0, t<,PlotRange → 88− r, 4 ∗ r ∗ s ∗ Pi + r ∗ 1.01<, 80, 2 r<<D,ListPlot@88rst − r Sin@ stD,r− r Cos@ stD<<,PlotRange → 88− r, 4 ∗ r ∗ s ∗ Pi + r ∗ 1.01<, 80, 2 r<<D<D,8t, 0.001, 4 Pi<, 8r, 0.5, 5<, 8s, 0.5, 5<DOut[13]=trs0 1 2 30.20.40.60.81.0Polar CoordinatesThe polar coordinate system is the specific parametrization: x = r cos HqLy = r sin HqLIt is notable because arcs, circles, spirals, and other similar curves, which would be horrible to express directly in terms of x andy, are trivially easy to express in terms of r and q. We can visualize it with the PolarPlot command. The first argument toPolarPlot is and expression or fuction for r, and the second argument is the variable and range to use for q. Consider thefunction rHqL = 2, 0 §q§2 p:Lab 5 - ParametricPolar.nb 7In[14]:=PolarPlot@2, 8theta, 0, 2 ∗ Pi<DOut[14]=-2 -1 1 2-2-112A common example used in polar plots is called the cardioid, so named because it looks like a heart. One such cardoid looks likethis:8 Lab 5 - ParametricPolar.nbIn[15]:=PolarPlot@1 − Cos@thetaD, 8theta, 0, 2 ∗ Pi<DOut[15]=-2.0 -1.5 -1.0 -0.5-1.0-0.50.51.0As before, we can do multiplots by passing a list:Lab 5 - ParametricPolar.nb 9In[16]:=PolarPlot@81 − 1 Cos@thetaD,1− 0.9 ∗ Cos@thetaD<, 8theta, 0, 2 ∗ Pi<DOut[16]=-2.0 -1.5 -1.0 -0.5-1.0-0.50.51.0Manipulate also works just fine:10 Lab 5 - ParametricPolar.nbIn[17]:=Manipulate@PolarPlot@1, 8theta, 0, 2 ∗ Pi ∗ t<, PlotRange → 88− 1, 1<, 8− 1, 1<<D, 8t, 0.001, 1<DOut[17]=t-1.0 -0.5 0.5 1.0-1.0-0.50.51.0Exercises - for reference purposes onlyü See separate “Math 152 Lab 5 - Exercises” for current assignment.ü Assignment 1: Plotting Parametric CurvesInvestigate the following family of parametric curves: xHtL = a cos HtL + cosHatLyHtL = a sin HtL + sinHatL-p§t§pYour answer should include:è A plot of the curve for a = 2. è A plot of the curve for a =-2.è A plot of
View Full Document