Triangle $ABC$ has $AB=40,AC=31,$ and $\sin{A}=\frac{1}{5}$. This triangle is inscribed in rectangle $AQRS$ with $B$ on $\overline{QR}$ and $C$ on $\overline{RS}$. Find the maximum possible area of $AQRS$.
Note that if angle $BAC$ is obtuse, it would be impossible for the triangle to inscribed in a rectangle. This can easily be shown by drawing triangle ABC, where $A$ is obtuse. Therefore, angle A is acute. Let angle $CAS=n$ and angle $BAQ=m$. Then, $\overline{AS}=31\cos(n)$ and $\overline{AQ}=40\cos(m)$. Then the area of rectangle $AQRS$ is $1240\cos(m)\cos(n)$. By product-to-sum, $\cos(m)\cos(n)=\frac{1}{2}(\cos(m+n)+\cos(m-n))$. $\cos(m+n)=\sin(90-m-n)=\sin(BAC)=\frac{1}{5}$. The maximum possible value of $\cos(m-n)$ is 1, which occurs when $m=n$. Thus the maximum possible value of $\cos(m)\cos(n)$ is $\frac{1}{2}(\frac{1}{5}+1)=\frac{3}{5}$ so the maximum possible area of $AQRS$ is $1240\times{\frac{3}{5}}=\fbox{744}$.