1
$\begingroup$

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) 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.

  • 0
    The original word "potential" was fine; potentials are usually scalar fields. You can just either say that for gravity, $p=\frac12$, or change the exponent in the equation to $p/2$. If you don't want to do either for whatever reason, well, it doesn't really matter.2012-06-16

1 Answers 1

1

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.

  • 0
    Okay. I'll take this to mean that there probably isn't an analytical solution for the general case. I'll just keep using an L1 or L2 approximation. Thanks for the help (and putting up with my mistakes)!2012-06-16