Write a polynomial function of least degree with rational coefficients so that ​P(x)=0 has the given roots.

x=-4, x=10

To create a polynomial function with the given roots, we need to factorize it with the given roots.

Given roots: x = -4, x = 10

To create a polynomial with these roots, we write:

(x + 4)(x - 10) = 0

Expanding the equation gives:

x^2 + 4x - 10x - 40 = 0

Combining like terms, the polynomial function is:

P(x) = x^2 - 6x - 40