8

I have been looking through other parametric equations questions and am still unsure where to start with this one. I am given two functions:

f[t_] = {16.2 - 7 t + t^2, 13 t - 2 t^2};
g[t_] = {26 - 13.1 t + 2 t^2, 23 - 6 t + t^2};

How do I show where these two parametric paths cross? How would I simplify these two sets? Thank you!

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Sarah Markers
  • 123
  • 1
  • 5

5 Answers5

11

If they don't need to cross at the same $t$, then you can solve

Solve[f[t1] == g[t2], {t1, t2}]

since they are polynomials. Otherwise, you might use FindRoot. This yields a set of four solutions. You can then plug these pairs of t1 and t2 back into your expressions for f and g to get the actual points where the curves cross.

march
  • 23,399
  • 2
  • 44
  • 100
7
f[t_] := {16.2 - 7 t + t^2, 13 t - 2 t^2};
g[t_] := {26 - 13.1 t + 2 t^2, 23 - 6 t + t^2};

sols = Transpose[{t, t1} /. NSolve[f@t == g@t1, {t, t1}]]
p[f_, c_] := ParametricPlot[f[t], Evaluate@{t, Sequence @@ ({Max@#, Min@#} &@sols)}, 
                            PlotRange -> All,  PlotStyle -> c]

Show[p[f, Red], p[g, Green], Graphics[{PointSize[Large], Point[f /@ sols[[1]]]}], 
     AspectRatio -> 1]

Mathematica graphics

Dr. belisarius
  • 115,881
  • 13
  • 203
  • 453
6

Attacking the problem from a different point of view:

f[t_] = {16.2 - 7 t + t^2, 13 t - 2 t^2};
g[t_] = {26 - 13.1 t + 2 t^2, 23 - 6 t + t^2};

pts = NSolve[Thread[f[t1] == g[t2]], {t1, t2}]
{{t1 -> 5.07271, t2 -> 2.30684}, {t1 -> 4.95465, t2 -> 4.146}, 
 {t1 -> 1.66574, t2 -> 4.45096}, {t1 -> 1.50689, t2 -> 1.97621}}
Show[ContourPlot[Evaluate@Thread[f[t1] == g[t2]], {t1, 0, 6}, {t2, 0, 6}, 
      FrameLabel -> Automatic], 
     Graphics[{Red, PointSize[Large], Point[{t1, t2} /. pts]}]]

Solution

Karsten7
  • 27,448
  • 5
  • 73
  • 134
5

If you are looking just to show them then you can also use RegionIntersection

r1 = ParametricRegion[f[t], {{t, 1, 6}}];
r2 = ParametricRegion[g[t], {{t, 1, 6}}];
int = RegionIntersection[r1, r2];

RegionPlot[{r1, r2, int}, Frame -> False, Axes -> True, 
 PlotRange -> {3, 25}, BoundaryStyle -> {PointSize[0.02]}]

enter image description here

Basheer Algohi
  • 19,917
  • 1
  • 31
  • 78
4

Just post as another method.

Considering the two parametric equations are polynomials,we can obtain the implicit equation by eliminate the parametric $t$.

Using the function GroebnerBasis.

f[x_, y_] := 
  Evaluate@GroebnerBasis[{x - (162/10 - 7 t + t^2), 
    y - (13 t - 2 t^2)}, {t, x, y}][[1]];
g[x_, y_] := 
  Evaluate@GroebnerBasis[{x - (26 - 131/10 t + 2 t^2), 
    y - (23 - 6 t + t^2)}, {t, x, y}][[1]]

Then plot the two curves and their cross points.

ContourPlot[{f[x, y] == 0, g[x, y] == 0}, {x, 3, 10}, {y, 12, 22}, 
 ContourStyle -> {Red, Blue}, Mesh -> {{0, 0}}, 
 MeshFunctions -> {f[#1, #2] &, g[#1, #2] &}, 
 MeshStyle -> Directive[PointSize[Large], Black]]

enter image description here

Ukiyo-E
  • 259
  • 1
  • 4
  • This is as good an excuse as any to use Gröbner bases.:) But, why not do GroebnerBasis[(* equations *), {x, y}, t]? That should explicitly eliminate the parameter. – J. M.'s missing motivation Jun 18 '15 at 08:29
  • @J. M. Hasn't this kind of question been asked before? Can you find a good duplicate to close this toward? – Mr.Wizard Jul 09 '15 at 16:17
  • @Mr. Wizard, I knew from the moment I saw this question, but I'm still having trouble with which question should it be a dupe of. – J. M.'s missing motivation Jul 09 '15 at 16:20
  • @J. M. I added my customary Related links below the Question. Please consider reviewing these and closing and retagging as appropriate. (For example I notice intersection is being used in a possibly inconsistent way.) I think we are in need of a canonical Q&A for this topic that outlines common categories of problems and solutions within this domain. Would you be willing to undertake this project? – Mr.Wizard Jul 09 '15 at 16:42
  • @Mr. Wizard, as you know, the business of solving equations is hard. ;) But, if I can get computer access in the coming weekend, I'll see what I can do. :) – J. M.'s missing motivation Jul 09 '15 at 16:48
  • @J. M. That would be great. Obviously I don't expect A Solution to Everything but rather addressing the cases and methods that come up repeatedly, and you are far more capable of that goal than I am. Thank you. – Mr.Wizard Jul 09 '15 at 16:50