Examples for Section 9.5
Calculus with Parameterized Curves

p. 749

3.

Find the equation of the line tangent to x  =  4 sin(t), y  =  2 cos(t) at the point corresponding to t = π/4.

Solution.  The slope is \(TraditionalForm
      \`\(d\ y\)\/\(d\ x\) = 
        \(\(\ d\ y/d\ t\)\/\(d\ x/d\ t\) = \ 
          \(\(-2\)\ sin \((t)\)\)\/\(4 \( cos(t)\)\)\)\). When t = π/4, \(TraditionalForm
      \`\(d\ y\)\/\(d\ x\) = 
        \(\(\(-2\)\ \(sin(π/4)\)\)\/\(4 \( cos(π/4)\)\)\  = \ 
          \(-\(1\/2\)\)\)\).  The point corresponding to t = π/4is x  =  4  sin(π/4)  =  2 (Sqrt[ 2]), y  = 2  cos(π/4) = (Sqrt[2]) , so the tangent line is  y - (Sqrt[2]) = -(1/2) (x - 2 (Sqrt[ 2])) , or y  = -(1/2) x + 2 (Sqrt[ 2]) .

c = 
      ParametricPlot[{4  Sin[t], 2  Cos[t]}, {t, 0, 2  π}, 
        AspectRatio -> Automatic]

p  =  Plot[-(1/2) x + 2 (Sqrt[ 2]), {x, -1, 5}]

Show[c, p]

17.

Find the length of the curve x  =  cos(t), y  =  t + sin(t), 0 ≤ t ≤ π.

Solution. The length is given by the formula \(TraditionalForm
      \`L = \(∫\_0
              \%π\(\@\(\((\(d\ x\)\/\(d\ t\))\)\^2 + 
                    \((\(d\ y\)\/\(d\ t\))\)\^2\)\) d\ t = 
          \(∫\_0
                \%π\(\@\(\((\(-\(sin(t)\)\))\)\^2 + 
                      \((1 + cos(t))\)\^2\)\) d\ t = 
            \(∫\_0\%π\@\( 2 + 2 \( cos(t)\)\)\ d\ t = 
              \(\(\@2\) 
                  \(∫\_0\%π\@\( 1 + cos(t)\)\ 
                      \@\(1 - cos(t)\)\/\@\(1 - cos(t)\)\ d\ t\)\  = 
                \(\(\@2\) 
                    \(∫\_0\%π\ 
                      \@\(1 - \(cos\^2\)(t)\)\/\@\(1 - cos(t)\)\ d\ t\) = 
                  \(\(\@2\) 
                      \(∫\_0\%π\ 
                        \(sin(t)\)\/\@\(1 - cos(t)\)\ d\ t\) = 
                    \(\(\@2\) 
                        \(∫\_0\%2\( u\^\(\(-1\)/2\)\) du\)\  = \ 
                      \(\(\(\@2\) 2  u\^\(1/2\)\( | \_0\%2\)\) = \ 4
                        \)\)\)\)\)\)\)\)\)

( u  =  1 - cos(t), d u  =  sin(t) d t)

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

(Sqrt[x'[t]^2 + y'[t]^2])

Simplify[%]

(∫_0^π)(Sqrt[ x'[t]^2 + y'[t]^2]) 
        \[DifferentialD]t

p = 
      ParametricPlot[{x[t], y[t]}, {t, 0, π}, 
        AspectRatio -> Automatic]

31.

Find the centroid of the curve x  =  cos(t), y  =  t  +  sin(t), 0 ≤ t ≤ π.

Solution. The length of the curve is L = 4, by the preceding problem 17. The coordinates of the centroid are the weighted averages of x and y:
\(x\&_ = \)(1/L)(∫_0^π) x 
                (Sqrt[(((((d x)/(d t))))^2) + 
                      (((((d y)/(d t))))^2)]) d t= (1/4) 
              (∫_0^π) 
                cos(t) (Sqrt[2 + 2  cos(t)]) d t = 
            ((Sqrt[2])/4) 
              (∫_0^π) 
                ((cos(t) sin(t))/(Sqrt[1 - cos(t)])) d t
Substitute u = 1 - cos(t), d u  =  sin(t) d t, cos(t)  =  1 - u:
\(TraditionalForm
      \`x\&_ = \(\(\@2\/4\) 
            \(∫\_0\%2\ \((1 - u)\)\/\@\(u)\)\ d\ u\) = 
          \(\(\(\@2\/4\) 
                \((2  u\^\(1/2\) - \(2\/3\) u\^\(3/2\))\)\( | \_0\%2\)\) = 
            \(1 - 2\/3 = 1\/3\)\)\)\).
\(y\&_ = \)(1/L)(∫_0^π) y 
                (Sqrt[(((((d x)/(d t))))^2) + 
                      (((((d y)/(d t))))^2)]) d t= (1/4) 
              (∫_0^π)(t + sin(t)) 
                  (Sqrt[2 + 2  cos(t)]) d t =  
            ((Sqrt[2])/4) 
                (∫_0^π) t (Sqrt[ 1 + cos(t)]) d t +  
              ((Sqrt[2])/4) 
                (∫_0^π) sin(t) (Sqrt[1 + cos(t)]) d t
                    
The first integral can be done with integration by parts (u = t, d v  =  (Sqrt[1 + cos(t)]);  use the fact discovered in the previous problem that  \(TraditionalForm
      \`v = \(∫\@\(1 + cos(t)\)\ d\ t = \ 
          2 \@\( 1 - cos(t)\)\)\)), and the second is an easy substitution. The final answer is 
\(TraditionalForm
      \`y\&_ = \(\(\(\@2\/4\) 
              \((2  t \@\( 1 - cos(t)\)\  + \ 4 \@\( 1 + cos(t)\) - 
                  \(2\/3\) \((\@\(1 + cos(t)\))\)\^\(3/2\))\)\( | \_0
                \%π\)\) = \ π - 4\/3\)\). 
It is much easier to let Mathematica take care of the details:

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

L = 
      (∫_0^π)(Sqrt[ x'[t]^2 + y'[t]^2]) 
          \[DifferentialD]t

xbar = 
      (1/L) (∫_0^π) x[t] 
            (Sqrt[x'[t]^2 + y'[t]^2]) \[DifferentialD]t

ybar  =  
      (1/L) (∫_0^π) y[t] 
              (Sqrt[x'[t]^2 + y'[t]^2]) \[DifferentialD]t  // 
        Simplify

From the previous problem we have the plot of the curve stored in p. We now combine this plot with the centroid. Notice that the centroid does not lie on the curve.

Show[p, Graphics[{PointSize[0.05], Point[{xbar, ybar}]}]]

23.

(Modified) Find the area of the surface generated by rotating the curve x  =  cos(t), y  =  t  +  sin(t), 0 ≤ t ≤ π, around the x-axis.

Solution.
Here is what the surface looks like:

ParametricPlot3D[{x[t], Cos[u] y[t], Sin[u] y[t]}, {t, 0, π}, {u, 
        0, 2  π}, AspectRatio -> Automatic]

The formula is \(TraditionalForm
      \`\(A\  = 
        ∫\_0\%π 2  π\ y 
            \(\@\(\((\(d\ x\)\/\(d\ t\))\)\^2 + 
                  \((\(d\ y\)\/\(d\ t\))\)\^2\)\) d\ t\ \)\). The text fails to mention that this integral equals \(TraditionalForm\`2  π\ y\&_\ L\)  which is the the surface area of a cylinder whose radius is the average y-coordinate of the curve (\(TraditionalForm\`y\&_\)) and whose height is the length of the curve (L). We computed \(TraditionalForm\`y\&_ = π - 4\/3\)in the previous problem 31, and L = 4 in problem 17.  Therefore, the area is \(TraditionalForm
      \`A\  = \ \(2 \( π(π - 4\/3)\) \((4)\) = 
          8  π\^2 - \(32\/3\) π\)\).

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

A  = 
      (∫_0^π) 2  π y[t] 
          (Sqrt[x'[t]^2 + y'[t]^2]) \[DifferentialD]t

54.

a) Plot the curve x = (e^t) + sin(2  t), y = (e^t) + cos((t^2)), -π ≤ t ≤ π/4.

x[t_] :=  (E^t) + Sin[2  t];  y[t_] :=  (E^t) + Cos[(t^2)];

p = 
      ParametricPlot[{x[t], y[t]}, {t, -π, π/4}, 
        AspectRatio -> Automatic, PlotStyle -> RGBColor[1, 0, 0]]

b) Find d y/d x and (d^2) y/d (x^2) at (Subscript[t, 0]) = -π/4.

\(yp[t_] := \(y'\)[t]/\(x'\)[t]; 
yp[t]\)

m  =  yp[-π/4] // Simplify

N[m]

\(ypp[t_]\  := \ \(yp'\)[t]/\(x'\)[t] // Simplify; 
ypp[t]\)

ypp[-π/4] // Simplify

N[%]

c) Find the equation of the tangent line at (Subscript[t, 0]) = -π/4.

The slope was found in part b): m = 2.99294. The point on the curve corresponding to (Subscript[t, 0]) = -π/4 is \(TraditionalForm
      \`\((a, b)\) = \((e\^\(\(-π\)/4\) + sin(\(-π\)/2), \)\)(e^(-π/4)) + cos((π^2)/16))

a = N[x[-π/4]]b = N[y[-π/4]]

The equation of the tangent line is: y - b = m(x - a).

y ==  b  +  m (x - a) // Simplify

tl =  
      Plot[b  +  m (x - a), {x, -2, 2}, 
        PlotStyle -> RGBColor[0, 0, 1]]

Show[p, tl]

d) Find the length of the curve.

L  =  
      NIntegrate[(Sqrt[x'[t]^2 + y'[t]^2]), {t, -π, π/4}]