Prove that $\overrightarrow{GH}.\overrightarrow{IJ}=-2x^2+8x-2$ in a regular hexagon We know that the hexagon is regular and:
$\overline{AB}=1$;
$\overline{AG}=\overline{CI}=\overline{DH}=\overline{FJ}=x$;

How would you prove that $\overrightarrow{GH}.\overrightarrow{IJ}=-2x^2+8x-2$?
 A: $\qquad\qquad\qquad$
Consider $\triangle{GAK}$ where $K$ is the intersection point between $GH$ and $IJ$. ($K$ is the center of the hexagon.) Since $GA=x,AK=1,\angle{GAK}=60^\circ$, by the law of cosines, we have
$$GK=\sqrt{x^2+1^2-2\cdot x\cdot 1\cos(60^\circ)}=\sqrt{x^2-x+1}$$
Here, note that $GK=HK=IK=JK$.
Also, consider an isosceles triangle $BIG$ where $BG=BI=1-x,\angle{GBI}=120^\circ$. So, we have $GI=\sqrt 3(1-x)$.
Hence, applying the law of cosines to $\triangle{GIK}$, we have
$$\cos\angle{GKI}=\frac{KI^2+KG^2-IG^2}{2\cdot KI\cdot KG}=\frac{2(x^2-x+1)-3(1-x)^2}{2(x^2-x+1)}$$
Thus, we have
$$\vec{GH}\cdot\vec{IJ}=|\vec{GH}|\times |\vec{IJ}|\times \cos\angle{GKI}$$$$=4(x^2-x+1)\cdot\frac{2(x^2-x+1)-3(1-x)^2}{2(x^2-x+1)}=-2x^2+8x-2.$$
A: Hint: Maybe a last resort, but the coordinates of all six vertices can be found explicitly, assuming say $D$ at $(0,0)$ and $E$ at $(1,0).$ Then parametric equations for the sides containg $I,J,G,H$ can be found, using $x$ as the parameter measured from the appropriate vertex. This done, one has the coordinates of $I,J,G,H$ all in terms of $x$ and can proceed to find the desired dot product.
[It may get messy, to say the least..., hopefully someone can find a more intrinsic method to get the dot product without all the coordinates being found.]
Added later
A method using the complex plane works well. Let $r=(1/2)+i\sqrt{3}/2$ be the first 6th root of 1 after $1$ going around counterclockwise. In the diagram let $A=1,B=r,C=r^2,D=r^3,E=r^4,F=r^5.$ Then the point $G$ is at $1+x(r-1)$ and $H$ is diametrically opposite that so $H=-G.$ Also the point $I$ is at $r^2+x(r-r^2),$ with $J=-I$ diametrically opposite. To get the vectors we use $GH=H-G=-2G,$ and $IJ=J-I=-2I.$ Then the desired dot product is, since the minus signs cancel and the $2$'s multiply, $4$ times the quantity
$$(1-x/2)(x-1/2)+x(\sqrt{3}/2))(\sqrt{3}/2),$$
which is the desired $-2x^2+8x-2.$
