Is this function necessarily a polynomial?

Solution 1:

Consider $f(x) = e^x(x-x_0)^k$.

Solution 2:

For $$f(x) = \sin x^3$$ you have $$\begin{align} f(0) & = 0 \\ f'(0) & = 0 \\ f''(0) & = 0 \\ f'''(0) &= \color{red}6 \end{align}$$

Solution 3:

With $x=x_0$ for simplicity,

$$ f(x) = e^x - \sum_{n=0}^{k-1} \frac{x^n}{n!} $$

$e^x$ is not special; the same idea works for any $k$-times differentiable function whose $k$-th derivative doesn't vanish.

Works with functions whose $k$-th derivative does vanish too; e.g. add in a $x^k$ term.

Solution 4:

Why ?

With the given constraints, any function with a convergent Taylor development

$$f(x):=\sum_{j=k}^\infty\frac{a_k(x-x_0)^k}{k!}$$

can do. Such functions are "polynomials of infinite degree", which allows them not to be ordinary polynomials.

Another way to construct one is by taking successive antiderivatives of an arbitrary function $g(x)$ such that $g(x_0)\ne0$,

$$\int_{x_0}^x\int_{x_0}^x\cdots\int_{x_0}^x g(x)\,dx\,dx\cdots\,dx.$$

A constant function will indeed generate a polynomial, but a non-polynomial function will generate another non-polynomial function, because only polynomials have polynomial derivatives.