A [circle](https://artofproblemsolving.com/wiki/index.php/Circle) is [inscribed](https://artofproblemsolving.com/wiki/index.php/Inscribe) in [quadrilateral](https://artofproblemsolving.com/wiki/index.php/Quadrilateral) $ABCD$, [tangent](https://artofproblemsolving.com/wiki/index.php/Tangent) to $\overline{AB}$ at $P$ and to $\overline{CD}$ at $Q$. Given that $AP=19$, $PB=26$, $CQ=37$, and $QD=23$, find the [square](https://artofproblemsolving.com/wiki/index.php/Perfect_square) of the [radius](https://artofproblemsolving.com/wiki/index.php/Radius) of the circle.
Call the [center](https://artofproblemsolving.com/wiki/index.php/Center) of the circle $O$. By drawing the lines from $O$ tangent to the sides and from $O$ to the vertices of the quadrilateral, four pairs of congruent [right triangles](https://artofproblemsolving.com/wiki/index.php/Right_triangle) are formed.
Thus, $\angle{AOP}+\angle{POB}+\angle{COQ}+\angle{QOD}=180$, or $(\arctan(\tfrac{19}{r})+\arctan(\tfrac{26}{r}))+(\arctan(\tfrac{37}{r})+\arctan(\tfrac{23}{r}))=180$.
Take the $\tan$ of both sides and use the identity for $\tan(A+B)$ to get \[\tan(\arctan(\tfrac{19}{r})+\arctan(\tfrac{26}{r}))+\tan(\arctan(\tfrac{37}{r})+\arctan(\tfrac{23}{r}))=n\cdot0=0.\]
Use the identity for $\tan(A+B)$ again to get \[\frac{\tfrac{45}{r}}{1-19\cdot\tfrac{26}{r^2}}+\frac{\tfrac{60}{r}}{1-37\cdot\tfrac{23}{r^2}}=0.\]
Solving gives $r^2=\boxed{647}$.
Note: the equation may seem nasty at first, but once you cancel the $r$s and other factors, you are just left with $r^2$. That gives us $647$ quite easily.