A point inside a regular heptagon Let $P_1P_2⋯P_7$ be a regular heptagon inscribed in a unit circle. Let $O$ be the center of the circle, and let $P$ be a point such that $OP=1/3$. Then find the sum
$$\sum\limits_{i=1}^7PP_i^2$$ How do I find the distance in the triangle $OPP_1$( I don't know the angle, nor the second side)
 A: You can approach this by using complex numbers.  Let $P_k$ be represented by the complex number
$$z_k=e^{2k\pi i/7}\ ,$$
and let $P$ be given by
$$w=\frac13e^{i\theta}\ .$$
Then
$$\eqalign{\sum_{k=1}^7 PP_k^2
  &=\sum_{k=1}^7 |z_k-w|^2\cr
  &=\sum_{k=1}^7 (z_k\overline{z_k}-z_k\overline{w}-w\overline{z_k}
    +w\overline w)\cr
  &=7-\overline w\Bigl(\sum_{k=1}^7z_k\Bigr)
    -w\Bigl(\sum_{k=1}^7\overline{z_k}\Bigr)+\frac79\cr
  &=\frac{70}{9}\ ,\cr}$$
since both the sums are zero.
Alternative, not using complex methods.  Place $P_7$ on the $x$ axis, that is, at $(1,0)$, and then $P_1,P_2,\ldots$ in anticlockwise order around the circle.  Let $\theta$ be the angle between $OP$ and the $x$ axis.  Drawing a diagram, you can see that the angle $POP_k$ is $(2k\pi/7)-\theta$.  By the cosine rule,
$$PP_k^2=1+\frac19-\frac29\cos\Bigl(\frac{2k\pi}7-\theta\Bigr)\ .$$
Now adding up all the constant terms is easy.  To see how to add up all the cosine terms (without using complex numbers), see my answer here - this is a sum of sine terms, but you can use similar methods.
