Let $a,b\in\mathbb{R}$ and consider the bilinear form $\phi(p,q)=p(a)q(b)+q(a)p(b)$ as an at most second degree polynomial with real coefficients. What is the definiteness of the quadratic form associated with $\phi$ depending on the values of $a$ and $b$?
I wrote down the Gram matrix in the basis $\{1, x, x^2\}$: \begin{bmatrix} 2 & a+b & a^2 + b^2 \\ a+b & 2ab & ab^2+a^2b \\ a^2+b^2 & ab^2+a^2b & 2a^2b^2 \end{bmatrix}
What should I do after that?
Find the leading principal minors. We see that the first minor is positive, the second minor is $4ab - (a+b)^2 = -(a-b)^2$, and the third minor is zero.
Cauchy's interlacing theorem lets us say that, in the case in which $a \neq b$, the quadratic form is indefinite. In particular, we deduce that the Gram matrix has a negative eigenvalue, a positive eigenvalue, and a zero eigenvalue.
In the case with $a = b$, we can write the Gram matrix as $$ 2\pmatrix{1\\a\\a^2}\pmatrix{1 & a & a^2} $$ from which we may deduce that the form is positive semidefinite.