$x_1,x_2,x_3$ are the roots of the polynomial $x^3+px+q \in \mathbb{R}[x]$ with real coefficients.
Express through $p,q$ the following symmetric rational function $$ \sum\left(x_1,x_2,x_3\right) = \frac{1}{x_1^2 + x_2^2} + \frac{1}{x_2^2 + x_3^2} + \frac{1}{x_3^2 + x_1^2} $$ of $x_1,x_2,x_3$.
Any tips? I've tried anything that crossed my mind, but I couldn't cope with that.
$0=x_1+x_2+x_3$, $p=x_1x_3+x_1x_2+x_2x_3$ and $q=-x_1x_2x_3$
Now $x_1^2+x_2^2+x_3^2=(x_1+x_2+x_3)^2-2(x_1x_2+x_1x_3+x_2x_3)=-2p$.
So your rational expression is
$$\frac{1}{-2p-x_1^2}+\frac{1}{-2p-x_2^2}+\frac{1}{-2p-x_3^2}$$
$$=-\frac{(2p+x_1^2)(2p+x_2^2)+(2p+x_1^2)(2p+x_3^2)+(2p+x_2^2)(2p+x_3^2)}{(2p+x_1^2)(2p+x_2^2)(2p+x_3^2)}$$
Now $x_1^2x_2^2+x_1^2x_3^2+x_2^2x_3^2=(x_1x_2+x_1x_3+x_2x_3)^2-2(x_1+x_2+x_3)x_1x_2x_3=p^2$
$$=-\frac{12p^2+4p(x_1^2+x_2^2+x_3^2)+(x_1^2x_2^2+x_1^2x_3^2+x_2^2x_3^2)}{8p^3+4p^2(x_1^2+x_2^2+x_3^2)+2p(x_1^2x_2^2+x_1^2x_3^2+x_2^2x_3^2)+x_1^3x_2^3x_3^3}$$
$$=-\frac{12p^2+4p(-2p)+p^2}{8p^3+4p^2(-2p)+2p(p^2)+q^2}=-\frac{5p^2}{2p^3+q^2}$$