Let $A,B \in M_n(\mathbb{R})$ symmetric matrices. Prove that:
(a) If $A > 0$, then $AB$ has only real eigenvalues.
(b) If $x^T Ax \leq x^T B x$, then $\operatorname{ind} A \leq \operatorname{ind} B$.
Notation. Let $p_+$ number of the strictly positive eigenvalues of $A$ and $p_-$ number of the stricly negative eigenvalues of $A$, we define $\operatorname{ind} A = p_+ - p_-$.
Attempt.
(a) Since $A$ is positive, it has a positive square root. Also, $$AB = = \sqrt{A}(\sqrt{A}^{-1}AB\sqrt{A})\sqrt{A}^{-1} = \sqrt{A}(\sqrt{A}B\sqrt{A})\sqrt{A}^{-1},$$ that is, $AB$ and $\sqrt{A}B\sqrt{A}$ are similar. Since $\sqrt{A}$ and $B$ are symmetric, $$(\sqrt{A}B\sqrt{A})^T = \sqrt{A}^T B^T \sqrt{A}^T = \sqrt{A}B\sqrt{A}.$$ Since $\sqrt{A}B\sqrt{A}$ is symmetric, it has only real eigenvalues. The result follows by similarity.
(b) I did not have a good idea. The only result that I know about the sign of the eigenvalues is the Law of Inertia, but I do not think it applies here. So, I appreciate any hints.
About the item (a), I would like someone could check my attempt.
(a) $BA$ is symmetric with respect to the scalar product $\langle A\cdot,\cdot\rangle$, so its eigenvalues are real. Therefore, those of $AB$ are real. Alternative proof: $A^{-1/2}(AB)A^{1/2} = A^{1/2}BA^{1/2}$ is symmetric and thus has real eigenvalues. But as it's similar to $AB$, also $AB$ has real eigenvalues.
(b) By the minmax-theorem, $A$ has at least as many negative eigenvalues as $B$.