5. In triangle $A B C, \angle A=45^{\circ}$ and $M$ is the midpoint of $\overline{B C}$. $\overline{A M}$ intersects the circumcircle of $A B C$ for the second time at $D$, and $A M=2 M D$. Find $\cos \angle A O D$, where $O$ is the circumcenter of $A B C$.
Answer: $-\frac{1}{8} \angle B A C=45^{\circ}$, so $\angle B O C=90^{\circ}$. If the radius of the circumcircle is $r, B C=\sqrt{2} r$, and $B M=C M=\frac{\sqrt{2}}{2} r$. By power of a point, $B M \cdot C M=A M \cdot D M$, so $A M=r$ and $D M=\frac{1}{2} r$, and $A D=\frac{3}{2} r$. Using the law of cosines on triangle $A O D$ gives $\cos \angle A O D=-\frac{1}{8}$.