# How to construct a polynomial which is strictly negative everywhere, except for finitely many roots?

Given a finite sequence of real vectors $$x_1, x_2, \dots, x_m \in \mathbb{R}^d$$, how do I construct a polynomial $$p \colon \mathbb{R}^d \to \mathbb{R}$$, such that $$p(x) = 0$$ if $$x \in \{ x_1, \dots, x_m \}$$ and $$p(x) < 0$$ otherwise? Is that even possible? I only know how to construct a polynomial which has roots at $$x_1, x_2, \dots, x_m$$, but behaves »arbitrarily« elsewhere, e.g. by defining $$p(x) = \left(\sum_i x_i - x_{1i}\right) \cdot \left(\sum_i x_i - x_{2i}\right) \cdots \left(\sum_i x_i - x_{mi}\right).$$

• sure, $-\prod_k (x-x_k)^2$ – mathreadler May 15 at 12:45

## 1 Answer

For example $$P(x)=-\prod\limits_{i=1}^m (x-x_i)^2$$

• Heh you were fast. – mathreadler May 15 at 12:45
• @lisyarus: are you sure? – TonyK May 15 at 12:52
• @lisyarus A sum wouldn't work... In that case how would you guarantee that $p(x_i)=0, \forall i$? Take just two points , say $-1, 1$. Would you say that $p(x)=-(x+1)^2-(x-1)^2$ vanishes at $x =-1,1$? – PierreCarre May 15 at 12:52
• @lisyarus Maybe we just delete all the comments? – PierreCarre May 15 at 12:57