12.159. The sides of the parallelogram are in the ratio $p: q$, and the diagonals are in the ratio m:n. Find the angles of the parallelogram.
## Solution.

Let in parallelogram $A B C D$ (Fig. 12.31) $A D=p y, B D=m x$. Then $A B=q y, A C=n x$. From $\triangle B A D$ and $\triangle A B C$ by the cosine theorem: $m^{2} x^{2}=p^{2} y^{2}+q^{2} y^{2}-2 p q y^{2} \cos \angle A ; m^{2} x^{2}=p^{2} y^{2}+q^{2} y^{2}+2 p q y^{2} \cos \angle A$. $\Rightarrow\left(n^{2}-m^{2}\right) x^{2}=4 p q y^{2} \cos \angle A ; \frac{x^{2}}{y^{2}}=\frac{4 p q \cos \angle A}{n^{2}-m^{2}}$. By the property of the diagonals of a parallelogram: $A C^{2}+B D^{2}=2\left(A B^{2}+A D^{2}\right)$,

$$
\begin{aligned}
& m^{2} x^{2}+n^{2} x^{2}=2\left(p^{2} y^{2}+q^{2} y^{2}\right) ; x^{2}\left(m^{2}+n^{2}\right)=2 y^{2}\left(p^{2}+q^{2}\right) \\
& \frac{x^{2}}{y^{2}}=\frac{2\left(p^{2}+q^{2}\right)}{m^{2}+n^{2}} \Rightarrow \frac{4 p q \cos \angle A}{n^{2}-m^{2}}=\frac{2\left(p^{2}+q^{2}\right)}{m^{2}+n^{2}}
\end{aligned}
$$

$\angle A=\arccos \frac{\left(p^{2}+q^{2}\right)\left(n^{2}-m^{2}\right)}{2 p q\left(m^{2}+n^{2}\right)}$.

$\angle A B C=\pi-\angle A=\pi-\arccos \frac{\left(p^{2}+q^{2}\right)\left(n^{2}-m^{2}\right)}{2 p q\left(m^{2}+n^{2}\right)}$.

Answer: $\arccos \frac{\left(p^{2}+q^{2}\right)\left(n^{2}-m^{2}\right)}{2 p q\left(m^{2}+n^{2}\right)} ; \pi-\arccos \frac{\left(p^{2}+q^{2}\right)\left(n^{2}-m^{2}\right)}{2 p q\left(m^{2}+n^{2}\right)}$.