How to write a polynomial function that has the roots $-2$ and $\sqrt7$? I need to write a polynomial function with integer coefficients that has the roots $-2$ and $\sqrt7$. I'm able to do this correctly when I'm given roots like $-3+i$ & $-3-i$, in which I set the roots equal to zero and then multiply them by one another. However, when I try this with $-2$ and $\sqrt7$ and multiply $x+2$ by $x-\sqrt7$, I get $x^2+2x-\sqrt7 x-2\sqrt7$. I don't know where to go from here, and I don't think that this is the correct next step. What do I do next?

Try multiplying by $x+\sqrt7,$ the conjugate of $x-\sqrt7$, as well.
$(x+\sqrt7)(x-\sqrt7)=x^2-7$ has integer coefficients, and its product with $x+2$ will too.
