# 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.

• It should be $(x-1)(x^2 - 2x-4)$. – Robert Israel May 9 '17 at 15:19
• The book's answer would be for the roots $\{-1, -1+\sqrt{5}, -1-\sqrt{5}\}$, i.e. the negation of the roots. – Jaap Scherphuis May 9 '17 at 15:25
• Looks like my calculation is correct. – gmail user May 9 '17 at 15:34

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: