Given triangle $ABC$. A circle $\Gamma$ is tangent to the circumcircle of triangle $ABC$ at $A$ and tangent to $BC$ at $D$. Let $E$ be the intersection of circle $\Gamma$ and $AC$. Prove that $$R^2=OE^2+CD^2\left(1- \frac{BC^2}{AB^2+AC^2}\right)$$where $O$ is the center of the circumcircle of triangle $ABC$, with radius $R$.