4
$\begingroup$

I have 6 points in $\mathbb R^3$ as follows:

points = {
    {Log[1 + a/n], Log[1 + b/(a + n)], Log[1 + c/(a + b + n)]}, 
    {Log[1 + a/n], Log[1 + b/(a + c + n)], Log[1 + c/(a + n)]}, 
    {Log[1 + a/(b + n)], Log[1 + b/n], Log[1 + c/(a + b + n)]}, 
    {Log[1 + a/(b + c + n)], Log[1 + b/n], Log[1 + c/(b + n)]}, 
    {Log[1 + a/(c + n)], Log[1 + b/(a + c + n)], Log[1 + c/n]},
    {Log[1 + a/(b + c + n)], Log[1 + b/(c + n)], Log[1 + c/n]}
}

where $a$, $b$, $c$ and $n$ are all positive numbers. I want to test if they all lie on the same plane. We know that if $P,Q,R$ and $S$ are on the same plane, then $\overrightarrow{PS} \cdot (\overrightarrow{PR} \times \overrightarrow{PQ}) = 0$. The issue is than I cannot simplify the following expression:

FullSimplify[
    (points[[1]] - points[[6]]).CrossProduct[points[[2]] - points[[6]], points[[3]] - points[[6]]], 
     a > 0 && b > 0 && c > 0 && n > 0
]

to zero. While numerical evaluation of the same expression (for any value of $a, b, c$ and $n$) results in numbers very close to zero.

Table[
   (points[[i]] - points[[1]]).CrossProduct[points[[2]] - points[[1]], points[[3]] - points[[1]]],
   {i, 4, 6}
] /. {a -> 10, b -> 11, c -> 13, n -> 1} // N

(* Output: {-2.22045*10^-16, -2.22045*10^-16, -4.44089*10^-16} *)

That's why I guess they must lie on the same plane. How can I simplify the expression?

Edit:

Thanks to Michael E2's answer, I was able to solve a more general form of the problem for more than 6 points. Here is a related question I asked on math.SE. I used the following piece of code to generate the points and verify my guess:

m[X_, P_] := Table[Log[1 + X[[i]]/(1 + Sum[If[P[[j]] < P[[i]], X[[j]], 0], {j, Length[X]}])], {i, Length[X]}];
With[{n = 3},
   points = m[Subscript[x, #] & /@ Range[n], #] & /@ Permutations[Range[n]];
   MatrixRank[Simplify[# - points[[1]] & /@ points, And @@ (Subscript[x, #] & /@ Range[n])], ZeroTest -> (Expand@PowerExpand@# == 0 &)]
]
$\endgroup$
  • $\begingroup$ Expand after PowerExpand: Expand[PowerExpand[ Table[(points[[i]] - points[[1]]).Cross[points[[2]] - points[[1]], points[[3]] - points[[1]]] /. {a -> 10, b -> 11, c -> 13, n -> 1}, {i, 4, 6}]]] $\endgroup$ – Daniel Lichtblau May 3 '13 at 19:50
  • $\begingroup$ @DanielLichtblau: Thanks Daniel, this looks wonderful to me. But it solves the problem with the numerical approach. What if /. {a -> 10, b -> 11, c -> 13, n -> 1} is removed? $\endgroup$ – Helium May 3 '13 at 19:55
  • $\begingroup$ possible duplicate of How to check if a 3D point is in a planar polygon?: the solution to that one requires an initial check that answers the present question. $\endgroup$ – whuber May 3 '13 at 19:57
  • 1
    $\begingroup$ I think this post can help : mathematica.stackexchange.com/questions/18381/… (even though your numbers need not be algebraic) $\endgroup$ – Artes May 3 '13 at 20:21
  • 1
    $\begingroup$ In[394]:= Assuming[{a > 0, b > 0, c > 0, n > 0}, PowerExpand[ Simplify[Table[(points[[i]] - points[[1]]).Cross[ points[[2]] - points[[1]], points[[3]] - points[[1]]], {i, 4, 6}]]]] Out[394]= {0, 0, 0} $\endgroup$ – Daniel Lichtblau May 3 '13 at 20:55
7
$\begingroup$

Well, I had worked out an answer to the question of how to tell if the six points were coplanar:

MatrixRank[
 Simplify[# - points[[1]] & /@ points, a > 0 && b > 0 && c > 0 && n > 0], 
 ZeroTest -> (Expand@PowerExpand@# == 0 &)]
  (* 2 *)

So they are coplanar. But now the question has changed somewhat, perhaps.

$\endgroup$
  • $\begingroup$ That's great Michael. It actually is what I was looking for. I changed the title because my question is warned to be closed as a duplicate. $\endgroup$ – Helium May 3 '13 at 20:30
  • $\begingroup$ @Mohsen You're welcome. I simplified it a little just now. $\endgroup$ – Michael E2 May 3 '13 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.