Velocity and Tangents
to
Parametric Curves

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

Special Mathematica Functions used in this NoteBook

We told you not to look.  This horrible stuff sets various defaults and defines some functions needed to draw the geometric side of the lexicon.  Ignore the details here and go on to the lesson.

Off[General::spell];
Off[General::spell1];
Off[ParametricPlot3D::ppcom]
Needs["Graphics`Colors`"]

SetOptions[Graphics,Axes->False,AxesOrigin->{0,0},AspectRatio->Automatic];
SetOptions[Graphics3D,ViewPoint->{5,2,1},Boxed->False,AspectRatio->Automatic];
SetOptions[ParametricPlot3D,ViewPoint->{5,2,1},AspectRatio->Automatic];
SetOptions[Plot3D,ViewPoint->{5,2,1},AspectRatio->Automatic];
SetOptions[ParametricPlot,AspectRatio->Automatic];
SetOptions[Plot,AspectRatio->Automatic];

colorQ[a_]:=(Head[a]===RGBColor);
grayQ[a_]:=(Head[a]===GrayLevel);
thickQ[a_]:=(Head[a]===Thickness);
absthickQ[a_]:=(Head[a]===AbsoluteThickness);
notruleQ[u_] := !(Head[u]===Rule);
ruleQ[u_] := (Head[u]===Rule);

Norm::usage = "Norm[expr] returns the Euclidean length of the
		vector, 'expr'.";

Norm[a_?VectorQ] := Sqrt[a.a];

Angle[a_?VectorQ,b_?VectorQ] := ArcCos[(a.b)/(Norm[a] Norm[b])]

Proj[a_?VectorQ,b_?VectorQ] := ((a.b)/(b.b))b

tol = .5*10^-6;

OrthUp[a_?VectorQ] :=
	Module[{b,c,d,f},
		d = N[a/Norm[a]];
		If[Chop[d[[3]]^2 - 1,tol] == 0, b={1,0,0} ,
		b = {0,0,1} - d[[3]] d; b = b/Norm[b];];
	Return[b]];
	
OrthSet[a_?VectorQ] :=
	Module[{b,c,d},
		d = N[a/Norm[a]];
		If[Chop[d[[1]],tol]==0,b={1,0,0},
			 If[Chop[d[[2]],tol]==0,b={0,1,0},
			  b={-d[[2]],d[[1]],0}]];
			b=b/Norm[b];c = Cross[d,b];
	Return[{b,c/Norm[c],d}]];

				
Rotate[a_?VectorQ,theta_] :=
	Module[{u,v,r},
		u = OrthSet[a];
		v = Transpose[u];
		r = N[{{Cos[theta],-Sin[theta],0},{Sin[theta],Cos[theta],0},{0,0,1}}];
	Return[v.r.u]];

Vector2D[tail_,tip_,opts___]:=
	Module[{ntail,ntip,sopts,Punit,up,arrow},
	ntail = N[tail];
	ntip = N[tip];
	
	sopts = Join[Select[{opts},colorQ],Select[{opts},
				thickQ],Select[{opts},absthickQ],Select[{opts},grayQ]];

If[Chop[ntail.ntail+ntip.ntip,tol] == 0,
			(*too small to plot or not number*)
			Return[Graphics[Point[{0,0}]]];
	,						
If[Chop[(ntip-ntail).(ntip-ntail),tol] == 0,
		Return[Graphics[{Join[sopts,{Line[{ntail,ntip}]}]}]];
	,
	Punit = (.075 Norm[ntip-ntail]/Norm[ntip-ntail]) (ntip-ntail) ;
	up = 0.15 {-Punit[[2]],Punit[[1]]};
	arrow = Line[{ntail,ntip,ntip-Punit+up,ntip,ntip-Punit-up}];
	]];
Return[Graphics[{Join[{AbsoluteThickness[2]},Join[sopts,{arrow}]]}]];
];

Vector3D[tail_,tip_,opts___]:=
	Module[{ntail,ntip,sopts,Punit,up,u2,u3,u4,rotmat,arrow},
	ntail = N[tail];
	ntip = N[tip];
	
	sopts = Join[Select[{opts},colorQ],Select[{opts},
				thickQ],Select[{opts},absthickQ],Select[{opts},grayQ]];

If[Chop[ntail.ntail+ntip.ntip,tol] == 0,
			(*too small to plot or not number*)
			Return[Graphics3D[Point[{0,0,0}]]];					
	,		
If[Chop[(ntip-ntail).(ntip-ntail),tol] == 0,
		Return[Graphics3D[{Join[sopts,{Line[{ntail,ntip}]}]}]];
	,
	Punit = (ntip-ntail);
	rotmat = Rotate[Punit,N[Pi/2]];
	up = OrthUp[Punit];
	Punit = .075 Punit;
	up = .15 Norm[Punit] up;
	u2 = rotmat.up;
	u3 = rotmat.u2;
	u4 = rotmat.u3;
	arrow = Line[{ntail,ntip,
				ntip - Punit + up,ntip,
				ntip - Punit + u2,ntip,
				ntip - Punit + u3,ntip,
				ntip - Punit + u4}];
	]];
Return[Graphics3D[{Join[{AbsoluteThickness[2]},Join[sopts,{arrow}]]}]];
];

aRCtAN[y_,x_] := Module[{v},
	If[ Chop[N[x],tol] == 0 ,If[ N[y] < 0, v = -N[Pi/2], v = N[Pi/2]],
		v = N[ArcTan[y/x]];
		If[ x < 0 && y < 0, v = N[Pi -  v],v]];
	Return[v]];

Arc2D[X_,Y_,opts___] := Graphics[{opts,
		Disk[{0,0},1,{Min[
							aRCtAN[
						N[X[[2]]],N[X[[1]]]
								]
							,
							aRCtAN[
							N[Y[[2]]],N[Y[[1]]]
								]
						]
						,
					Max[
							aRCtAN[
						N[X[[2]]],N[X[[1]]]
								]
							,
							aRCtAN[
							N[Y[[2]]],N[Y[[1]]]
								]
						]}
				]}
				];
Arc3D[X_,Y_] := 
	Module[{t,U,V},
		U[V_]:= N[(1/Sqrt[V.V]) V];
		Return[Graphics3D[
		Polygon[Append[Table[U[t X + (1-t) Y],{t,0,1,0.1}],{0,0,0}]]
				]
		]
	];

(*Zero Arrow causes trouble. Put in Vector?*)

Vector[tail_,tip_,opts___]:=
	If[Length[N[tail]]==2,Return[Vector2D[tail,tip,opts]],
		Return[Vector3D[tail,tip,opts]]];
		
Arrow[vec_,opts___]:= 
	Module[{a,b},
				If[Length[N[vec]]==2,
				a=ToExpression["Tail"]/.Select[{opts},ruleQ]/.
					{ToExpression["Tail"]->{0,0}};
				Return[Vector2D[a,a+vec,opts]],
				a=ToExpression["Tail"]/.Select[{opts},ruleQ]/.
					{ToExpression["Tail"]->{0,0,0}};
				Return[Vector3D[a,a+vec,opts]]]
				];

Frame2D[delta_] := 
      Graphics[{
            {Green,Line[{{-delta/4,0},{delta,0}}]},
                    Text["x",{1.01 delta,0}],
            {Green,Line[{{0,-delta/4},{0,delta}}]},
                    Text["y",{0, 1.01 delta}]}];

Frame3D[delta_] := 
      Graphics3D[{
            {Green,Line[{{-delta/4,0,0},{delta,0,0}}]},
                    Text["x",{1.01 delta,0,0}],
            {Green,Line[{{0,-delta/4,0},{0,delta,0}}]},
                    Text["y",{0, 1.01 delta,0}],
            {Green,Line[{{0,0,-delta/4},{0,0,delta}}]},
                    Text["z",{0,0,1.01 delta}]}];

View2D[stuff_] := Show[stuff,Frame2D[1]];
View3D[stuff_] := Show[stuff,Frame3D[1]];

Notebook Overview

This NoteBook show how to compute the velocity of a parametric movement and the tangent to the parametric curve.  You should be familiar with the Parametric Lines NoteBook.

The Smooth Theory

A smoothly parametrized curve is given by a set of values of a vector function,

{ X[t] : a < t< b},

where

X[t] = {x[t], y[t]} in 2D  or  X[t] = {x[t], y[t], z[t]}  in  3D

and the real-valued functions  x[t], y[t], z[t]  are smooth (or continuously differentiable).  Notice that only the range values in the set are plotted, the variable  t  is NOT plotted.

We will see that for the curve itself to be guaranteed smooth, that is, not have corners, the "speed" of the parametrization can not be zero.  Thus the following definition:

Definition

A (regular) smooth parametric curve is a set of values of a vector function as above, but where the derivative or "velocity" vector:

dX/dt  = {dx/dt, dy/dt}  or  dX/dt  = {dx/dt, dy/dt, dz/dt}

is never zero.  (This derivative vector,  dX/dt,  is obtained by just differentiating the component functions as in beginning calculus.)

Explicit Plots given parametrically

(A plot of f[t] vs. t  is called an explicit graph, { (t, f[t])  : a < t< b}.  Explicit plots can be realized parametrically by letting  X[t] = {x[t],y[t]} = {t, f[t]}, that is, let the independent variable be the parameter.)

Tangent Vectors

The derivative vector is the rate of change of vector position with respect to  t.  If position is measured in units of distance and  t  is time, then

dX/dt = the velocity vector.

This vector is tangent to the parametric curve, and its length is equal to the rate of change of total distance moved per unit time, or

| dX/dt | = the speed (a scalar)

Parametric Tangent Lines

If  X[t] = {x[t], y[t], z[t]}, the parametric equation of the tangent line to the parmetric graph of  the tangent line at the point  X[t0] is given in the new parallel coordinate system  {dx, dy, dz} by

dx =  dt *x'[t0]
	dy =  dt *y'[t0]
	dz =  dt *z'[t0]

or

dX =  dt * X'[t0]

with the new parameter  dt,	where local coordinates are given by

dx = x - x0,  dy = y - y0, dz = z - z0  and {x0, y0, z0} = X[t0].

References to the Text

This NoteBook goes with Section 16.5 of the text.

Increments of a 3D Curve

Why is the derivative vector a tangent and velocity?

The vector from a point  X(t)  to a nearby point   X(t+dt)  when  dt  is very small is also very small.  If we magnify it by (1/dt), we have the vector:

(1/dt) (X[t+dt] - X[t]) = {(x[t+dt] - x[t])/dt, (y[t+dt] - y[t])/dt, (z[t+dt] - z[t])/dt}

Smoothness of each of the real valued component functions means that for  a<= t <=b:

(x[t+dt] - x[t])/dt ≈ x'[t]
or
(x[t+dt] - x[t])/dt = x'[t]  +  (Subscript[ϵ, x]), with an error (Subscript[ϵ, x]) ≈ 0, when  dt  ≈ 0.

(y[t+dt] - y[t])/dt  ≈ y'[t]
or
(y[t+dt] - y[t])/dt = y'[t]  +  (Subscript[ϵ, y]), with an error (Subscript[ϵ, y])  ≈ 0, when  dt  ≈ 0.

(z[t+dt] - z[t])/dt  ≈ z'[t]
or
(z[t+dt] - z[t])/dt = z'[t]  +  (Subscript[ϵ, z]), with an error (Subscript[ϵ, z])  ≈ 0, when  dt  ≈ 0.

Doing some algebra, we can write this as

x[t+dt] - x[t] = dt * x'[t]  +  dt * (Subscript[ϵ, x]), with an error (Subscript[ϵ, x])  ≈ 0,
		y[t+dt] - y[t] = dt * y'[t]  +  dt *(Subscript[ϵ, y]), with an error (Subscript[ϵ, y]) ≈ 0,
		z[t+dt] - z[t] = dt * z'[t]  +   dt * (Subscript[ϵ, z]), with an error (Subscript[ϵ, z])  ≈ 0,

which looks as follows in vector notation:

X[t+dt] - X[t]  =  dt * X'[t]  + dt * E

where the error vector, E = {(Subscript[ϵ, x]),(Subscript[ϵ, y]),(Subscript[ϵ, z])}, is small if  dt is small,  |E| ~ 0, when dt ~0.

We can see this approximation by magnifying a small portion of a curve.  Under magnification (1/dt)  the length  dt  appears unit size, so  dt * X'[t]  appears to be  X'[t] and we see the difference as (X[t+dt] - X[t])/dt.  When the error  E  is negligible, we won't see the difference between  X[t+dt] - X[t]  and dt*X'[t].  The next animation shows what happens as we "zoom" in on the segment  X[t+dt] - X[t]  plotting  X'[t]  at its original size.  When we zoom al the way to  dt, the two nearly coincide.

Magnification of the curve X[t] and no magnification of  X'[to]

Clear[x, y, z, t, dt, delta, n, to, k]; x[t_] := Sin[t]; y[t_] := Cos[t]; z[t_] := Sin[t]; X[t_] := {x[t], y[t], z[t]}; to = 1; n = 6; dt = (1/(2^n)); delta = 2; Do[delta = (delta/2);curve = 
              ParametricPlot3D[{x[t], y[t], z[t]}, {t, to - delta, 
                  to + 2 delta}, Boxed -> False, 
                BoxRatios -> {1, 1, 1}, 
                AxesLabel -> {"x", "y", "z"}, 
                Axes -> None, 
                PlotRange 
                  -> {{x[to] - 2 delta, x[to] + 2 delta}, {
                      y[to] - 2 delta, y[to] + 2 delta}, {z[to] - 2 delta, 
                      z[to] + 2 delta}}, 
                PlotLabel 
                  -> {("X Curve Magnification"/delta), "dt = ", 
                    dt}, DisplayFunction -> Identity];Show[curve,Graphics3D[{Blue, PointSize[0.03], Point[X[to + dt]]}],Graphics3D[{Blue, PointSize[0.03], Point[X[to]]}],Arrow[X[to + dt] - X[to], Tail -> X[to], 
                  AbsoluteThickness[3]],Arrow[delta X'[to],Tail -> X[to],Red],DisplayFunction -> $DisplayFunction];,{k, 1, n + 1}];

Practice Exercise

Copy and modify the computations above to plot an increment of of X = {x[t],y[t],z[t]}, where

x[t_] :=  Cos[t];
y[t_] :=  Sin[t]Cos[t];
z[t_] :=  Cos[t];

near the point  to = Pi/3.

Tangent Vectors

The vector derivative  dX/dt  is a tangent vector to the parametric curve  X[t], PROVIDED the derivative is not zero.  (Since the zero "vector" is a point, it can't be tangent.)  The following examples show this tangency.

The unit length tangent "in the direction of the parametrization" is obtained by simply scaling the derivative by the length or norm of the derivative,

T[t] = ((1/(| X'[t] | )))  X'[t]
or
	T[t] = (1/Norm[X'[t]]) * X'[t]

2D Tangents to a Circle

Clear[x, y, X, t]; x[t_] := Cos[t]; y[t_] := Sin[t]; X[t_] := {x[t], y[t]}; curve = 
      ParametricPlot[X[t], {t, -π, π}, 
        PlotStyle -> {{Thickness[0.01], Blue}}, 
        AxesLabel -> {"x", "y"}]; Show[curve, Table[Arrow[X[t], Green], {t, -π, π,  .3}]]; Show[curve,Table[Arrow[X[t], Green], {t, -π, π,  .3}],Table[Arrow[X'[t],Tail -> X[t],Red],{t, -π, π,  .3}]];

2D Unit Tangents

Clear[x, y, z, X, t]; x[t_] := Cos[π t]; y[t_] := (1/2) Sin[π t]; X[t_] := {x[t], y[t]}; curve = 
      ParametricPlot[X[t], {t, -1, 1}, 
        PlotStyle -> {{Thickness[0.01], Blue}}, 
        AxesLabel -> {"x", "y"}]; Show[curve, Table[Arrow[X[t], Green], {t, -1, 1,  .3}]]; big=Show[curve,Table[Arrow[X[t], Green], {t, -1, 1,  .3}],Table[Arrow[X'[t],Tail -> X[t],Red],{t, -1, 1,  .3}]];little=Show[curve,Table[Arrow[X[t], Green], {t, -1, 1,  .3}],Table[Arrow[((X'[t])/(Norm[X'[t]])),Tail -> X[t]],{t, -1, 1,  .3}]];Show[big, little];

3D Tangents to a Helix

Clear[x, y, z, X, t]; x[t_] := Cos[t]; y[t_] := Sin[t]; z[t_] := (t/π); X[t_] := {x[t], y[t], z[t]}; curve = 
      ParametricPlot3D[X[t], {t, 0, π}, BoxRatios -> {1, 1, 1}, 
        AxesLabel -> {"x", "y", "z"}, Axes -> None]; 
    Show[curve, Table[Arrow[X[t], Blue], {t, 0, π,  .3}]]; Show[curve,Table[Arrow[X[t], Blue], {t, 0, π,  .3}],Table[Arrow[X'[t],Tail -> X[t],Red],{t, 0, π,  .3}]];

3D Unit Tangents to a Wiggle

Clear[x, y, z, X, t]; x[t_] := 2 Sin[t]; y[t_] := 2 Cos[t]; z[t_] := Sin[(t^3)]; X[t_] := {x[t], y[t], z[t]}; curve = 
      ParametricPlot3D[X[t], {t, 0, 2}, BoxRatios -> {1, 1, 1}, 
        AxesLabel -> {"x", "y", "z"}, Axes -> None]; 
    Show[curve,Table[Arrow[X[t], Blue], {t, 0, 2,  .3}],Table[Arrow[X'[t],Tail -> X[t],Red],{t, 0, 2,  .3}]];Show[curve,Table[Arrow[X[t], Blue], {t, 0, 2,  .3}],Table[Arrow[((X'[t])/(Norm[X'[t]])),Tail -> X[t]],{t, 0, 2,  .3}]];

Tangent Lines

Deriving the Equations

The parametric curve  X[t] has the parametric tangent line  dX = dt * X'[t0],  in {dx, dy, dz}-coordinates and parameter  dt, where  dx = x - x0,  dy = y - y0,  dz = z - z0.

To compute the equation of a tangent line in the {x, y, z}-coordinates:

(1)  Find the derivative  X'[t].

(2)  Set  t = t0, a particular number and compute X[t0] & X'[t0]

(3) Re-write the equations

dx = dt * x'[t0]
	dy = dt * y'[t0]
	dz = dt * z'[t0]

replacing the local variables:

x = x0 +  dt * x'[t0]
	y = y0 + dt * y'[t0]
	z = z0 + dt * z'[t0]

Here are examples with Mathematica:

Lines in Coordinates {dx, dy, dz} & parameter dt

Recall from vector geometry that the parametric equations of a line through a point  P  in the direction  V  are given by

X = P + t V

or

x = p1 + t  * v1
	y = p1 + t * v2
	z = p3 + t * v3

We are going to use the variables  x,  y,  z  for a nonlinear curve, so we will use the variavles {dx,  dy,  dz}  and parameter  dt  for our lines.  The tangent line will also always g through the (dx,dy,dz)-origin, so  P = 0.  This makes the parametric equations of a line:

dX =  dt V

or

dx = dt  * v1
	dy = dt * v2
	dz = dt * v3

2D ParametricPlot Line

Clear[V, dx, dy, dt]; V = {3, -2}; dx := 3 dt; dy := -2 dt; line = 
      ParametricPlot[{dx, dy}, {dt, -1, 2}, 
        AxesLabel -> {"dx", "dy"}];

Show[line, Arrow[V, Red]];

3-D ParametricPlot Line

Clear[dx, dy, dz, dt]; V = {-2, 4, -1}; dx := -2 dt; dy := 4 dt; dz := -dtline = 
      ParametricPlot3D[{dx, dy, dz}, {dt, -1, 2}, 
        AxesLabel -> {"dx", "dy", "dz"}];

Show[line, Arrow[V, Red]];

Tangent Lines to 2D Curves

Following are two sample computations of the step in finding the tangent line:

1)  symbolic differentiation to find the general velocity formula  {x'[t],y'[t]}

2)  specify the point and find the specific velocity tangent  {x'[t0],y'[t0]}

3)  plot in  (dx,dy)  or change to  (x,y)  and plot, computing {x[t0],y[t0]} as needed

(dx,dy)-Coordinates

Clear[x, y, t, dx, dy, dt]; x[t_] := Cos[t]; y[t_] := Sin[t]; dx[dt_]:=x'[t] dtdy[dt_]:=y'[t] dtt = (π/6); curve = 
      ParametricPlot[{x[t + dt] - x[t], y[t + dt] - y[t]}, {dt, -π, 
          π}, PlotStyle -> {{Thickness[0.01], Blue}}, 
        Axes -> None]; line = ParametricPlot[{dx[dt], dy[dt]}, {dt, -π, π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"dx", "dy"}]; Show[line, curve];

(x,y)-Coordinates

Clear[x, y, t, a, b, u, v, dt]; x[t_] := Cos[t]; y[t_] := Sin[t]; curve = 
      ParametricPlot[{x[t], y[t]}, {t, -π, π}, 
        PlotStyle -> {{Thickness[0.01], Blue}}, 
        AxesLabel -> {"x", "y"}]; a=x'[t0];b=y'[t0];t0 = (π/6); x0 = x[t0]; y0 = y[t0]; u = x0 + dt a; v = y0 + dt b; line = ParametricPlot[{u, v}, {dt, -π, π}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"x", "y"}]; Show[curve, line];

Tangent Lines to 3D Curves

(dx,dy)-Coordinates

Clear[x, y, z, t, dx, dy, dz, dt]; x[t_] := Cos[t]; y[t_] := Sin[t]; z[t_] := Sin[2 t]; dx[dt_]:=x'[t] dtdy[dt_]:=y'[t] dtdz[dt_]:=z'[t] dtt = (π/6); curve = 
      ParametricPlot3D[{x[t + dt] - x[t], y[t + dt] - y[t], 
          z[t + dt] - z[t]}, {dt, -π, π}, Axes -> None]; line = ParametricPlot3D[{dx[dt], dy[dt], dz[dt]}, {dt, -π, 
          π}, AxesLabel -> {"dx", "dy", "dz"}]; Show[line, curve, Graphics3D[{PointSize[ .03], Point[{0, 0, 0}]}]];

(x,y,z)-coordinates

Clear[x, y, z, t, a, b, c, dt, u, v, w]; x[t_] := Cos[t]; y[t_] := Sin[t]; z[t_] := Sin[2 t]; curve = 
      ParametricPlot3D[{x[t], y[t], z[t]}, {t, -π, π}, 
        AxesLabel -> {"x", "y", "z"}, Axes -> False]; 
    a=x'[t0];b=y'[t0];c=z'[t0];t0 = (π/6); x0 = x[t0]; y0 = y[t0]; z0 = z[t0]; u = x0 + dt a; v = y0 + dt b; w = z0 + dt c; line = ParametricPlot3D[{u, v, w}, {dt, -(π/2), (π/2)}, 
        Axes -> False]; Show[curve, line, Graphics3D[{PointSize[ .03], Point[{x0, y0, z0}]}]];

Exercises

Exercise C16.5.1: Tangent to a Circle

Plot the unit 2D circle

\(x[t_] := Cos[t]; 
y[t_]\  := \ Sin[t]; \)

Compute the unit tangent to the circle at  t = π/6.

Find the equations of the tangent line at  t = π/6 and plot the circle with its tangent line and tangent vector.

Exercise C16.5.2: Tangents to a 2D Figure 8

Compute and plot the velocity and unit tangent of X[t] = {x[t],y[t]}, where
x[t_] :=  Cos[t];
y[t_] :=  Sin[t]Cos[t];

at the point where  t = π/3.

Plot the curve with its tangent line and velocity vector at   t = π/3.

Let's see some of these:

\(Clear[X, x, y, t, r, curve]; 
x[t_] := Cos[t]; 

    y[t_] := Sin[t]\ Cos[t]; 
X[t_] := {x[t], y[t]}; 

    curve[r_] := 
\ \ 
      ParametricPlot[r\ X[t], {t, \(-π\), π}, 
        AxesLabel -> {"x", "y"}, 
\ \ \ \ 
        PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}, 
        DisplayFunction -> Identity]; 

    Show[Table[curve[r], {r, 2, 8, 2}], 
      DisplayFunction -> $DisplayFunction]; \)

Exercise C16.5.3: Tangents to an Epicycloid

1)  Find the velocity of a point moving along the epicycloid

x = 4 Cos[t] + Cos[ 4 t]
	y = 4 Sin[t] + Sin[ 4 t ]

at the time  t = Pi/6.

2)  Plot the tangent line to this curve at the point where  t = Pi/6.

Exercise C16.5.4: Tangents to a 3D Wiggle

Compute and plot the velocity and unit tangent of  X = {x[t],y[t],z[t]}, where

x[t_] :=  Cos[t];
y[t_] :=  Sin[t]Cos[t];
z[t_] :=  Cos[t];

at the point where  t = π/3.

Plot the curve with its tangent line and velocity vector at   t = π/3.

Exercie C16.4.5: Zipping Around a Bagel

Parametric equations for a curve that lies on a torus of big radius  rB  and small radius  rS are given by

x[u_] := (rB + rS Cos[w u])Cos[u]
	y[u_] := (rB + rS Cos[w u])Sin[u]
	z[u_] := rS Sin[w u]

where the curve winds around the bagel  w  times.  Plot this curve and its tangent at  t= π/3 with  rB = 3, rS = 1, and w = 5.

Optional (non-regular) 
Parametrizations of Non-smooth Curves

These examples show why we only say a parametrized curve is smooth when its component functions are smooth AND the derivative vector is nonzero.

A Cusp with a Smooth Parametrization

If we take  x = t^2 and  y = t^3, we can solve for t, obtaining

t = x^(1/2)  and  t = y^(1/3)

so

x = y^(2/3)

This cuve has a cusp at  (x,y) = (0,0), even though the parametrization has a derivative at   t=0.

Clear[x,y,t,s];
x[t_] := t^2
y[t_] := t^3

{a,b} = Simplify[{x'[s],y'[s]}];
Print["X'[s] = ",{a,b}];
s = 0;
Print["X'[0] = ",{a,b}];

a=2;
ParametricPlot[{x[t],y[t]},{t,-a,a},AxesLabel->{"x","y"},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->{{0,1,2,3,4},{-2,-1,1,2}}];
a=1;
ParametricPlot[{x[t],y[t]},{t,-a,a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/2;				
ParametricPlot[{x[t],y[t]},{t,-2a,2a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/4;				
ParametricPlot[{x[t],y[t]},{t,-4a,4a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/16;			
ParametricPlot[{x[t],y[t]},{t,-16a,16a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/256;			
ParametricPlot[{x[t],y[t]},{t,-256a,256a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];

A Corner with a Smooth Parametrization

If we take  x = t^2 and  y = t |t|, we have

x = y  when  t > 0

but

x = -y  when  t < 0, in other words

y = |x|

This cuve has a right angle corner at  (x,y) = (0,0), even though the parametrization has a derivative at   t=0.

Clear[x,y,t,s];
x[t_] := t^2
y[t_] := t Sqrt[t^2];

{a,b} = Simplify[{x'[s],y'[s]}];
Print["X'[s] = ",{a,b}];
s = 0;
Print["X'[0] = ",{a,b}];

a=2;
ParametricPlot[{x[t],y[t]},{t,-a,a},AxesLabel->{"x","y"},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->{{0,1,2,3,4},{-2,-1,1,2}}];
a=1;
ParametricPlot[{x[t],y[t]},{t,-a,a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/2;				
ParametricPlot[{x[t],y[t]},{t,-2a,2a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/4;				
ParametricPlot[{x[t],y[t]},{t,-4a,4a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/16;			
ParametricPlot[{x[t],y[t]},{t,-16a,16a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];
a=1/256;			
ParametricPlot[{x[t],y[t]},{t,-256a,256a},
				PlotPoints->100,AspectRatio->1,
				PlotRange->{{0,2a},{-a,a}},Ticks->None];