# Find the side of an equilateral triangle given only the distance of an arbitrary point to its vertice [duplicate]

Triangle ABC is an equilateral triangle and P is an arbitrary point inside it. The distance from P to A is 4 and the distance from P to B is 6 and the distance from P to C is 5. How to find the side of an equilateral triangle from this information?

$$\frac{a^2+x^2-y^2}{2xa} = \frac{\sqrt{3}}{2}\frac{a^2+x^2-z^2}{2xa}+\frac{1}{2} \sqrt{1- \Big(\frac{a^2+x^2-z^2}{2xa}\Big)^2}$$

based from that equation where did you get that square root of 3 over 2 ....up to ...... plus one half then square root of 1 minus something and so on.. pls explain further

## marked as duplicate by Semiclassical, Omnomnomnom, J. W. Perry, TrueDefault, Claude LeiboviciSep 19 '14 at 6:45

• But in math.stackexchange.com/questions/329761/… the three distances were a Pythagorean triple, a fact that was used in the accepted answer. Here the distances are not a Pythagorean triple. – David K Sep 7 '14 at 20:09
• this explains it all – RE60K Sep 19 '14 at 4:57

Consider points on the plane $$x+y+z = K = s/\sqrt{2}$$ where $s$ is the side of the equilateral triangle with vertices at $(K,0,0), (0,K,0), (0,0,K)$.
If $X, Y, Z$ are the distances between P on the plane and these vertices, then $$X^2 = (K-x)^2 + y^2 + z^2 \\Y^2 = x^2 + (K-y)^2 + z^2 \\Z^2 = x^2 + y^2 + (K-z)^2$$ which after some strenuous manipulation yields
$$s^2 = 2K^2 = \tfrac{1}{2}\left( X^2 + Y^2 + Z^2 \pm \sqrt{3\left((X^2 + Y^2 + Z^2)^2 -2( X^4 + Y^4 + Z^4))\right)}\right)$$