# Eliminating the Parameter: Transform parametric equation to Cartesian equation and draw arrows along parametric growth

Hey guys I really could use some help on this calc 3 problem. I'm stuck on how to write the code for this problem:

• a) Eliminate the parameter to find a Cartesian equation for a parametric curve.
• b) Sketch the curve and indicate with an arrow the direction in which the curve is traced as the parameter increases.

Given: $x=1-t^2$, $y=t-2$

{x == 1 - t^2, y == t - 2}


I'm not sure really where to start. Thanks for the help!

• Welcome to Mathematica.SE, please consider taking the tour so you understand how does the site work. Is this a Mathematics or a Mathematica question? Did you even try to search in the documentation? – rhermans Oct 7 '14 at 21:37
• You mean something like x=1-t^2=1-(y+2)^2? – Daniel Lichtblau Oct 7 '14 at 22:07

Start by using Eliminate to remove the parametric variable

Eliminate[{x == 1 - t^2, y == t - 2}, t]


-3 - 4 y - y^2 == x

Now you can Solve to get an expression of the form $y(x) = -2 \mp \sqrt{1 - x}$

sol = (y /. Solve[-3 - 4 y - y^2 == x, y])


{-2 - Sqrt[1 - x], -2 + Sqrt[1 - x]}

To sketch you will need to know where it crosses the axis

sol /. x -> 0


{-3, -1}

That is, it crosses at {{0, -3}, {0, -1}, {-3, 0}}. With which slopes?

D[sol, x]

{1/(2 Sqrt[1 - x]), -(1/(2 Sqrt[1 - x]))}


Slopes are {1/2, -1/2, -1/4} respectively.

Now the plot with arrows growing in the same direction as $\hat{y}$, i.e up, to the right for $t < -1$ and to the left for $t > 1$

Plot[
sol,
{x, -9, 2},
PlotStyle -> Black
, Frame -> True
, Prolog -> {Blue,
Arrow[Partition[
Transpose[{1 - t^2, t - 2} /. t -> Range[-5, 5, 0.5]], 2, 1]]}
, Epilog -> {PointSize[Large], Red,
Point[{{0, -3}, {0, -1}, {-3, 0}}]}
]


• im still having errors in my code. My solve function seems to not be working. Any ideas on why? – Quentin Oct 7 '14 at 22:18
• @Quentin, I can only guess if you don't share your code. People do an effort to help you, do your part. Please edit your question to improve it, make it worthwhile an up vote. Particularly, include a minimum example of the code you are working on that shows the problem. – rhermans Oct 7 '14 at 22:46

I think you might be looking for this.

eqs = {x == 1 - t^2, y == -2 t - 2};
eq1 = Eliminate[eqs, t]


(-4 - y) y == 4 x

ContourPlot[Evaluate@eq1, {x, -20, 2}, {y, -12, 12}]


eq2 = {x, y} /. (And @@ eqs // ToRules)


{1 - t^2, -2 - 2 t}

fig = ParametricPlot[eq2, {t, -5, 5},
MeshStyle -> Directive[Opacity[0.5], Red],
Mesh -> True];
fig /. Line[l_] -> {
Arrowheads[Table[0.1, {i, 0, 1, .2}]], Arrow[l]}


Or you can use this method that got a hint by @rhermans using Epilog

ParametricPlot[eq2, {t, -5, 5}, MeshStyle -> Red, Mesh -> True,
Epilog -> Arrow@Partition[Table[eq2, {t, -5, 5, 0.5}], 2]]


• Are your arrows the wrong direction or mine? – rhermans Oct 7 '14 at 22:04
• @rhermans you just use different equations, I used {x == 1 - t^2, y == -2 t - 2}; – Junho Lee Oct 7 '14 at 22:27