TITLE: Point within the interior of a given angle
QUESTION [5 upvotes]: The point $M$ is within the interior of given angle $\alpha$. Find the distance between $M$ and the vertex of the angle ($OM=?$) if $a$ and $b$ are the distances from $M$ to the sides of the angle.

We can see that $$OM^2=OP^2+PM^2=OK^2+KM^2$$
Let $OP=x;PK=y$. Then $$2OM^2=OP^2+PM^2+OK^2+KM^2\\=x^2+b^2+y^2+a^2.$$ I can't approach the problem further. How can we use the given angle $\alpha$? Thank you in advance!

REPLY [2 votes]: A two-liner :

Since $OPMK$ is cyclic, $\angle PMK = \pi - \angle POK = \pi - \alpha$; by cosine-rule in $\triangle PMK$, $PK^2=a^2+b^2+2ab\cos \alpha$.
Now $OM$ is simply the diameter of the circle which can be found by sine-rule in either of $\triangle POK$ or $\triangle PMK$,
$$OM=2r=\frac{PK}{\sin \angle POK}=\frac{PK}{\sin \alpha}=\frac{\sqrt{a^2+b^2+2ab\cos \alpha}}{\sin \alpha}$$