Vector-valued functions

Multivariable Calculus, Math 211, Fall 2021, Carleton College, Joshua R. Davis, jdavis@carleton.edu

Parametrized curves in (R^2)

Here’s a parametrized line. Run the code by clicking anywhere on the code and pressing Enter or Shift-Return. Inspect the plot. Then change the value of the point p or the direction d, to see how the plot changes. Also change the interval for t (currently [0, 1]) to see how the plot changes.

Clear[t, x1, x2];
p = {2, 1};
d = {1, -1};
x = p + t d;
ParametricPlot[x, {t, 0, 1}, AxesOrigin->{0, 0}, AxesLabel->{x1, x2}]

Exercise A: Copy the code above, and paste it below this text cell. Edit it so that it plots a vertical line.

Here’s a fancier version, that displays not only the parametrized line but also a specific point p + s d on that line. Move the slider to change the value of s.

p = {2, 1};
d = {1, -1};
x = p + t d;
Manipulate[
Show[
ParametricPlot[x, {t, 0, 1}, AxesOrigin->{0, 0}, AxesLabel->{x1, x2}], 
ListPlot[{x /. t -> s}]],
{s, 0, 1}]

Here’s an example that isn’t a line. It’s the graph of the function y = sin(x). Try changing the interval for t. Try changing sin(t) to sin(t^3), which means sine of t cubed.

x = {t, Sin[t]};
ParametricPlot[x, {t, 0, 1}, AxesOrigin->{0, 0}, AxesLabel->{x1, x2}]

Here's an example that definitely isn’t a graph at all.

x = {Sin[t], t};
ParametricPlot[x, {t, -Pi, Pi}, AxesOrigin->{0, 0}, AxesLabel->{x1, x2}]

Here’s one of the most important examples in our course. Eventually, you should memorize it and all of its variations. Before you run this code, try to predict how the parametric plot will look.

x = {Cos[t], Sin[t]};
ParametricPlot[x, {t, 0, 2 Pi}, AxesOrigin->{0, 0}, AxesLabel->{x1, x2}]

Exercise B: Copy the code above. Paste it below this text cell. Change it so that the circle is centered at (-2, 1) and has radius 3.

If we haven’t talked about polar coordinates yet, then stop here. Want something to do? Download the notebook introduction.nb from our course web site, and play around with that.

Polar coordinates

Here’s some code demonstrating how to convert from Cartesian coordinates to polar coordinates. There is a subtle difference between the two uses of ArcTan. You might have to run the code a few times, to see it.

x1 = RandomReal[{-1, 1}];
x2 = RandomReal[{-1, 1}];
{x1, x2} = {x1, x2} / Norm[{x1, x2}];
{x1, x2}
Norm[{x1, x2}]
ArcTan[x2 / x1]
ArcTan[x1, x2]

Before running the following code, try to predict how the polar graph will look.

Clear[theta, r];
r = Sqrt[3];
PolarPlot[r, {theta, 0, 2 Pi}]

Try to predict.

r = 1 / Cos[theta];
PolarPlot[r, {theta, 0, 2 Pi}, PlotRange->{-5, 5}]

Here’s a fancier version, where you can track a point as it moves along that curve.

Manipulate[
Show[
PolarPlot[r, {theta, 0, 2 Pi}, PlotRange->{-5, 5}], 
ListPolarPlot[{{phi, r /. theta -> phi}}, PlotStyle->PointSize[Large]]], 
{phi, -ArcCos[1 / Sqrt[1 + 5^2]], ArcCos[1 / Sqrt[1 + 5^2]]}]

Try to predict.

m = 1.5;
b = -0.5;
Plot[m x + b, {x, -9, 9}]
PolarPlot[b / (Sin[theta] - m Cos[theta]), {theta, 0, 2 Pi}]

Parametrized curves in (R^3)

Here’s a parametrized line p + t d in three dimensions.

Clear[t, x1, x2, x3];
p = {0, 0, 0};
d = {1, 2, 0};
x = p + t d;
ParametricPlot3D[x, {t, 0, 1}, AxesOrigin->{0, 0, 0}, AxesLabel->{x1, x2, x3}]

We plot this curve as part of an in-class exercise.

x = {Cos[t], Sin[t], 2 - Sin[t]};
ParametricPlot3D[x, {t, 0, 2 Pi}, AxesOrigin->{0, 0, 0}, AxesLabel->{x1, x2, x3}]

Here’s a famous curve called the twisted cubic. Before you run this code, try to predict what its shadows on the x-y-, x-z- and y-z-planes look like.

x = {t, t^2, t^3};
ParametricPlot3D[x, {t, -1, 1}, AxesOrigin->{0, 0, 0}, AxesLabel->{x1, x2, x3}]