<s>[INST] Cubic equation with unknown coefficients given roots I was given this equation. $x^3 + 3px^2 + qx + r=0$. The roots are $1, -1$, and $3$.
Ive tried dividing the equation by $(x-1)$ to get a quadratic to make it easier for me. But that ended up really badly. 
I also inputted the different roots into the equation to get different equations that I could solve. When I tried to prove my answer it turned out to be a flop. 
And I also tried multiplying the three factors and comparing coefficients. It didnt seem right.
 [/INST] We can compare coefficients when we multiply all the roots in factor form:
$$\begin{align}(x-1)(x+1)(x-3) &= x^3-3x^2-x+3\\ &=x^3 + \underset{p}{3(-1)}x^2+\underset{q}{(-1)}x+\underset r{(3)}.\end{align}$$
We then check the roots:
1: $$(1)^3 - 3(1)^2 - 1 + 3 = 1-3-1+3 = 0$$
3: $$(3)^3 - 3(3)^2 - 3 + 3 = 3^3 - 3^3 + 0 = 0$$
I leave it to you to check $-1$.
</s>