calculate polynomial equation from roots I want to derive a polynomial equation from the following roots:
$$\left\{-1,1+\sqrt5,1-\sqrt5\right\}$$
Below is my attempt.
\begin{align}f(x)&=(x+1)( (x-1) - \sqrt5 ) ( (x-1) + \sqrt5 )\\
&=(x+1)( (x-1)^2  - 5)\\
&=(x+1)(x^2 - 2x - 4)\end{align}
And the answer in the book is $(x+1)(x^2 + 2x -4)$. I'm not sure what's correct?
I'm taking a Math correspondence. The book has very little explanation and few errors. My hunch is that, the answer is wrong. Please advice.
EDIT
The first root is $-1$ instead of $1$. Sorry about typo.

When we have the roots $\{a,b,c\}$, we can write $$f(x)=(x-a)(x-b)(x-c)$$We have the roots $\{-1,1+\sqrt 5,1−\sqrt5\}$ so we can write the equation in the following way:
\begin{align}f(x)&=(x-(-1))(x-(1+\sqrt5))(x-(1-\sqrt5))\\
&=(x+1)(x-1-\sqrt5)(x-1+\sqrt5)\\
&=(x+1)(x^2-x+x\sqrt5-x+1-\sqrt5-x\sqrt5+\sqrt5-5)\\
&=(x+1)(x^2-(1-\sqrt5+1+\sqrt5)x+(1+-\sqrt5+\sqrt5-5))\\
&=(x+1)(x^2-2x-4)\\
&=x^3-2x^2-4x+x^2-2x-4\\
&=x^3-x^2-6x-4\end{align}
We can verify this with WolframAlpha and see that it is correct
