# cyclic quadrilateral inside an isosceles right triangle

Triangle $ABC$ is an isosceles right triangle with $AB=AC=3$. Let $M$ be the midpoint of hypotenuse $\overline{BC}$. Points $I$ and $E$ lie on sides $\overline{AC}$ and $\overline{AB}$, respectively, so that $AI>AE$ and $AIME$ is a cyclic quadrilateral. Given that triangle $EMI$ has area $2$, the length $CI$ can be written as $\frac{a-\sqrt{b}}{c}$, where $a$, $b$, and $c$ are positive integers and $b$ is not divisible by the square of any prime. What is the value of $a+b+c$?

So I think Ptolemy's theorem might work (especially bc EI is both an internal diagonal of quad AIME and also bc it's the base of triangle EMI), except that the sides of AI, IM, ME and EA are all unknown. But I couldn't really think of any other way to solve this problem. Any help would really be appreciated!

Update: I think I could use that fact that cyclic quads' opp angles sum to 90° so $\angle EMI = 90$°... I think I get a circle inscribed in a square, but that doesn't really make much sense bc $AI>AE$.

• According to the two posted replies, which are in agreement and appear correct, the answer is $a+b+c=3+7+2=12$. – Edward Porcella Aug 28 '18 at 6:48

Since $\overline{CM} = \overline{AM}$, $\angle MAE = \angle MCI$, $\angle MAE = \pi - \angle MIA = \angle MIC$, $\triangle MEA \cong \triangle MIC$.
In particular, $\overline{ME} = \overline{MI} = 2$ and $\overline{AE} = \overline{CI} = 3 - \overline{AI}$.
So $\overline{CI} = \overline{AE}$ will be the smaller solution of $x^2 + (3-x)^2 = (2\sqrt2)^2$ by the Pythagorean theorem.
By angle chasing we have that $EMI$ is right and isosceles, hence $EM=MI=2$.
By the cosine theorem $$4 = CI^2+CM^2 - 2\,CI\cdot CM\cos 45^\circ$$ but since $CM=\frac{3}{\sqrt{2}}$ we have that $CI\leq\frac{3}{2}$ is a root of the equation $$x^2- 3x+\frac{1}{2} = 0$$ hence $CI=\frac{1}{2}(3-\sqrt{7})$.