Convex quadrilateral $ABCD$ is inscribed in a circle with diameter $AC=729$. Sides $AB$ and $CD$ each have positive integer length. I have to find the perimeter if $BD=715$. By Ptolemy's theorem, there is $AB∙CD+BC∙DA=AC∙BD=521235$ and furthermore we have: $CD^2+DA^2=AB^2+BC^2=AC^2=3^{12}$. What can I do next?
Let $AB=n$ and $CD=m$. Then $$mn+\sqrt{729^2-m^2}\sqrt{729^2-n^2}=729\cdot 715$$ can be written as $$(729^2-m^2)(729^2-n^2)=(729\cdot 715-mn)^2$$ or as $$729 m^2 - 1430 mn + 729 n^2 = 729\cdot20216$$ which does not have many integer solutions. Except the obvious $(m,n)\in\{(715,729),(729,715)\}$ there are only $(m,n)\in\{(279,405),(405,279)\}$, leading to a perimeter equal to $$279+405+180\sqrt{14}+162\sqrt{14}=\color{red}{342(2+\sqrt{14})}.$$