\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{USAMO 2024/5}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 141}
\maketitle

\section*{Problem}
Point $D$ is selected inside acute triangle $ABC$
so that $\angle DAC = \angle ACB$ and $\angle BDC = 90^\circ + \angle BAC$.
Point $E$ is chosen on ray $BD$ so that $AE = EC$.
Let $M$ be the midpoint of $BC$.
Show that line $AB$ is tangent to the circumcircle of triangle $BEM$.

\section*{Video}
\href{https://www.youtube.com/watch?v=7M-b5zXXpaY&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/7M-b5zXXpaY}}

\section*{External Link}
\url{https://aops.com/community/p30227196}

\newpage

\section*{Solution}
This problem has several approaches and we showcase a collection of them.

\paragraph{The author's original solution.}
Complete isosceles trapezoid $ABQC$ (so $D \in \ol{AQ}$).
Reflect $B$ across $E$ to point $F$.
\begin{center}
\begin{asy}
size(7cm);
pair A = dir(185);
pair C = dir(355);
pair B = dir(115);
pair Q = A*C/B;
pair X = extension(A, B, Q, C);
pair Y = 2*X-A;
filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
draw(unitcircle, red);
pair D = IP(A--Q, circumcircle(B, C, Y));
pair N = midpoint(A--C);
pair M = midpoint(B--C);
draw(A--Q, mediumblue);
pair E = extension(N, origin, B, D);
pair F = 2*E-B;
draw(F--B, deepgreen);
pair S = dir(90);
draw(S--N, brown);
draw(F--Q, brown);
draw(M--E, grey);
draw(F--C--Q, grey);
filldraw(circumcircle(Q, D, C), opacity(0.1)+yellow, orange);
markangle(n=2, radius=6, M, E, B, deepgreen);
markangle(n=2, radius=6, C, F, B, deepgreen);
markangle(n=1, radius=6, D, Q, C, deepgreen);
markangle(n=1, radius=6, A, B, C, deepgreen);

dot("$A$", A, dir(225));
dot("$C$", C, dir(315));
dot("$B$", B, dir(160));
dot("$Q$", Q, dir(100));
dot("$D$", D, dir(180));
dot(N);
dot("$M$", M, dir(90));
dot("$E$", E, dir(225));
dot("$F$", F, dir(F));

/* -----------------------------------------------------------------+
|                 TSQX: by CJ Quines and Evan Chen                  |
| https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsqx.py |
+-------------------------------------------------------------------+
!size(7cm);
A 225 = dir 185
C 315 = dir 355
B 160 = dir 115
Q 100 = A*C/B
X := extension A B Q C
Y := 2*X-A
A--B--C--cycle / 0.1 lightred / red
unitcircle / red
D 180 = IP A--Q (circumcircle B C Y)
N = midpoint A--C
M 90 = midpoint B--C
A--Q / mediumblue
E 225 = extension N origin B D
F = 2*E-B
F--B / deepgreen
S := dir 90
S--N / brown
F--Q / brown
M--E / grey
F--C--Q / grey
circumcircle Q D C / 0.1 yellow / orange
!markangle(n=2, radius=6, M, E, B, deepgreen);
!markangle(n=2, radius=6, C, F, B, deepgreen);
!markangle(n=1, radius=6, D, Q, C, deepgreen);
!markangle(n=1, radius=6, A, B, C, deepgreen);
*/
\end{asy}
\end{center}
\begin{claim*}
  We have $DQCF$ is cyclic.
\end{claim*}
\begin{proof}
  Since $EA=EC$, we have $\ol{QF} \perp \ol{AC}$
  as line $QF$ is the image of the perpendicular bisector of $\ol{AC}$
  under a homothety from $B$ with scale factor $2$.
  Then
  \begin{align*}
  \dang FDC &= -\dang CDB = 180\dg - (90\dg + \dang CAB) = 90\dg - \dang CAB \\
    &= 90\dg - \dang QCA = \dang FQC. \qedhere
  \end{align*}
\end{proof}
To conclude, note that
\[ \dang BEM = \dang BFC = \dang DFC = \dang DQC = \dang AQC = \dang ABC = \dang ABM. \]

\begin{remark*}
  [Motivation]
  Here is one possible way to come up with the construction of point $F$
  (at least this is what led Evan to find it).
  If one directs all the angles in the obvious way,
  there are really two points $D$ and $D'$ that are possible,
  although one is outside the triangle;
  they give corresponding points $E$ and $E'$.
  The circles $BEM$ and $BE'M$ must then actually coincide since they
  are both alleged to be tangent to line $AB$.
  See the figure below.
  \begin{center}
  \begin{asy}
    size(11cm);
    pair A = dir(185);
    pair C = dir(355);
    pair B = dir(115);
    pair Q = A*C/B;
    pair X = extension(A, B, Q, C);
    pair Y = 2*X-A;
    filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
    draw(unitcircle, red);
    draw(circumcircle(B, C, Y), grey);
    pair D = IP(A--Q, circumcircle(B, C, Y));
    pair D_prime = -D+2*foot(circumcenter(B, C, Y), A, D);
    pair N = midpoint(A--C);
    pair M = midpoint(B--C);
    draw(A--D_prime, mediumblue);
    pair E = extension(N, origin, B, D);
    pair E_prime = extension(N, origin, B, D_prime);
    pair F = 2*E-B;
    pair F_prime = 2*E_prime-B;
    draw(F--B--D_prime, deepgreen);
    draw(E_prime--N, brown);
    draw(F--F_prime, brown);

    filldraw(circumcircle(B, E, E_prime), opacity(0.2)+grey, red+1.1);

    filldraw(M--E--E_prime--cycle, opacity(0.1)+yellow, brown+1.1);
    filldraw(D--C--D_prime--cycle, opacity(0.1)+cyan, heavycyan+1.1);
    filldraw(F--C--F_prime--cycle, opacity(0.1)+yellow, brown+1.1);

    dot("$A$", A, dir(225));
    dot("$C$", C, dir(315));
    dot("$B$", B, dir(160));
    dot("$Q$", Q, dir(130));
    dot("$D$", D, dir(180));
    dot("$D'$", D_prime, dir(D_prime));
    dot(N);
    dot("$M$", M, dir(65));
    dot("$E$", E, dir(225));
    dot("$E'$", E_prime, dir(E_prime));
    dot("$F$", F, dir(F));
    dot("$F'$", F_prime, dir(F_prime));

    /* -----------------------------------------------------------------+
    |                 TSQX: by CJ Quines and Evan Chen                  |
    | https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsqx.py |
    +-------------------------------------------------------------------+
    !size(11cm);
    A 225 = dir 185
    C 315 = dir 355
    B 160 = dir 115
    Q 130 = A*C/B
    X := extension A B Q C
    Y := 2*X-A
    A--B--C--cycle / 0.1 lightred / red
    unitcircle / red
    circumcircle B C Y / grey
    D 180 = IP A--Q (circumcircle B C Y)
    D' = -D+2*foot (circumcenter B C Y) A D
    N .= midpoint A--C
    M 65 = midpoint B--C
    A--D' / mediumblue
    E 225 = extension N origin B D
    E' = extension N origin B D'
    F = 2*E-B
    F' = 2*E'-B
    F--B--D' / deepgreen
    E'--N / brown
    F--F' / brown
    circumcircle E B E' / 0.2 grey / red 1.1
    M--E--E'--cycle / 0.1 yellow / brown 1.1
    D--C--D'--cycle / 0.1 cyan / heavycyan 1.1
    F--C--F'--cycle / 0.1 yellow / brown 1.1
    */
  \end{asy}
  \end{center}
  One can already prove using angle chasing that $\ol{AB}$ is tangent to $(BEE')$.
  So the point of the problem is to show that $M$ lies on this circle too.
  However, from looking at the diagram, one may realize that in fact it seems
  \[ \triangle MEE' \overset{+}{\sim} \triangle CDD' \]
  is going to be true from just those marked in the figure
  (and this would certainly imply the desired concyclic conclusion).
  Since $M$ is a midpoint, it makes sense to dilate $\triangle EME'$
  from $B$ by a factor of $2$ to get $\triangle FCF'$
  so that the desired similarity is actually a spiral similarity at $C$.
  Then the spiral similarity lemma says that the desired similarity
  is equivalent to requiring $\ol{DD'} \cap \ol{FF'} = Q$
  to lie on both $(CDF)$ and $(CD'F')$.
  Hence the key construction and claim from the solution are both discovered naturally,
  and we find the solution above.
  (The points $D'$, $E'$, $F'$ can then be deleted to hide the motivation.)
\end{remark*}

\paragraph{Another short solution.}
Let $Z$ be on line $BDE$ such that $\angle BAZ = 90\dg$.
This lets us interpret the angle condition as follows:
\begin{claim*}
  Points $A$, $D$, $Z$, $C$ are cyclic.
\end{claim*}
\begin{proof}
  Because $\dang ZAC = 90\dg - A = 180\dg - \dang CDB = \dang ZDC$.
\end{proof}

\begin{center}
\begin{asy}
size(8cm);
pair A = dir(185);
pair C = dir(355);
pair B = dir(110);
pair Q = A*C/B;
pair X = extension(A, B, Q, C);
pair Y = 2*X-A;
filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
draw(unitcircle, red);
pair D = IP(A--Q, circumcircle(B, C, Y));
pair N = midpoint(A--C);
pair M = midpoint(B--C);
draw(A--Q, mediumblue);
pair E = extension(N, origin, B, D);
pair S = dir(90);
draw(S--N, brown);
draw(M--E, blue);
pair Z = extension(B, D, A, -B);
draw(A--Z--B, deepgreen);
filldraw(circumcircle(A, D, Z), opacity(0.1)+palecyan, deepgreen);
pair W = midpoint(B--Z);
pair O = origin;
draw(M--W--O--cycle, deepgreen);

filldraw(circumcircle(E, O, M), opacity(0.1)+palecyan, deepgreen);

dot("$A$", A, dir(180));
dot("$C$", C, dir(0));
dot("$B$", B, dir(140));
dot("$D$", D, dir(160));
dot("$N$", N, dir(N));
dot("$M$", M, dir(90));
dot("$E$", E, dir(225));
dot("$Z$", Z, dir(Z));
dot("$W$", W, dir(250));
dot("$O$", O, dir(180));

/* -----------------------------------------------------------------+
|                 TSQX: by CJ Quines and Evan Chen                  |
| https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsqx.py |
+-------------------------------------------------------------------+
!size(8cm);
A 180 = dir 185
C 0 = dir 355
B 140 = dir 110
Q := A*C/B
X := extension A B Q C
Y := 2*X-A
A--B--C--cycle / 0.1 lightred / red
unitcircle / red
D 160 = IP A--Q (circumcircle B C Y)
N = midpoint A--C
M 90 = midpoint B--C
A--Q / mediumblue
E 225 = extension N origin B D
S := dir 90
S--N / brown
M--E / blue
Z = extension B D A -B
A--Z--B / deepgreen
circumcircle A D Z / 0.1 palecyan / deepgreen
W 250 = midpoint B--Z
O 180 = origin
M--W--O--cycle / deepgreen
circumcircle E O M / 0.1 palecyan / deepgreen
*/
\end{asy}
\end{center}

Define $W$ as the midpoint of $\ol{BZ}$, so $\ol{MW} \parallel \ol{CZ}$.
And let $O$ denote the center of $(ABC)$.

\begin{claim*}
  Points $M$, $E$, $O$, $W$ are cyclic.
\end{claim*}
\begin{proof}
  Note that
  \begin{align*}
    \dang MOE
    &= \dang(\ol{OM},\ol{BC}) + \dang(\ol{BC},\ol{AC}) + \dang(\ol{AC},\ol{OE}) \\
    &= 90\dg + \dang BCA + 90\dg \\
    &= \dang BCA = \dang CAD = \dang CZD = \dang MWD = \dang MWE. \qedhere
  \end{align*}
\end{proof}
To finish, note
\begin{align*}
  \dang MEB &= \dang MEW = \dang MOW \\
  &= \dang(\ol{MO}, \ol{BC}) + \dang(\ol{BC}, \ol{AB}) + \dang(\ol{AB}, \ol{OW}) \\
  &= 90\dg + \dang CBA + 90\dg = \dang CBA = \dang MBA.
\end{align*}
This implies the desired tangency.

\paragraph{A Menelaus-based approach (Kevin Ren).}
Let $P$ be on $\ol{BC}$ with $AP=PC$.
Let $Y$ be the point on line $AB$ such that $\angle ACY = 90\dg$;
as $\angle AYC = 90\dg - A$ it follows $BDYC$ is cyclic.
Let $K = \ol{AP} \cap \ol{CY}$,
so $\triangle ACK$ is a right triangle with $P$ the midpoint of its hypotenuse.

\begin{center}
\begin{asy}
size(12cm);
pair A = dir(185);
pair C = dir(355);
pair B = dir(115);
pair Q = A*C/B;
pair X = extension(A, B, Q, C);
pair Y = 2*X-A;
filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
draw(unitcircle, red);
filldraw(circumcircle(B, C, Y), opacity(0.1)+palecyan, deepcyan);
pair D = IP(A--Q, circumcircle(B, C, Y));
pair N = midpoint(A--C);
pair M = midpoint(B--C);
pair E = extension(N, origin, B, D);
pair P = extension(A, Q, B, C);
pair Y = extension(A, B, C, -A);
draw(B--Y--C, red);
pair K = extension(A, P, C, Y);
draw(A--K, blue);
filldraw(B--E--M--cycle, opacity(0.1)+yellow, deepgreen);
filldraw(Y--D--C--cycle, opacity(0.1)+yellow, deepgreen);
draw(Y--P, grey);
draw(P--N, brown);

dot("$A$", A, dir(225));
dot("$C$", C, dir(315));
dot("$B$", B, dir(160));
dot(Q);
dot("$D$", D, dir(180));
dot(N);
dot("$M$", M, dir(35));
dot("$E$", E, dir(225));
dot("$P$", P, dir(100));
dot("$Y$", Y, dir(Y));
dot("$K$", K, dir(20));

/* -----------------------------------------------------------------+
|                 TSQX: by CJ Quines and Evan Chen                  |
| https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsqx.py |
+-------------------------------------------------------------------+
!size(11cm);
A 225 = dir 185
C 315 = dir 355
B 160 = dir 115
Q 130 .= A*C/B
X := extension A B Q C
Y := 2*X-A
A--B--C--cycle / 0.1 lightred / red
unitcircle / red
circumcircle B C Y / 0.1 palecyan / deepcyan
D 180 = IP A--Q (circumcircle B C Y)
N .= midpoint A--C
M 35 = midpoint B--C
E 225 = extension N origin B D
P 100 = extension A Q B C
Y = extension A B C -A
B--Y--C / red
K 20 = extension A P C Y
A--K blue
B--E--M--cycle / 0.1 yellow / deepgreen
Y--D--C--cycle / 0.1 yellow / deepgreen
Y--P / grey
P--N / brown
*/
\end{asy}
\end{center}

\begin{claim*}
  Triangles $BPE$ and $DYK$ are similar.
\end{claim*}
\begin{proof}
  We have $\dang MPE = \dang CPE = \dang KCP = \dang PKC$
  and $\dang EBP = \dang DBC = \dang DYC = \dang DYK$.
\end{proof}
\begin{claim*}
  Triangles $BEM$ and $YDC$ are similar.
\end{claim*}
\begin{proof}
  By Menelaus $\triangle PCK$ with respect to collinear points $A$, $B$, $Y$ that
  \[ \frac{BP}{BC} \frac{YC}{YK} \frac{AK}{AP} = 1. \]
  Since $AK/AP = 2$ (note that $P$ is the midpoint of the hypotenuse of right triangle $ACK$)
  and $BC = 2BM$, this simplifies to
  \[ \frac{BP}{BM} = \frac{YK}{YC}. \qedhere \]
\end{proof}
To finish, note that
\[ \dang DBA = \dang DBY = \dang DCY = \dang BME \]
implying the desired tangency.

\paragraph{A spiral similarity approach (Hans Yu).}
As in the previous solution,
let $Y$ be the point on line $AB$ such that $\angle ACY = 90\dg$;
so $BDYC$ is cyclic.
Let $\Gamma$ be the circle through $B$ and $M$ tangent to $\ol{AB}$,
and let $\Omega \coloneqq (BCYD)$.
We need to show $E \in \Gamma$.

\begin{center}
\begin{asy}
size(11cm);
pair A = dir(185);
pair C = dir(355);
pair B = dir(110);
pair Q = A*C/B;
pair H = extension(A, B, Q, C);
pair Y = 2*H-A;
filldraw(A--B--C--cycle, opacity(0.1)+lightred, red);
draw(unitcircle, red);
filldraw(circumcircle(B, C, Y), opacity(0.1)+palecyan, deepcyan+1.2);
pair D = IP(A--Q, circumcircle(B, C, Y));
pair N = midpoint(A--C);
pair M = midpoint(B--C);
pair E = extension(N, origin, B, D);
pair P = extension(A, Q, B, C);
pair Y = extension(A, B, C, -A);
draw(C--Y, grey);
draw(B--Y, red);
draw(A--Q, red);
filldraw(circumcircle(B, M, E), opacity(0.1)+palecyan, deepcyan+1.2);
draw(B--E, red);
pair S = -B+2*foot(B, circumcenter(B, M, E), circumcenter(B, C, Y));
pair O = circumcenter(A, B, C);
filldraw(O--B--M--cycle, opacity(0.2)+yellow, deepgreen+1.2);
draw(P--O, red);
pair O_1 = circumcenter(B, M, E);
pair O_2 = circumcenter(B, C, Y);
label("$\Gamma$", O_1+abs(O_1-B)*dir(80), dir(80), deepcyan);
label("$\Omega$", O_2+abs(O_2-B)*dir(320), dir(320), deepcyan);

dot("$A$", A, dir(225));
dot("$C$", C, dir(315));
dot("$B$", B, dir(160));
dot(Q);
dot("$D$", D, dir(80));
dot("$M$", M, dir(20));
dot("$E$", E, dir(290));
dot("$P$", P, dir(90));
dot("$Y$", Y, dir(Y));
dot("$S$", S, dir(80));
dot("$O$", O, dir(180));

/* -----------------------------------------------------------------+
|                 TSQX: by CJ Quines and Evan Chen                  |
| https://github.com/vEnhance/dotfiles/blob/main/py-scripts/tsqx.py |
+-------------------------------------------------------------------+
!size(11cm);
A 225 = dir 185
C 315 = dir 355
B 160 = dir 110
Q 130 .= A*C/B
H := extension A B Q C
Y := 2*H-A
A--B--C--cycle / 0.1 lightred / red
unitcircle / red
circumcircle B C Y / 0.1 palecyan / deepcyan 1.2
D 80 = IP A--Q (circumcircle B C Y)
N := midpoint A--C
M 20 = midpoint B--C
E 290 = extension N origin B D
P 90 = extension A Q B C
Y = extension A B C -A
C--Y / grey
B--Y / red
A--Q / red
circumcircle B M E / 0.1 palecyan / deepcyan 1.2
B--E / red
S 80 = -B+2*foot B (circumcenter B M E) (circumcenter B C Y)
O 180 = circumcenter A B C
O--B--M--cycle / 0.2 yellow / deepgreen 1.2
P--O / red
O_1 := circumcenter B M E
O_2 := circumcenter B C Y
!label("$\Gamma$", O_1+abs(O_1-B)*dir(80), dir(80), deepcyan);
!label("$\Omega$", O_2+abs(O_2-B)*dir(320), dir(320), deepcyan);
*/
\end{asy}
\end{center}

Denote by $S$ the second intersection of $\Gamma$ and $\Omega$.
The main idea behind is to consider the spiral similarity
\[ \Psi : \Omega \to \Gamma \qquad C \mapsto M \text{ and } Y \mapsto B \]
centered at $S$ (due to the spiral similarity lemma), and show that $\Psi(D) = E$.
The spiral similarity lemma already promises $\Psi(D)$ lies on line $BD$.
\begin{claim*}
  We have $\Psi(A) = O$, the circumcenter of $ABC$.
\end{claim*}
\begin{proof}
  Note $\triangle OBM \overset{+}{\sim} \triangle AYC$;
  both are right triangles with $\dang BAC = \dang BOM$.
\end{proof}
\begin{claim*}
  $\Psi$ maps line $AD$ to line $OP$.
\end{claim*}
\begin{proof}
  If we let $P$ be on $\ol{BC}$ with $AP=PC$ as before,
  \[ \dang(\ol{AD}, \ol{OP}) = \dang APO = \dang OPC = \dang YCP = \dang(\ol{YC}, \ol{BM}). \]
  As $\Psi$ maps line $YC$ to line $BM$ and $\Psi(A) = O$, we're done.
\end{proof}
Hence $\Psi(D)$ should not only lie on $BD$ but also line $OP$.
This proves $\Psi(D) = E$, so $E \in \Gamma$ as needed.

\end{document}
