Symmetric Polynomials
摘要
xA straightforward solution would be as follows: find the roots x1, x2 using the well-known formula, compute their cubes and take their sum. But this is quite a long process, and it is possible to make a mistake during the computations, so it is better to proceed in a different way: observe that, according to Viete’s theorem, we have x1 + x2 = −p, x1x2 = q.