2
$\begingroup$

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!

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – rhermans Oct 7 '14 at 21:37
  • $\begingroup$ You mean something like x=1-t^2=1-(y+2)^2? $\endgroup$ – Daniel Lichtblau Oct 7 '14 at 22:07
2
$\begingroup$

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}}]}
 ]

Mathematica graphics

$\endgroup$
  • $\begingroup$ im still having errors in my code. My solve function seems to not be working. Any ideas on why? $\endgroup$ – Quentin Oct 7 '14 at 22:18
  • $\begingroup$ @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. $\endgroup$ – rhermans Oct 7 '14 at 22:46
3
$\begingroup$

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}]

Blockquote

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]}

Blockquote

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]]

Blockquote

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.