Determine a polynomial function with some information about the function

algebra-precalculusfunctionspolynomials

I am working through some exercises at the end of a textbook chapter on polynomial functions. Till now the questions have been about providing answers based on a given polynomial function. However, with this particular question I am to work backwards and define the polynomial based on some information about it:

use the information about the graph of a polynomial function to determine the function. Assume the leading coefficient is $1$ or $–1$. There may be more than one correct answer.

The $y$-intercept is $(0, 0)$, the $x$-intercepts are $(0,0)$, $(2,0)$, and the degree is 3.
End behavior: As $x$ approaches $-\infty$, $y$ approaches $-\infty$, as $x$ approaches $\infty$, $y$ approaches $\infty$.

What I can tell is that since it's an odd degree, the functions will approach $-\infty$ or $+\infty$ either side of $x=0$ but that's already provided in the description.

Tried writing it down as: $y = x(x-2)$ since the root of $(0,0)$ is $0$ (right) and the root of $(2,0)$ is $-2$ (right?).

The provided answer is $x^3-4x^2-4x$.

How can I arrive at this solution with the information provided? Granular baby steps appreciated if possible?

Best Answer

There are two $x$-intercepts, the degree is at least $2$, from the behavior at $x$ approach $-\infty$ and $\infty$, the degree is at least $3$.

If it is cubic, the leading coefficient is $1$.

$$y=x(x-2)(x-c)$$

Since there are only $2$ distinct roots, $c$ is either $0$ or $2$.

The solution provided by the book is obtained by taking $c=2$.

Another alternative solution is $x^2(x-2)$.