Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 &)]
]
share|improve this question
    
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 3 '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? –  Mohsen May 3 '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 3 '13 at 19:57
1  
I think this post can help : mathematica.stackexchange.com/questions/18381/… (even though your numbers need not be algebraic) –  Artes May 3 '13 at 20:21
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 3 '13 at 20:55
show 5 more comments

1 Answer

up vote 6 down vote accepted

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.

share|improve this answer
    
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. –  Mohsen May 3 '13 at 20:30
    
@Mohsen You're welcome. I simplified it a little just now. –  Michael E2 May 3 '13 at 20:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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