TITLE: Area of a hexagon from the distances of the opposite sides
QUESTION [8 upvotes]: Problem. All the six sides of the hexagon in the attached figure have equal length, and the opposite sides are parallel. The distances of the three opposite pairs are $d_1=7\mathrm{cm}$, $d_2=8\mathrm{cm}$ and $d_3=9\mathrm{cm}$, respectively. Find the area of the hexagon.
Clearly, 
$$
\text{Area}=\frac{1}{2}x(d_1+d_2+d_3),
$$ 
where $x$ is the length of each of the sides. Hence, it suffices to find $x$ as a function of $d_1,d_2$ and $d_3$.
EDIT. The area in the particular case $d_1=7\mathrm{cm}$, $d_2=8\mathrm{cm}$ and $d_3=9\mathrm{cm}$ is provided in the answer of Jack D'Aurizio that follows. I was wondering whether it is possible to obtain an expression the area of the hexagon as a function of $d_1,d_2$ and $d_3$.

REPLY [2 votes]: We can derive the same general solution with an approach using some trigonometry.  I handled the consequent algebra manually. The idea is to write $A$ the area of hexagon in terms of the values of the angles and $s$ the side length of the hexagon, and then writing everything in terms of $A$.

Due to the parallel lines, Interior angle at $N = ∠ONQ +∠MNQ =∠RQN +∠PQN =$ Interior angle at $Q$.  The same applies to the other two pairs of interior opposite angles. Hence we have 3 pairs of equal angles, whose values we’ll call $\alpha,\beta,\xi$ , as colour-marked in the figure.
Now the Sum of interior angles in a hexagon $= 6\times180°-360° = 720°=4π= 2\left(\alpha+\beta+\xi\right)$. Thus:
$\beta=(\pi-\alpha)+(\pi-\xi) \tag{1} $
Geometrically, $\beta=\angle ZPO+\angle ZPQ\ =\ \angle POI+\angle PQJ\ =(\pi-\xi)+(\pi-\alpha) , where \ ZP:\parallel NO \ and \ RQ\  $.
Now $NR$ and $OQ$ divides the hexagon into a quadrilateral and 2 triangles. Since $NO$ is parallel to and is the same length as $RQ$, $RQ$ is a mere translation of $NO$, thus $NR\parallel OQ$ and $NOQR$ is a parallelogram. The Area of $NOQR = d_1s$.
$\triangle MNR$ and $\triangle POQ$ are both isosceles with $s$ as two of their side lengths and $\beta$ as the angle between the same two sides. If the base of $\triangle MNR = MR =\ s$, then the corresponding height $= NG = s\sin{\beta}$.  Thus the Area of $\triangle MNR =\triangle POQ=\ \frac{s^2\sin{\beta}}{2}$.
We can similarly divide the hexagon using $\alpha$ or $\xi$ as the angle of the isosceles triangles, ie the hexagon can be divided likewise in 3 ways (as shown by the blue, yellow and orange lines). Thus:
$A=d_1s+s^2\sin{\beta} \tag{2}$
$A=d_2s+s^2\sin{\xi} \tag{3}$
$A=d_3s+s^2\sin{\alpha} \tag{4}$
Consider $ A\ \mathrm{\mathrm{=}}\frac{1}{2}s\left(d_1+d_2+d_3\right)$.  For simplicity in the algebra that follows, let’s define $k:$
$$k\ =\ \frac{d_1+d_2+d_3}{2}=\ \frac{A}{s} \ \rightarrow \ s=\frac{A}{k} \tag{5}$$
Substitute (1) into (2), expand using the trigonometric angle-sum identity and simplify:
\begin{align}
A &=d_1s+s^2\sin{\left[(\pi-\alpha)+(\pi-\xi)\right]}\\  
 &=d_1s+s^2\left[\sin{(\pi-\alpha)}\cos{(\pi-\xi)}+\cos{(\pi-\alpha)}\sin{(\pi-\xi)}\right]\\  
&=d_1s+s^2(-\sin{\alpha}\cos{\xi}-\ \cos{\alpha}\sin{\xi})\\  
\end{align}
$A=d_1s-s^2\sin{\alpha}\cos{\xi}-s^2\cos{\alpha}\sin{\xi} \tag{6}$
Rearranging (3) gives $\sin{\xi}=\frac{A-d_2s}{s^2}$. Substituting (5) gives:
$$ \sin{\xi}=\left(A-\frac{d_2A}{k}\right)\left(\frac{k^2}{A^2}\right)=\frac{k(k-d_2)}{A} \tag{7}$$
Thus
$$\cos^2{\xi}=1-\frac{k^2{(k-d_2)}^2}{A^2} \tag{8}$$
Similarly,
$$\sin{\alpha}=\frac{k(k-d_3)}{A} \tag{9}$$
$$\cos^2{\alpha}=1-\frac{k^2{(k-d_3)}^2}{A^2} \tag{10}$$
Thus every term in (6) can be written in terms of $A$. So it's a matter of substituting and solving for $A$.
Substituting (5), (7) and (9) into (6) and simplifying, we can re-write (6):
$$A=\frac{d_1A}{k}-\frac{A(k-d_3)}{k}\cos{\xi}-\frac{A(k-d_2)}{k}\cos{\alpha}$$
Multiplying both sides by $\frac{k}{A}$ and rearranging:
$$-(k-d_2)\cos{\alpha}=(k-d_1)+(k-d_3)\cos{\xi}$$
Squaring both sides and substituting (8) and (10) give:
$${(k-d_2)}^2\left(1-\frac{k^2\left(k-d_3\right)^2}{A^2}\right)={(k-d_1)}^2+{(k-d_3)}^2\left(1-\frac{k^2\left(k-d_2\right)^2}{A^2}\right)+2(k-d_1)(k-d_3)\cos{\xi}$$
Expanding the brackets on both sides would eliminate the fraction terms on both sides, so the following remains:
$${(k-d_2)}^2={(k-d_1)}^2+{(k-d_3)}^2+2(k-d_1)(k-d_3)\cos{\xi}$$
Rearranging:
$$-2(k-d_1)(k-d_3)\cos{\xi}={(k-d_1)}^2+{(k-d_3)}^2-{(k-d_2)}^2$$
Squaring both sides then substituting in (8) give:
$$4{(k-d_1)}^2{(k-d_3)}^2-\frac{4{k^2(k-d_1)}^2{(k-d_3)}^2{(k-d_2)}^2}{A^2}=\left[{(k-d_1)}^2+{(k-d_3)}^2-{(k-d_2)}^2\right]^2$$
Thus:
$$A^2=\frac{4{k^2(k-d_1)}^2{(k-d_3)}^2{(k-d_2)}^2}{4{(k-d_1)}^2{(k-d_3)}^2-\left[{(k-d_1)}^2+{(k-d_3)}^2-{(k-d_2)}^2\right]^2}\tag{11}$$
assuming the denominator $>0$.
We could take the positive square root and stop here, and the equation is not too onerous. Or we could continue to write out using $d_i$ only without $k$, by simplifying then substituting $k=\ \frac{d_1+d_2+d_3}{2}$.
The denominator is a difference of two squares:
Denominator
\begin{align}  
& = \left[2\left(k-d_1\right)\left(k-d_3\right)\right]^2 -[\left(k-d_1\right)^2+\left(k-d_3\right)^2-{(k-d_2)}^2]^2 \\  
& = [2\left(k-d_1\right)\left(k-d_3\right)+\left(k-d_1\right)^2+\left(k-d_3\right)^2-{(k-d_2)}^2][-2\left(k-d_1\right)\left(k-d_3\right)+\left(k-d_1\right)^2+\left(k-d_3\right)^2-{(k-d_2)}^2]\times-1 \\  
& =-\left[{(k-d_1+k-d_3)}^2-{(k-d_2)}^2\right]\left[\left(\left(k-d_1\right)-\left(k-d_3\right)\right)^2-{(k-d_2)}^2\right] 
\end{align}
Since $k=\ \frac{d_1+d_2+d_3}{2},\  2k-d_1-d_3=d_2\ $. So:
Denominator $=-\left[{d_2}^2-{(k-d_2)}^2\right]\left[\left(d_3-d_1\right)^2-{(k-d_2)}^2\right]$
Factorise each difference of two squares and simplify to give:
Denominator $=k\left(k-2d_2\right)\left(d_3-d_1-d_2+k\right)\left(d_3-d_1+d_2-k\right)$
At this point we substitute $k=\ \frac{d_1+d_2+d_3}{2}$ and simplify to give:
Denominator
$$ = \frac{d_1+d_2+d_3}{2}\cdot\ \frac{d_1-3d_2+d_3}{2}\cdot\frac{-d_1-d_2+3d_3}{2}\cdot\frac{{-3d}_1+d_2+d_3}{2} \tag{12} $$
Substituting (5) into the numerator and (12) into the denominator of (11), and simplifying give:
$$A^2=\frac{\left(d_1+d_2+d_3\right)^2\left(-d_1+d_2+d_3\right)^2\left(d_1-d_2+d_3\right)^2\left(d_1+d_2-d_3\right)^2}{4\left(d_1+d_2+d_3\right)\left(3d_1-d_2-d_3\right)\left({-d}_1+{3d}_2-d_3\right)\left({-d}_1-d_2+3d_3\right)}$$
Thus, taking the positive square root:
$$\fbox{$A=\frac{\left(-d_1+d_2+d_3\right)\left(d_1+d_2-d_3\right)\left(d_1-d_2+d_3\right)\sqrt{d_1+d_2+d_3}}{2\sqrt{\left(3d_1-d_2-d_3\right)\left(3d_2-d_3-d_1\right)\left(3d_3-d_1-d_2\right)}}.$}$$
The square root of (11) provides an alternate form of this solution.