Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/* IMO 2019, problem 6 */
load("geometry.mac");
/* Declare angles for D, E, F. */
declare([theta_d, theta_e, theta_f], real);
/* Speed up calculation by choosing IA as the real axis. */
theta_f : -theta_e;
/* D, E, F are on the unit circle. */
d : %e^(%i * theta_d);
e : %e^(%i * theta_e);
f : %e^(%i * theta_f);
/* A, B, C are the intersection points of two tangents. */
a : 2 / conjugate(e + f);
b : 2 / conjugate(f + d);
c : 2 / conjugate(d + e);
/* R is derived from RD ⊥ EF, with R, D, E, F on the unit circle. */
r : - e * f / d;
/*
* P is the reflection of R over the line through O perpendicular
* to AR. One may also derive this from the fact that A, R, P are
* collinear, with R and P on the unit circle.
*/
p : reflect(0, %i * (r - a), r);
/* Ob is the circumcircle of triangle PBF. */
ob : circumcenter(p, b, f);
/* Oc is the circumcircle of triangle PCE. */
oc : circumcenter(p, c, e);
/* L is the intersection of DI and the line perpendicular to AI. */
l : intersect(0, d, p, %i * (ob - oc) + p);
/* Prove IA ⊥ AL. */
prove(perpendicular(a, 0, a, l));
quit();