The answer is 441.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Since $AD$ is the bisector of $\triangle ABC$ , $\frac{AB}{AC} = \frac{EB}{EC}$ , which means $\frac{AB + AC}{AC} = \frac{EB + EC}{EC}$ or $EB + EC = \frac{EC}{AC}(AB + AC)$ . But since $EB - EC = 189$ , $\frac{AB}{AC} = \frac{EB}{EC}$ is also $\frac{AB}{AC} = \frac{EC + 189}{EC}$ which rearranges to $\frac{EC}{AC} = \frac{189}{AB - AC}$ . Substituting this back in gives us $EB + EC = \frac{189(AB + AC)}{AB - AC}$ .

Since $AE$ is the altitude of $\triangle ABC$ , $AD^2 + DC^2 = AC^2$ and $AD^2 + DB^2 = AB^2$ . Combining these equations gives $DB^2 - DC^2 = AB^2 - AC^2$ , or $(DB - DC)(DB + DC) = (AB - AC)(AB + AC)$ . Substituting $DB + DC = EB + EC = \frac{189(AB + AC)}{AB - AC}$ from above and the given $DB - DC = 1029$ gives $1029 \cdot \frac{189(AB + AC)}{AB - AC} = (AB - AC)(AB + AC)$ , which simplifies to $194481 = (AB - AC)^2$ , and since $AB > AC$ (otherwise $EB + EC$ would be negative from the equation above), this further simplifies to $AB - AC = \boxed{441}$ .