<s>[INST] Verify triginometric result of cubic equation $x^3-x^2-p^2x+p^2=0$ Consider the following cubic function,
$$f(x):=(x+p)(x-p)(x-1)=x^3-x^2-p^2x+p^2$$
where $p\in(0,1)$ is a fixed parameter.
Then the sum of the absolute value of the three roots is
$$S_1:=1+2p$$
On the other hand, if I use the trigonometric root formula to calculate the absolute sum, I obtained
$$ S_2:=\frac{4}{3} \sqrt{1+3p^2}\, \cos \Bigg(\frac{1}{3}\arccos\Bigg(\frac{1-9p^2}{(1+3p^2)^{\frac{3}{2}}}\Bigg)-\frac{\pi}{3}\Bigg)+\frac{1}{3}$$
Then, obviously, the $\textbf{following is true}$ $$S_1=S_2 \quad \forall p\in(0,1)$$ 
$\textbf{Question:}$ Is there a way to verify $S_1=S_2$ by direct calculation?
(I've tried with the Taylor series of the $\arccos(x)$ but I've not succeded.)
 [/INST] Let
$$ \theta = \arccos \left(\frac{1-9p^2}{(1+3p^2)^{\frac{3}{2}}} \right)-\pi$$
Then,
$$ S_2=\frac{4}{3} \sqrt{1+3p^2}\, \cos \frac{\theta}3+\frac{1}{3}\tag1$$
and
$$\cos\theta =-\frac{1-9p^2}{(1+3p^2)^{\frac{3}{2}}}=4\cos^3\frac{\theta}3 - 3\cos\frac{\theta}3$$
Factorize
$$\left(2\cos\frac{\theta}3 - \frac{1+3p}{\sqrt{1+3p^2}} \right)
\left(2\cos^2\frac{\theta}3 + \frac{1+3p}{\sqrt{1+3p^2}} \cos\frac{\theta}3 
+\frac{3p-1}{1+3p^2}\right) =0 $$
to get
$$\cos\frac{\theta}3 = \frac{1+3p}{2\sqrt{1+3p^2}}$$
Plug into (1) to obtain
$$ S_2
=\frac{4}{3} \sqrt{1+3p^2}\cdot \frac{1+3p}{2\sqrt{1+3p^2}}+\frac{1}{3}
=1+2p=S_1
$$
</s>