CircleInversion is just published on Wolfram Function Repository. There are many nice examples on the page already and I would like to show how you can use it in an interesting AIME problem on complex plane.
Problem
Problem
A regular hexagon with center at the origin in the complex plane has opposite pairs of sides one unit apart. One pair of sides is parallel to the imaginary axis. Let be the region outside the hexagon, and let . Then the area of has the form , where and are positive integers. Find . (2008 AIME II Problem 13)
R
Sz∈R
1
z
S
aπ+
b
a
b
a+b
Code golf for solution
Code golf for solution
Use newly add CircleInversion in WFR, I can quickly find the value right before the final solution (AIME has certain type of convention for final answer):
Withcircles=[Circle[{0,0},1],#]&/@BlockMapLine,*Table[{Cos[θ],Sin[θ]},{θ,π/6,2π+π/6,π/3}],2,1,Area[RegionUnion@@(circles/.Circle->Disk)]
1
3
Out[]=
3
3
+2πAnalysis with inversion on Euclidean plane
Analysis with inversion on Euclidean plane
I can quickly sketch the hexagon on complex plane using these facts:
WolframAlpha"regular hexagon",
Out[]=
Because we know the distance between the opposite sides is 1, the inradius must be . So we can find the circumradius by the following relation:
1
2
Solve[r2*
3
==12,r]Out[]=
r
1
3
All six vertices (ABCDEF) are found by:
In[]:=
pts=*Table[{Cos[θ],Sin[θ]},{θ,π/6,2π+π/6,π/3}];
1
3
The problem uses the complex mapping on points in outside R, which is the same thing as the circle inversion with respect to the unit circle at in Euclidean plane. We first need to take a look how the boundary looks under such inversion. Recall that The inverse of a line is a circle containing the center of inversion if the line does not contain the center:
1
z
{0,0}
t=π/6;styles={Opacity[0.4],Hue[#]}&/@(Range[6]/6);lines=BlockMap[Line,pts,2,1];disks=MapThreadAppend,styles,[Circle[{0,0},1],#]&/@lines/.Circle->Disk;Graphicsdisks~Join~lines~Join~MapThread[label,{{"A","B","C","D","E","F"},Most@pts}]~Join~MapThreadlabel,{"A'","B'","C'","D'","E'","F'"},[Circle[{0,0},1],#]&/@(Most@pts)/.Point->Identity~Join~{{Dashed,Circle[{0,0},1/2]}},PlotRange->{{-2,2},{-2,2}}
Out[]=
Take a look at the inversion diagram (from Wolfram MathWorld website) below, the closer a point sits beside the inversion center O, the farther it is sent away from .
O
Therefore S is the union of the rainbow disks above, bounded by joining minor arcs passing A’B’C’D’E’F’ in sequence.
union=RegionUnion@@(disks[[All,-1]]);{Region[union],Region@RegionBoundary[union]}
Out[]=
,
The area is simply
Area[union]
Out[]=
3
3
+2πBecause we need answer in the form of , just use simple algebra:
aπ+
b
27
===33
Out[]=
True
The answer is
a+b=2+27=
Code for Animation
Code for Animation
Export"aime.gif",Tablepts=*Table[{Cos[θ],Sin[θ]},{θ,t,2π+t,π/3}];lines=BlockMap[Line,pts,2,1];disks=MapThreadAppend,styles,[Circle[{0,0},1],#]&/@lines/.Circle->Disk;Graphicsdisks~Join~lines~Join~MapThread[label,{{"A","B","C","D","E","F"},Most@pts}]~Join~MapThreadlabel,{"A'","B'","C'","D'","E'","F'"},[Circle[{0,0},1],#]&/@(Most@pts)/.Point->Identity~Join~{{Dashed,Circle[{0,0},1/2]}},PlotRange->{{-2,2},{-2,2}},{t,0,4π,0.1}
1
3
Utility functions
Utility functions