Weekly Assignment 11

MAT 229, Spring 2021

Instructions:  Show your work!

1. Polar curves

A. Consider the two polar curves r=1 and r=2+2cos(θ).

PolarPlot[{1,2+2Cos[theta]}, {theta,0,2Pi}]

Find polar coordinates for all points of intersection.

Solve[2+2Cos[θ]==1,θ,]
(* ((2 π)/3), -((2 π)/3)*)

Find the area of the region that is inside r=2+2cos(θ) and outside r=1.

Integrate[1/2((2 + 2Cos[th])^2 - 1),{th,-((2 π)/3),((2 π)/3)}]
N[%]

B. Consider the polar curve r=θ (An Archimedean spiral).

(* If you ask me to consider a certain polar curve, the first thing I want to do is plot it!:) *)
GraphicsGrid[{{
PolarPlot[{theta}, {theta,0,2Pi}],
PolarPlot[{theta}, {theta,0,2*2Pi}],
PolarPlot[{theta}, {theta,0,3*2Pi}],
PolarPlot[{theta}, {theta,0,4*2Pi}],
PolarPlot[{theta}, {theta,0,5*2Pi}]
}}]

Find the length of the curve  swept out after n complete rotations from angle 0; your answer should be a formula involving n.

(* 
This is what our formula gives us: notice that n complete rotations is n*2Pi radians.... 
I've also added some assumptions: this is nice when Mathematica is trying to handle a lot of "irrelevant" cases for me. My n is a natural number (that is, a positive integer):
*)
length[n_]=Integrate[Sqrt[th^2+1],{th,0,2Pi n},Assumptions->n∈Integers&& n>0]
(* That's a very cool looking formula! *)

(* I'm going to compare my calculated lengths with what I'd get by doing a sum of a bunch of circles of the average radius, because they should be rather close: *)
tab=Table[{
n,
N[length[n]], (* Here are the actual lengths *)
Sum[2.0Pi(2m-1)Pi,{m,1,n}] (* This is the sum of a bunch of circumferences with average radii....*)
},{n,1,10}
];
TableForm[tab,TableHeadings->{{},{"n","exact","approximated"}}
]
(* pretty close!  It's interesting that the differences are so consistent.... *)

Find the area of the region that is swept out over the last complete rotation when using n complete rotations from angle 0; your answer should be a formula involving n. (You might use a circle as an approximation to check your answer.)

Integrate[1/2(th^2),{th,0,1*2Pi },Assumptions->n∈Integers&& n>0]
Integrate[1/2(th^2),{th,1*2Pi,2*2Pi },Assumptions->n∈Integers&& n>0]
area[n_]=Integrate[1/2(th^2),{th,(n-1)*2Pi,n*2Pi },Assumptions->n∈Integers&& n>0]
(* I'm going to compare my calculated areas with the area of a circle of the average radius, because they should be rather close: *)
tab=Table[{
n,
N[area[n]], (* Here are the actual lengths *)
N[Pi((2n-1)Pi)^2] (* This is the area of a circle with average radii....*)
},{n,1,10}
];
TableForm[tab,TableHeadings->{{},{"n","exact","approximated"}}
]
(* pretty close! It's interesting that the differences are so consistently equal to about 10.... *)

2. Shapes in space

Let P be the point with Cartesian coordinates (2,1,4) and Q be the point (4,3,10).

p={2,1,4}
q={4,3,10}
Graphics3D[Arrow[{p,q}]]

What is the distance between them?

Norm[q-p]
N[%]

What are the coordinates for the midpoint of the line segment (OverBar[P Q])?

midpoint=1/2(q-p)
radius=1/2Norm[q-p]

Find an equation for the sphere that has a diameter with one endpoint at P and the other at Q.

Norm[{x,y,z}-midpoint]^2==radius^2

3. Unit vectors

Find the two unit vectors that are parallel to vector ⟨2,6⟩.

u={2,6}
uhat=u/Norm[u]
-uhat