Plotting a Parametric Curve with MATHEMATICA

Task : Plot the curve C : x = 2 - 25 t - 35 t^2 + 5 t^3 + 5 t^4, y = 3 + t^2 + 3 t^3 + t^4

1. Define the two coordinate functions . Note the use of the underscore below to define the functions . With this we can easily compute values .

f[t_] = 2 - 25 t - 35 t^2 + 5 t^3 + 5 t^4

g[t_] = 3 + t^2 + 3 t^3 + t^4

2 - 25 t - 35 t^2 + 5 t^3 + 5 t^4

3 + t^2 + 3 t^3 + t^4

f[0]

g[0]

2

3

2. By choosing an arbitrary interval (in this case [-1, 1]) for the value of the parameter t, we can quickly draw C .

ParametricPlot[{f[t], g[t]}, {t, -1, 1}]

[Graphics:HTMLFiles/LabProject1_13.gif]

-Graphics -

f '[t]

g '[t]

-25 - 70 t + 15 t^2 + 20 t^3

2 t + 9 t^2 + 4 t^3

NSolve[f '[t] == 0, t]

NSolve[g '[t] == 0, t]

{{t→ -2.12186}, {t→ -0.343442}, {t→1.7153}}

{{t→ -2.}, {t→ -0.25}, {t→0.}}

ParametricPlot[{f[t], g[t]}, {t, -3, 2}]

[Graphics:HTMLFiles/LabProject1_25.gif]

-Graphics -

deriv1[t_] = g '[t]/f '[t]

(2 t + 9 t^2 + 4 t^3)/(-25 - 70 t + 15 t^2 + 20 t^3)

deriv1 '[t]/f '[t]

(-((-70 + 30 t + 60 t^2) (2 t + 9 t^2 + 4 t^3))/(-25 - 70 t + 15 t^2 + 20 t^3)^2 + (2 + 18 t + 12 t^2)/(-25 - 70 t + 15 t^2 + 20 t^3))/(-25 - 70 t + 15 t^2 + 20 t^3)

deriv2[t] = Simplify[deriv1 '[t]/f '[t]]

-(2 (5 + 45 t + 96 t^2 + 64 t^3 + 12 t^4))/(25 (-5 - 14 t + 3 t^2 + 4 t^3)^3)

Numerator[deriv2[t_]]

deriv2[t_]

NSolve[Numerator[deriv2[t]] == 0, t]

NSolve[Denominator[deriv2[t]] == 0, t]

{{t→ -3.16946}, {t→ -1.42958}, {t→ -0.574116}, {t→ -0.160175}}

{{t→ -2.12186}, {t→ -2.12186}, {t→ -2.12186}, {t→ -0.343442}, {t→ -0.343442}, {t→ -0.343442}, {t→1.7153}, {t→1.7153}, {t→1.7153}}

6. It looks like the interval [-4, 2] should include all points where the curve changes direction and all points of inflection .

ParametricPlot[{f[t], g[t]}, {t, -4, 2}]

[Graphics:HTMLFiles/LabProject1_43.gif]

-Graphics -

7. But we may also want to include all of the x - and y - intercepts .

NSolve[f[t] == 0, t]

NSolve[g[t] == 0, t]

{{t→ -2.83109}, {t→ -0.769074}, {t→0.0726859}, {t→2.52748}}

{{t→ -2.33711}, {t→ -1.55079}, {t→0.443955 - 0.794123 }, {t→0.443955 + 0.794123 }}

ParametricPlot[{f[t], g[t]}, {t, -4, 3}]

[Graphics:HTMLFiles/LabProject1_51.gif]

-Graphics -

g[2.52748]

98.6346

ParametricPlot[{f[t], g[t]}, {t, -4, 3}, PlotRange→ {{-80, 100}, {-20, 100}}]

[Graphics:HTMLFiles/LabProject1_57.gif]

-Graphics -

9. Let ' s add some modifiers to make the final graph .   

[Graphics:HTMLFiles/LabProject1_61.gif]

[Graphics:HTMLFiles/LabProject1_64.gif]

[Graphics:HTMLFiles/LabProject1_66.gif]

speed[t_] = Sqrt[f '[t]^2 + g '[t]^2]

((2 t + 9 t^2 + 4 t^3)^2 + (-25 - 70 t + 15 t^2 + 20 t^3)^2)^(1/2)

NSolve[speed[t] == 0, t]


Created by Mathematica  (February 12, 2007) Valid XHTML 1.1!