# 3. Hexagon.nb

```Putnam 1967 B1
&quot;A convex hexagon is inscribed in a circle. The length of every other edge equals the radius of the circle. Prove that the triangle
formed by the midpoints of the remaining three edges is equilateral.&quot;
 Create a figure conforming to the conditions of the problem.
Merely describe the sequence of angles counterclockwise starting at (1, 0) and compute their coordinates: that's the figure.
In[35]:=
Clear@hexplotD;
hexplot@Α_, Β_D := With@
8Γ = Π - HΑ + ΒL, Ω = Π  3&lt;,
H* Α, Β, and Γ measure the irregular arcs in the hexagon. *L
8Cos@&eth;D, Sin@&eth;D&lt; &amp;  Accumulate@80, Α, Ω, Β, Ω, Γ, Ω&lt;D
H* Output is a closed list of vertices, starting and ending at H1,0L. *L
D
 Connect every other midpoint.
Use the midpoint formula: midpoints are averages of the endpoints.
In[37]:=
Clear@midpointD;
midpoint@data_D := H&eth;P1T + &eth;P2TL  2 &amp;  Partition@data, 2D ;
 Close a figure.
Tack the first point onto the end of a list of points to close it up.
In[39]:=
Clear@closeD;
close@s_D := Append@s, Part@s, 1DD;
 Draw a picture.
Let the user choose Α and Β, then draw the circle, the hexagon, and the triangle of midpoints: all the hard work was done above.
Printed by Mathematica for Students
2
3. Hexagon.nb
In[41]:=
Manipulate@
Module@
8data = hexplot@Α, ΒD,
unitCircle = ParametricPlot@8Cos@ΘD, Sin@ΘD&lt;, 8Θ, 0, 2 Π&lt;, PlotStyle &reg; 8Red&lt;D
&lt;,
hexagon = ListPlot@data, Joined &reg; True, PlotStyle &reg; 8Thick&lt;D;
vertices = ListPlot@data, PlotStyle &reg; 8PointSize@LargeD&lt;D;
midpoints =
ListPlot@close@midpoint@dataDD, Joined &reg; True, 8PlotStyle &reg; 8Thick, Gray, Dashed&lt;&lt;D;
Show@unitCircle, hexagon, vertices, midpoints, Axes &reg; FalseD
D,
H* Allowing negative angles is illuminating! *L
88Α, Π  3&lt;, - Π, Π&lt;, 88Β, Π  3&lt;, - Π, Π&lt;
D
Α
Β
Out[41]=
 Solve the problem by showing that one angle of the triangle equals 2Π/3.
This solution exploits complex arithmetic, so create a function to convert points into their complex equivalents.
In[42]:=
Clear@complexD;
complex@8x_, y_&lt;D := x + &auml; y;
Compute the sides of the midpoint triangle.
Printed by Mathematica for Students
3. Hexagon.nb
In[44]:=
3
Clear@Α, ΒD;
sides = complex  HDifferences@close@midpoint@hexplot@Α, ΒDDDDL;
sides  MatrixForm
Out[46]//MatrixForm=
1
H- 1 - Cos@ΑDL + &auml; J
2
&auml;K
1
2
J- CosB
Π
6
- ΑF - CosB
1
2
In[47]:=
Π
6
1
JCosB
2
- Α - ΒFN +
1
2
6
- ΑF + CosB
3
K-
H1 + Cos@ΑDL + &auml; K
Π
2
1
2
+ CosB
K
3
2
Π
6
Π
6
- Α - ΒFN -
+ Α + ΒFOO +
- CosB
Π
6
1
2
+ Α + ΒFO +
Sin@ΑD
2
N+
J- SinB
Sin@ΑD
2
Π
6
O+
1
2
JSinB
Π
6
- ΑF + SinB
- ΑF - SinB
1
2
J-
1
2
Π
6
+ SinB
Π
6
Out[48]//MatrixForm=
4
1
4
1
4
J1 + &auml;
J1 - &auml;
J- 2 + &atilde;&auml; Α J- 1 + &auml;
3 + J1 + &auml;
3 - &atilde;&auml; Α - 2 &atilde;&auml; HΑ+ΒL +
3 + 2 Cos@ΑD - 2 &auml; CosB
Π
6
3 N &atilde;&auml; Β NN
3 H- &auml; Cos@ΑD + Sin@ΑDLN
+ Α + ΒF + 2 &auml; Sin@ΑD + 2 SinB
Π
6
+ Α + ΒFN
Find the angle between the first two sides.
In[49]:=
Arg@sidesP2T  sidesP1TD  FullSimplify
2Π
Out[49]=
3
Because these sides were arbitrary, each one is obtained by rotating another by 2Π/3: it is an equilateral triangle.
Printed by Mathematica for Students
6
- Α - ΒF
- Α - ΒFN +
sides = sides  FullSimplify;
sides  MatrixForm
1
Π
+ Α + ΒFN
1
2
J
1
2
-
```