I'm trying to arrive to the shortest expression possible for finding the diagonal in a convex (and non-cyclic) quadrilateral, knowing its four sides lengths and the other diagonal.
My best try matches the second proposed solution in this other question: How can I find the diagonal of a quadrilateral? proposed by Yves Daoust, using the law of cosines:
$$\mu_0=\arccos\left(\frac{MQ^2+MP^2-PQ^2}{2MQ\cdot MP}\right)\\ \mu_1=\arccos\left(\frac{MP^2+MN^2-NP^2}{2MP\cdot MN}\right)\\ NQ=\sqrt{MQ^2+MN^2-2MQ\cdot MN\cos\left(\mu_0+\mu_1\right)}.$$ where MN, NP, PQ, and MQ are the sides of the convex quadrilateral, MP is the known diagonal, and NQ is the unknown diagonal.
However, that's a still relatively large expression. I tried to simplify taking advantage that $$\arccos\alpha \pm \arccos\beta = \arccos\left(\alpha\beta \mp \sqrt{(1-\alpha^2)(1-\beta^2)}\right)$$ but Mathematica turns this into quite a messy expression which, if I subtract from the original, won't result zero. So, maybe I'm doing something wrong.
Anyway, is there any other approach which would give a shorter expression for the diagonal?
Thanks!
