1

I need to do something similar to this link down here, but i was not able to adapt it to my situation.

How to get intersection values from a parametric graph?

I have this as a "inicialization cell".

Di = 20;  (*mm*)
R = Di/2;  (*mm*)
nd = 2;
ϕ = 2*Pi/nd;
Vcor = 10;  (*m/min*)
Vava = 0.5;  (*m/min*)
Vava2 = 0.5*1000/60;  (*mm/s*)
f = N[varn /. Solve[Vcor == Pi*Di*varn/1000, varn][[1]]];  (*rpm*)
ω = 2*Pi*f/60;  (*rad/s*)
fz = varfz /. Solve[Vava == varfz*nd*f, varfz][[1]];  (*mm*)

My equations are:

xi[t_, i_] := R*Cos[-ω*t + i*ϕ]
yi[t_, i_] := Vava2*t + R*Sin[-ω*t + i*ϕ]

I want to intersect:

{ xi[t,0], yi[t,0] } == { xi[t + dt,1], yi[t + dt,1] }

I tried this:

Reduce[xi[t, 0] == xi[t + dt, 1] && yi[t, 0] == yi[t + dt, 1] &&
  0 <= t <= (2*Pi/\[Omega]) && 0 <= dt <= (2*Pi/\[Omega])
 , {t, dt}]

but it could give a result after some minutes, i assumed it was wrong.

Any help is appreciated. Thanks in advance

1 Answers1

2

If all you need is one numerical solution, I would recommend FindRoot over Reduce:

soln = FindRoot[{xi[t, 0] == xi[t + dt, 1], yi[t, 0] == yi[t + dt, 1]}, {t, 0, 2*Pi/ω}, {dt, 0, (2*Pi/ω)}]

(* {t -> 0.192988, dt -> 0.179512} *)

ParametricPlot[{{xi[t, 0], yi[t, 0]}, {xi[t, 1], yi[t, 1]}}, {t, 0, 2 π/ω}, 
  Epilog -> {Red, PointSize[Large],  Point[{xi[t, 0], yi[t, 0]} /. soln]}]

enter image description here

Note that this will only find the numerical values of one intersection point, although by tweaking the starting values you can get other intersection points as well:

FindRoot[{xi[t, 0] == xi[t + dt, 1], yi[t, 0] == yi[t + dt, 1]}, {t, Pi/ω}, {dt, -Pi/ω}]

(* {t -> 0.184004, dt -> -0.179512} *)
Michael Seifert
  • 15,208
  • 31
  • 68
  • I suspect that you will not be able to get exact solutions for this problem, since one of your curves is of the form $\alpha t + \beta \sin (\gamma t)$ and this sort of equation cannot be inverted in terms of elementary functions. (That said, there are some real Mathematica wizards on this board, and now that I've made the above claim I'm sure that one of them will view it as a challenge.) – Michael Seifert May 05 '17 at 18:58
  • Thank very much, i was going crazy with the Solve command and other things. I was going to ask precisely that. How can i find a exact solution?. The idea is to get the formula for the distance between the curves. – Diego Porto May 06 '17 at 17:26
  • @DiegoPorto: What do you mean by "the distance between the curves"?You can very easily get a curve that tells you the distance $d(t)$ between the particles' locations at any given time $t$ (or, if you prefer, time-shifted). What I'm pretty sure you won't be able to do (except in special cases) is to find an exact solution for the inverse problem: Given a particular distance $d$ between the particles, find the $t$ at which this occurs. – Michael Seifert May 06 '17 at 20:09
  • at a given t, i want the exact formula for distance between that point in {} – Diego Porto May 08 '17 at 18:05
  • Sorry for the last comment. It was incomplete. At a given t, i want the exact formula for distance between the point {xi[t,0], yi[t,0]} and the point {xi[t1,1],yi[t1,1]} at the normal direction of {xi[t,0], yi[t,0]}. – Diego Porto May 08 '17 at 18:11
  • @DiegoPorto: If I understand what you're asking for correctly, that's a different enough problem that you should ask a separate question about it. – Michael Seifert May 08 '17 at 18:19
  • Thank you again for all your help. – Diego Porto May 08 '17 at 19:38