A convex quadrilateral has area $30$ and side lengths $5, 6, 9,$ and $7,$ in that order. Denote by $\theta$ the measure of the acute angle formed by the diagonals of the quadrilateral. Then $\tan \theta$ can be written in the form $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$.
Since we are asked to find $\tan \theta$, we can find $\sin \theta$ and $\cos \theta$ separately and use their values to get $\tan \theta$. We can start by drawing a diagram. Let the vertices of the quadrilateral be $A$, $B$, $C$, and $D$. Let $AB = 5$, $BC = 6$, $CD = 9$, and $DA = 7$. Let $AX = a$, $BX = b$, $CX = c$, and $DX = d$. We know that $\theta$ is the acute angle formed between the intersection of the diagonals $AC$ and $BD$.

We are given that the area of quadrilateral $ABCD$ is $30$. We can express this area using the areas of triangles $AXB$, $BXC$, $CXD$, and $DXA$. Since we want to find $\sin \theta$ and $\cos \theta$, we can represent these areas using $\sin \theta$ as follows:
\begin{align*} 30 &=[ABCD] \\ &=[AXB] + [BXC] + [CXD] + [DXA] \\ &=\frac{1}{2} ab \sin (\angle AXB) + \frac{1}{2} bc \sin (\angle BXC) + \frac{1}{2} cd \sin (\angle CXD) + \frac{1}{2} da \sin (\angle AXD) \\ &=\frac{1}{2} ab \sin (180^\circ - \theta) + \frac{1}{2} bc \sin (\theta) + \frac{1}{2} cd \sin (180^\circ - \theta) + \frac{1}{2} da \sin (\theta). \end{align*}
We know that $\sin (180^\circ - \theta) = \sin \theta$. Therefore it follows that:
\begin{align*} 30 &=\frac{1}{2} ab \sin (180^\circ - \theta) + \frac{1}{2} bc \sin (\theta) + \frac{1}{2} cd \sin (180^\circ - \theta) + \frac{1}{2} da \sin (\theta) \\ &=\frac{1}{2} ab \sin (\theta) + \frac{1}{2} bc \sin (\theta) + \frac{1}{2} cd \sin (\theta) + \frac{1}{2} da \sin (\theta) \\ &=\frac{1}{2}\sin\theta (ab + bc + cd + da). \end{align*}
From here we see that $\sin \theta = \frac{60}{ab + bc + cd + da}$. Now we need to find $\cos \theta$. Using the Law of Cosines on each of the four smaller triangles, we get following equations:
\begin{align*}   5^2 &= a^2 + b^2 - 2ab\cos(180^\circ-\theta), \\   6^2 &= b^2 + c^2 - 2bc\cos \theta, \\   9^2 &= c^2 + d^2 - 2cd\cos(180^\circ-\theta), \\   7^2 &= d^2 + a^2 - 2da\cos \theta.   \end{align*}
We know that $\cos (180^\circ - \theta) = -\cos \theta$ for all $\theta$. We can substitute this value into our equations to get:
\begin{align*}   5^2 &= a^2 + b^2 + 2ab\cos \theta, &&(1) \\   6^2 &= b^2 + c^2 - 2bc\cos \theta, &&(2) \\   9^2 &= c^2 + d^2 + 2cd\cos \theta, &&(3) \\   7^2 &= d^2 + a^2 - 2da\cos \theta. &&(4) \end{align*}
If we subtract $(2)+(4)$ from $(1)+(3)$, the squared terms cancel, leaving us with:
\begin{align*} 5^2 + 9^2 - 6^2 - 7^2 &= 2ab \cos \theta + 2bc \cos \theta + 2cd \cos \theta + 2da \cos \theta \\  21 &= 2\cos \theta (ab  + bc + cd + da). \end{align*}
From here we see that $\cos \theta = \frac{21/2}{ab + bc + cd + da}$.
Since we have figured out $\sin \theta$ and $\cos \theta$, we can calculate $\tan \theta$: \[\tan \theta = \frac{\sin \theta}{\cos \theta} = \frac{\frac{60}{ab + bc + cd + da}}{\frac{21/2}{ab + bc + cd + da}} = \frac{60}{21/2} = \frac{120}{21} = \frac{40}{7}.\]
Therefore our answer is $40 + 7 = \boxed{047}$.
~ Steven Chen (www.professorchenedu.com)
~ my_aops_lessons