Generating a family of monotonic polynomials on $x \in [-1,1]$ given some conditions As part of some ongoing work I'm interested in functions $f(x)$ with the following properties:
$$ x \in [-1,1]$$
$$ f(-1) = -1, \quad f(1) = 1$$
$$ f'(-1) = 0, \quad f'(1) = 0$$
$$ f'(x) \ge 0 $$
where $'$ denotes differentiation with respect to $x$.
I'd love to know whether any families of polynomials, defined through recurrence  or similar means can be constructed which meet these conditions - I'm just not sure how one would go about looking.
If additional constraints would be useful, we could also impose oddness, i.e. that $f(x) = -f(-x)$.
Thanks for the excellent info thus far!
I have one edit to make - I realised that it would also be very helpful if we could add additional constraints that forced the second derivative to also be zero at the ends of the domain, i.e. that
$$ f''(-1) = 0, \quad f''(1) = 0 $$
If anyone had thoughts on how this would modify the suggested families I'd love to read them.
Thanks again!
 A: A Sketch of a Solution 
Ignoring the condition $f'(x)\geq 0$ for all $x\in[-1,+1]$, show that every polynomial $f(x)$ with the required properties must satisfy
$$f(x)=\frac{3x-x^3}{2}+\left(1-x^2\right)^2\,g(x)$$
for some polynomial function $g:[-1,+1]\to\mathbb{R}$.  For the condiion $f'(x)\geq 0$ for each $x\in[-1,+1]$ to hold, you need to impose
$$\frac{3}{2}+\left(1-x^2\right)\,g'(x)-4x\,g(x)\geq 0$$
to be true at all $x\in[-1,+1]$.  For example, if $-\frac32\leq k \leq\frac38$ and $g(x)=k\,x$ for al $x\in[-1,+1]$, then $f$ satisfies all the requirements including monotonicity (and oddness).  A family of odd increasing functions with the required properties with different degrees is $\left\{f_n\right\}_{n=0}^\infty$, where $$f_0(x):=\frac{3\,x-x^3}{2}$$ and
$$f_n(x):=\frac{3\,x-x^3}{2}+\frac{3}{8}\,\left(1-x^2\right)^2\,x^{2n-1}$$
for all $x\in[-1,+1]$ and $n=1,2,\ldots$.  I have not yet tried to prove this, but, using Mathematica, it seems that the polynomials
$$\phi_n(x):=\frac{3\,x-x^3}{2}+\frac{3}{8}\,\left(1-x^2\right)^2\,x^{2n}$$
for all $n=0,1,2,\ldots$ also satisfy all conditions including monotonicity (but not oddness, obviously).
A: This contribution is also for showing that one can invest his/her previous knowledge of curves to have a geometrical view on the objective.
There will be two steps : 


*

*Step 1 : finding a first solution (denoted $f(x)$).

*Step 2 : extend it to have a more general solution (denoted $f_{n,k}(x)$).
Step 1 : For me, looking at your conditions, I immediately thought of a curve that has a maximum in $(1,1)$ and a minimum in $(-1,-1)$, crossing $x$ axis three times $0,-a,a$ with $a>1$. Otherwise said, I was already "seeing" a curve with the odd equation $y=f(x)=kx(x+a)(x-a)=kx(x^2-a^2)=kx^3-ka^2x$.
The 2 unknowns $k$ and $a$ will be determined with the 2 constraints.
Constraint $f'(1)=0$ gives $3k-ka^2=0 \Longrightarrow a^2=3 \ $ (because $k \neq 0$).
Constraint $f(1)=1$ gives $k(1-a^2)=1$, i.e., $k(1-3)=1 \Longrightarrow k=-1/2.$
Thus the answer to step 1 is:
$f(x)=-\frac{1}{2}x(x^2-3) \ \ \ (1)$  (see graphics below)
Step 2 : Here, I had the intuition to add, to the previous function $f(x)$, odd functions that are flat in $(1,0)$ and $(-1,0)$ thus of the form $y=f(x)=kx(x+1)^n(x-1)^n$ with any positive integer value for $n$ and any real positive value for $k$.
Therefore, the general solution I propose is:
$f_{n,k}(x)=f(x) + k x (x^2 - 1)^n \ \ \ (2) \ \ $ where $f(x)$ is defined by (1),
for any $n \in \mathbb{N^*}$ and any $k \in I_n$ (where $I_n$ is described below); moreover this solution preserves the odd character of the function, whereas the solution proposed by @Batominovski (with its own merits) is not odd and not as general as this one (with its parameter $k$).
Remark : the derivative of $g_{n,k}(x):=f_{n,k}(x)-f(x)$ is  $k (x^2-1)^{(n-1)}(1-(2n-1)x^2)$. It is positive if $|x|<\dfrac{1}{\sqrt{2n-1}}$. Set apart the case $n=1$ (for which there is no problem). For any $n>1$, one can always find an interval $I_n=(0,\ell_n)$ such that, when $k \in I_n$, $f'(x)+g'_{n,k}(x)=f'_{n,k}(x)$ is $>0$, fulfilling thus all the constraints.
An example : $f(x)$ in green and $f_{5,1}(x)=f(x)+x(x^2-1)^5$ in red (consider only $x \in [-1,1]$). 

