5

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 &)]
]
Helium
  • 4,059
  • 24
  • 41
  • 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}]]] – Daniel Lichtblau May 03 '13 at 19:50
  • @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? – Helium May 03 '13 at 19:55
  • 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. – whuber May 03 '13 at 19:57
  • Am I wrong ?!!! – Helium May 03 '13 at 19:57
  • @whuber: My question is mostly about simplification of the resulting expression rather than checking the point lie on the same plane. – Helium May 03 '13 at 20:00
  • I think the difference comes from $MachineEpsilon. how about using Chop[%]. Chop[expr] replaces approximate real numbers in expr that are close to zero by the exact integer 0. – s.s.o May 03 '13 at 20:02
  • If you insist! But then please change the title of the question. Notice, too, that your expression does not check that six points are coplanar: it doesn't even involve two of them. If you want an effective method of checking, then the answers (and comments) in the duplicate question will serve you better. – whuber May 03 '13 at 20:02
  • 1
    I think this post can help : http://mathematica.stackexchange.com/questions/18381/most-efficient-way-to-determine-conclusively-whether-an-algebraic-number-is-zero (even though your numbers need not be algebraic) – Artes May 03 '13 at 20:21
  • @whuber It looks to me that it is checking all six. Specifically, that pts 4-6 each lie in the same plane as pts 1-3. – Daniel Lichtblau May 03 '13 at 20:52
  • 1
    `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}`

    – Daniel Lichtblau May 03 '13 at 20:55

1 Answers1

7

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.

Michael E2
  • 235,386
  • 17
  • 334
  • 747