What is the value of $p^2q + q^2r + r^2p$ for the given cubic equation? 
If $p$, $q$, $r$ are the real roots of the equation $x^3-6x^2+3x+1=0$, then find the value of $p^2q + q^2r + r^2p$.

My Attempt:
I tried $(p+q+r)(pq+qr+rp)$ but couldn't really figure out what to do with the extra terms. The roots are also not trivial to find.
Any help would be appreciated.
 A: That's not a symmetric function, so you can't express it as a polynomial in $p+q+r$,
$pq+pq+qr$ and $pqr$, but it is "cyclic". One method: let
$$A=p^2q+q^2r+r^2p$$
and
$$B=pq^2+qr^2+rp^2.$$
Then $A+B$ and $AB$ are symmetric functions, and can be expressed in terms of $p+q+r$,
$pq+pq+qr$ and $pqr$. Once you have done that you can obtain $A$ and $B$ as roots
of the quadratic equation
$$y^2-(A+B)y+AB=0.$$
A: As already noted, $A(p,q,r)=p^2 q + q^2 r + r^2 p$ is not a symmetric function of the roots, but if we couple it with $B(p,q,r)=q^2 p + r^2 q + p^2 r$ we have that
$$ A+B = pq(p+q)+qr(q+r)+pr(p+r) = (pq+qr+pr)(p+q+r)-3pqr$$
$$ AB = pqr(p^3+q^3+r^3)+3 p^2 q^2 r^2+\frac{1}{2}(p^3+q^3+r^3)^2-\frac{1}{2}(p^6+q^6+r^6). $$
By the Cayley-Hamilton and Jordan's theorems
$$ p^n+q^n+r^n = \text{Tr}\begin{pmatrix}0 &0 &-1 \\ 1 & 0 & -3 \\ 0 & 1 & 6\end{pmatrix}^n$$
so $p^3+q^3+r^3=159$ and $p^6+q^6+r^6=25113$. This leads to
$$ A+B = 6\cdot 3+3 = 21$$
$$ AB = (-1)\cdot 159 + 3(-1)^2 + \frac{1}{2}(159)^2-\frac{1}{2}(25113)=-72 $$
so the value of $p^2 q+q^2 r + r^2 p$ is either $\color{red}{-3}$ or $\color{red}{24}$.
All the roots are real since the discriminant equals $729=3^6$.
I will outline a trigonometric solutions since it might be interesting to know and apply in similar circumstances. The equation $x^3-6x^2+3x+1=0$ is equivalent to
$$ 6\sqrt{3}\,T_3\left(\frac{x-2}{2\sqrt{3}}\right) = 9,\qquad T_3\left(\frac{x-2}{2\sqrt{3}}\right) = \frac{\sqrt{3}}{2} $$
hence by setting $x=2+2\sqrt{3}\cos\theta $ we have that the roots are given by
$$ 2+2\sqrt{3}\cos 10^\circ,\quad 2+2\sqrt{3}\cos 130^\circ,\qquad 2+2\sqrt{3}\cos 250^\circ $$
which are not difficult to approximate numerically. We know in advance that both $A+B$ and $AB$ are integers, so we may recover $A+B=21$ and $AB=-72$ also from approximated roots.
