All methods I've seen for computing planetary/stellar conjuctions (when two planets or a planet and a star appear close together in the sky because their angular separation, as measured from Earth, is small) are iterative: they look at the positions day by day and find the smallest angular separation.
EDIT (per comment): All of the constants (a1, b1, a2, b2, a3, c3) are known values. I'm trying to solve for t given these constants. There are, of course, an infinite number of solutions, so solutions for t in any given interval are fine too. Numerical solutions (where I plugin the constants as approximate numbers) are fine too, provided they are reasonably efficient (moreso than iterating).
I thought it would be easier with circular 2-dimensional orbits, so I tried this:
o[t_] = {Cos[t],Sin[t]}
o1[t_] = a1*{Cos[a2*t+a3],Sin[a2*t+a3]}
o2[t_] = b1*{Cos[b2*t+b3],Sin[b2*t+b3]}
The above are the circular 2-dimensional orbit of 3 planets, where one planet's orbit has been normalized to have radius 1, period 2*Pi, and o[0] = {1,0}.
Treating "o" as Earth, the position of "o1" as viewed from Earth at time t is "o1[t]-o[t]", and "o2[t]-o[t]" for "o2".
The angles from Earth are "Apply[ArcTan,o1[t]-o[t]]" and "Apply[ArcTan,o2[t]-o[t]]". The difference between these angles is:
Abs[Apply[ArcTan,o1[t]-o[t]]-Apply[ArcTan,o2[t]-o[t]]]
which is what I'm trying to minimize. In fact, because we're in 2 dimensions, the minimum value will be 0, so I just need to find the zeros of the function above (of course, the Abs[] becomes superfluous at this point).
I've tried several approaches, and nothing worked. Solve[] won't solve the equation for Reals and hangs when I don't give it a domain.
I've tried using dot products, and even tried solving the simpler problem of when two planets appear perpendicular (dot product is 0), to no avail.
Graphing with actual vales show there's no real pattern to the zeros of my function, or even a minimum distance between zeros.
I could try an iterative solution of some sort, but then I'm back to square one.
a
andb
variables, or is a numerical solution (for particular choices of thea
s andb
's all right? $\endgroup$FindRoot
certainly works. For instance, with{a1 = 3.6, a2 = 1.3, a3 = 1.6, b1 = .9, b2 = 2.1, b3 = 2.6}
, FindRoot[Apply[ArcTan, o1[t] - o[t]] == Apply[ArcTan, o2[t] - o[t]], {t, 0}]` yields{t -> 7.09798}
.NSolve
andReduce
, on the other hand, appear not to work here. $\endgroup$