# 2019 AIME I Problems/Problem 12

## Problem 12

Given $f(z) = z^2-19z$, there are complex numbers $z$ with the property that $z$, $f(z)$, and $f(f(z))$ are the vertices of a right triangle in the complex plane with a right angle at $f(z)$. There are positive integers $m$ and $n$ such that one such value of $z$ is $m+\sqrt{n}+11i$. Find $m+n$.

## Solution 1

Notice that we must have $$\frac{f(f(z))-f(z)}{f(z)-z}=-\frac{f(f(z))-f(z)}{z-f(z)}\in\mathbb I.$$However, $f(t)=t(t-20)$, so \begin{align*} \frac{f(f(z))-f(z)}{f(z)-z}&=\frac{(z^2-19z)(z^2-19z-20)}{z(z-20)}\\ &=\frac{z(z-19)(z-20)(z+1)}{z(z-20)}\\ &=(z-19)(z+1)\\ &=(z-9)^2-100. \end{align*} Then, the real part of $(z-9)^2$ is $100$. Since $\text{Im}(z-9)=\text{Im}(z)=11$, let $z-9=a+11i$. Then, $$100=\text{Re}((a+11i)^2)=a^2-121\implies a=\pm\sqrt{221}.$$It follows that $z=9+\sqrt{221}+11i$, and the requested sum is $9+221=\boxed{230}$.

(Solution by TheUltimate123)

## Solution 2

We will use the fact that segments $AB$ and $BC$ are perpendicular in the complex plane if and only if $\frac{a-b}{b-c}\in i\mathbb{R}$. To prove this, when dividing two complex numbers you subtract the angle of one from the other, and if the two are perpendicular, subtracting these angles will yield an imaginary number with no real part.

Now to apply this: $$\frac{f(z)-z}{f(f(z))-f(z)}\in i\mathbb{R}$$ $$\frac{z^2-19z-z}{(z^2-19z)^2-19(z^2-19z)-(z^2-19z)}$$ $$\frac{z^2-20z}{z^4-38z^3+341z^2+380z}$$ $$\frac{z(z-20)}{z(z+1)(z-19)(z-20)}$$ $$\frac{1}{(z+1)(z-19)}\in i\mathbb{R}$$

The factorization of the nasty denominator above is made easier with the intuition that $(z-20)$ must be a divisor for the problem to lead anywhere. Now we know $(z+1)(z-19)\in i\mathbb{R}$ so using the fact that the imaginary part of $z$ is $11i$ and calling the real part r,

$$(r+1+11i)(r-19+11i)\in i\mathbb{R}$$ $$r^2-18r-140=0$$

solving the above quadratic yields $r=9+\sqrt{221}$ so our answer is $9+221=\boxed{230}$