Lab 12: Parametric curves and calculus

MAT 229, Spring 2025

Review

Relations between Cartesian coordinates (x,y) and polar coordinates (r,θ).
	x=r cos(θ)
y=r sin(θ)
and
	(r^2)=(x^2)+(y^2)
tan(θ)=(y/x)

xx=4;
yy=4;
rr=3;
θθ=ArcTan[yy/xx];Graphics[{PointSize[0.02],Point[{xx,yy}],Circle[{0,0},1,{0,θθ}],Dashed,Line[{{xx,0},{xx,yy},{0,0}}],Text[x,{xx/2,-0.3}],Text[y,{xx+0.3,yy/2}],Text[r,{xx/2-0.3,yy/2+0.3}],Text[θ,1.3{Cos[θθ/2],Sin[θθ/2]}],Text[{x,y},{xx,yy+1.08},{0,1}],Text[{r,θ},{xx,yy+0.5},{0,1}]},Axes->True,Ticks->None,BaseStyle->FontSize->18,PlotRange->{{-1,5},{-1,5}}]

Overview

In this lab we’ll see a few different methods for plotting the polar and parametric equations and motions we’ve been discussing. 

We  consider problems related to shapes and intersections of curves, tangents to curves, lengths of curves, areas under curves, rates of change with respect to the parameters, and other topics.

Our key commands this week:

General comments on commands:

Clear  -- clears the definition of a variable, function, etc. Sometimes a prior definition contaminates further computation

(Save! During the lab exam, some of you crashed out and lost work.... Save often.)

Avoid using UPPER CASE: Mathematica uses that for its own stuff. Don’t use N as a variable, for example, because it’s used as Mathematica’s Numerical command (to give an approximate rather than an exact one).

Specific commands to practice for this lab:

PolarPlot

ParametricPlot

Solve

GraphicsGrid

Manipulate

Polar curves

Given an equation on r and θ, all the points whose polar coordinates satisfy the equation form a curve, a polar curve. Graphing calculators and software can plot curves given by r=f(θ).

To plot the polar curve r=f(θ), a≤θ≤b, in Mathematica, use the command PolarPlot.

Example

To plot r=1-2cos(θ) for 0≤θ≤2π, enter

r[θ_]:=1-2cos(θ)
PolarPlot[r[θ],{θ,0,2Pi}]

Parametric curves

Alternatively, one could plot the polar curve as a set of parametric equations:  given a polar curve r=f(θ),a≤θ≤b, use the equations
	x=r cos(θ)
y=r sin(θ)
to get parametric equations for the curve. The, to plot the parametric curve (x(t),y(t)), a≤t≤b, in Mathematica, use the command ParametricPlot.

Example

r[t_]:=1-2cos(t)
x[t_]:=r[t]Cos[t]
y[t_]:=r[t]Sin[t]
ParametricPlot[{x[t],y[t]},{t,0,2Pi},PlotStyle->{Red,Thick}]

Questions about curves

For each of the next three sets of parametric equations,

Eliminate the parameter to get a Cartesian equation (eliminate t).

Graph both the Cartesian equation and the parametric curve, and identify the portion of the Cartesian graph swept out by the parametric curve.

x=cos(t)
y=sec(t)

(* y=1/x *)
x[t_]:=Cos[t]
y[t_]:=Sec[t]
Show[
Plot[1/x,{x,-3,3}],
ParametricPlot[{x[t],y[t]},{t,0,2Pi},PlotStyle->{Red,Thick}]
]

x=2(e^t)+3
y=-(e^(2t))

(* y=-((x-3)/2)^2 *)
x[t_]:=2Exp[t]+3
y[t_]:=-Exp[2t]

Show[
Plot[-((x-3)/2)^2,{x,0,6}],
ParametricPlot[{x[t],y[t]},{t,-10,10},PlotStyle->{Red,Thick}]
]

x=10sin(3t)+100
y=10cos(3t)+200

(* (x-100)^2+(y-200)^2 = 100 *)
x[t_]:=10Sin[3t]+100
y[t_]:=10Cos[3t]+200
Show[
ParametricPlot[{x[t],y[t]},{t,-Pi/3,Pi/3},PlotStyle->{Red,Thick}]
]

The Bowditch curve is given parametrically by x=sin(t/2), y=sin(t).

It is a closed curve, meaning it begins to repeat itself as t increases. Starting with t=0, find a positive value of t where it begins to repeat. Then have Mathematica plot the curve.

(* (x-100)^2+(y-200)^2 = 100 *)
x[t_]:=Sin[t/2]
y[t_]:=Sin[t]
Show[
ParametricPlot[{x[t],y[t]},{t,0,4Pi},PlotStyle->{Red,Thick}]
]

From your plot you should see that there are four places where the curve has horizontal tangents, ((d y)/(d x))=0. Find the parameter values as well as the coordinates for these four points.

Show[
ParametricPlot[{x[t],y[t]},{t,0,4Pi},PlotStyle->{Red,Thick}],
ListPlot[Table[{{x[Pi/2+k Pi],y[Pi/2+k Pi]}},{k,0,3}],PlotMarkers->{}]
]

From your plot you should see that there are two places where the curve has vertical tangents, ((d y)/(d x)) undefined. Find the parameter values as well as the coordinates for these two points.

Show[
ParametricPlot[{x[t],y[t]},{t,0,4Pi},PlotStyle->{Red,Thick}],
ListPlot[Table[{{x[Pi+2k Pi],y[Pi+k Pi]}},{k,0,1}],PlotMarkers->{}]
]

The Cycloid curve is given parametrically by x=2π t-sin(2π t),y=1-cos(2π t). It can be thought of as the movement of a point on the outside of a bike tire, of radius 1. Every now and then the point on the tire meets the road....

What is the period of this curve? Graph this curve over two periods.

x[t_]:=2Pi t-Sin[2 Pi t]
y[t_]:=1-Cos[2 Pi t]
Show[
ParametricPlot[{x[t],y[t]},{t,0,2},PlotStyle->{Red,Thick}]
]

Plot the parametric curve of the derivatives: (x’(t),y’(t)). What is its period?

Show[
ParametricPlot[{x'[t],y'[t]},{t,0,1},PlotStyle->{Red,Thick}]
]

Compute the length of the curve over one period.

Integrate[Sqrt[x'[t]^2+y'[t]^2],{t,0,1}]

Can you relate the derivative curve to the motion of the bicycle tire? Can you create a Manipulate command to illustrate the relationship between the two curves as time changes? In other words, you want to plot the two curves together, and then plot points at any given time that illustrate where you are on the two curves. Then make sense of the motion of the bike tire in terms of your speeds (for that’s what they are) in the x and y directions.

That’s a difficult challenge! If you are struggling, here’s one way to do it....

x[t_]:=2Pi t-Sin[2 Pi t]
y[t_]:=1-Cos[2 Pi t]
p1=ParametricPlot[{x[t],y[t]},{t,0,2},PlotStyle->{Red,Thick}];
p2=ParametricPlot[{x'[t],y'[t]},{t,0,1},PlotStyle->{Black,Thick}];
Manipulate[
Show[
p1,
p2,
ListPlot[{{x[t],y[t]}},PlotMarkers->{}],
ListPlot[{{x'[t],y'[t]}},PlotMarkers->{}],
PlotRange->All
],{t,0,2}]

The polar curve r=1+2cos(θ).

This curve is periodic. What is its period? (Give your answer as an interval, like [0,p) where p is the period.)

Plot the curve on this interval.

r[θ_]:=1+2cos(θ)
PolarPlot[r[θ],{θ,0,2Pi}]

For which values of θ is r<0?

Solve[1+2Cos[θ]==0,θ]
Plot[{-1/2,cos(θ)},{θ,0,2Pi}] 
(* Between 2Pi/3 and 4Pi/3 on the interval [0,2Pi)] *)
Cos[2Pi/3]
Cos[4Pi/3]

Extremes of r:

What is the largest possible value of r?

What is its minimum value?

What are the corresponding θ-values and the points in Cartesian coordinates?

What are the values of θ  at the point of self-intersection for this curve?

r[2Pi/3]
r[4Pi/3]

The polar curve r=1-2cos(θ) is closely related to r=1+2cos(θ). Answer the same questions for r=1-2cos(θ) that you answered for r=1+2cos(θ).

This curve is periodic. What is its period? (Give your answer as an interval, like [0,p) where p is the period.)

[0,2Pi)

Plot the curve on this interval.

r[θ_]:=1-2cos(θ)
PolarPlot[r[θ],{θ,0,2Pi}]

For which values of θ is r<0?

Extremes of r:

What is the largest possible value of r?

What is its minimum value?

What are the corresponding θ-values and the points in Cartesian coordinates?

What are the values of θ  at the point of self-intersection for this curve?

How are the two curves related?

Consider now the polar curve r=1+2sin(θ).

How is this curve r=1+2sin(θ) related to r=1+2cos(θ)?

They’re rotated versions of each other (or a reflection about the line y=-x).

r[θ_]:=1+2Sin[θ]
PolarPlot[{r[θ],1+2Cos[θ]},{θ,0,2Pi}]

What are their points of intersections?

r[θ_]:=1+2Sin[θ]
Solve[r[θ]==1+2Cos[θ],θ]
theta=Pi/4
theta=N[theta];
{r[theta]Cos[theta],r[theta]Sin[theta]}
theta=-3Pi/4
theta=N[theta];
{r[theta]Cos[theta],r[theta]Sin[theta]}

(0,0), (1,0), (0, 1), and the points above. Note that the ones the Solve command gives are points at which they intersect simultaneously; the others are not simultaneous.

r1[θ_]:=1+2Sin[θ]
r2[θ_]:=1+2Cos[θ]
plot=PolarPlot[{r1[θ],r2[θ]},{θ,0,2Pi}];
x1[θ_]:=r1[θ]Cos[θ]
y1[θ_]:=r1[θ]Sin[θ]
x2[θ_]:=r2[θ]Cos[θ]
y2[θ_]:=r2[θ]Sin[θ]
Manipulate[
Show[
plot,
ListPlot[{{x1[t],y1[t]}},PlotMarkers->{}],
ListPlot[{{x2[t],y2[t]}},PlotMarkers->{}],
PlotRange->All
],{t,0,2Pi}]

Compute the length of this curve over one period (write the proper integral, which you may compute numerically).

r[θ_]:=1+2Sin[θ]
PolarPlot[{r[θ]},{θ,0,2Pi}]
NIntegrate[Sqrt[r[theta]^2 + r'[theta]^2],{theta,0,2Pi}]

Compute the area of the inside loop (write the proper integral, which you may compute numerically).

r[θ_]:=1+2Sin[θ]
PolarPlot[{r[θ]},{θ,7Pi/6,11Pi/6}]
NIntegrate[1/2(r[theta]^2),{theta,7Pi/6,11Pi/6}]

The polar curve r=sin(n θ) where n is a whole number is called a rose.

For each of n=1,2,3,4 determine the range of values of θ needed to draw the curve until it starts repeating itself. Make a conjecture about the range of values of θ needed for general n; make sure to test your conjecture.

r[n_,θ_]:=Sin[n θ]
GraphicsGrid[{{
PolarPlot[{r[1,θ]},{θ,0,Pi}],
PolarPlot[{r[2,θ]},{θ,0,2Pi},PlotStyle->Orange],
PolarPlot[{r[3,θ]},{θ,0,Pi},PlotStyle->Black],
PolarPlot[{r[4,θ]},{θ,0,2Pi},PlotStyle->Yellow]
}}]

Plot this curve for several more values of n and make (and test) a conjecture about the number of petals for the rose  r=sin(n θ).

There are 2n petals if n is even; n petals if n is odd.

GraphicsGrid[{{
PolarPlot[{r[5,θ]},{θ,0,Pi}],
PolarPlot[{r[6,θ]},{θ,0,2Pi},PlotStyle->Orange],
PolarPlot[{r[7,θ]},{θ,0,Pi},PlotStyle->Black],
PolarPlot[{r[8,θ]},{θ,0,2Pi},PlotStyle->Yellow]
}}]

For any given n, what range of values of θ are needed to draw one petal of the rose?

Show[
PolarPlot[{r[5,θ]},{θ,0,Pi/5}],
PolarPlot[{r[6,θ]},{θ,0,Pi/6},PlotStyle->Orange],
PolarPlot[{r[7,θ]},{θ,0,Pi/7},PlotStyle->Black],
PolarPlot[{r[8,θ]},{θ,0,Pi/8},PlotStyle->Yellow]
]

2Pi/2n, or Pi/n if n is odd; in either event,  Pi/n.