Invert "Gravitational" Force Function or Solve an Intersection

138 Views Asked by At

Recall "gravitational"-type force functions, by which I mean anything of the form:

$f(x,y,z) = \frac{k}{((x-x_0)^2+(y-y_0)^2+(z-z_0)^2)^p}, p\in\Re_{>0}, k\in\Re, (x,y,z) \neq(x_0,y_0,z_0)$
(e.g., for gravity, $p=1,k=G m_1 m_2$)

Define a function $g(x,y,z) = f_1(x,y,z) + f_2(x,y,z) + f_3(x,y,z) +\cdots+f_n(x,y,z)$ (a sum of several force functions, presumably each with different $k$ (though probably not $p$).

I have two points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ such that $g(x_1,y_1,z_1)<a$ and $g(x_2,y_2,z_2)>a$. My problem is to find the location $(x_3,y_3,z_3)$ such that $g(x_3,y_3,z_3)=a$ where $(x_3,y_3,z_3)$ lies on the straight line between $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$. If it helps, I know that exactly two of the xs, ys, and zs are equal.

I'm currently solving this numerically, but it will eventually be solved on an OpenCL kernel where I would very much like a closed form solution.

However, I am having trouble getting such a solution. I'm not even sure it's possible. I tried inverting $g$, but got basically nowhere. Ideas? Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

Let us consider an extremely simplified version of the problem: $p=1$ and just two terms centered at $(0,\bar y_1,0)$ and $(\bar x_2,\bar y_2,0)$, with the line on which the unknown point lies being $y_1 = y_2 = 0$ and $z_1 = z_2 = 0$. Then you want to solve the equation $$\frac{k_1}{x^2+\bar y_1^2} + \frac{k_2}{(x-\bar x_2)^2+\bar y_2^2} = a,$$ which expands to the fourth-degree polynomial equation in $x$, $$k_1\big((x-\bar x_2)^2+\bar y_2^2\big) + k_2\big(x^2+\bar y_1^2\big) = a\big(x^2+\bar y_1^2\big)\big((x-\bar x_2)^2+\bar y_2^2\big).$$ Mathematica finds an analytical solution that I cannot reproduce here because its $\LaTeX$ code has 11887 characters in it. If you have more than two terms, of course, you'll get a polynomial equation of degree greater than five, and those are known to have no analytical solutions in general.