Constructing a function under certain conditions I would like to construct a function under these conditions:
$$f(0) = f(1) = 0$$
$$f''(x) > 0 ,\forall x$$
$$f(-1) > f(3)$$
This last condition makes it difficult for me to construct it. I've been trying to do it defining a function by parts, taking the function $x(x-1)$ from $-\infty$ to $1$ and then looking for another function from $1$ to $\infty$ that gives the same image, the same first derivative, and the same second derivative. It hasn't to be differentiable three times, so that doesn't matter.
I would like to avoid using a polynomial with infinite terms, but I'm not gonna get picky with it. Any ideas or any advice?? 
Hope we can solve it! Thank you in advance for your help.
 A: We can sketch a function on this kind :

Considering the shape of the curve, a good candidate could be 
$$f(x)=x(x-1)(x^2+ax+b)$$
Suppose that we set arbitrary values for $f(-1)$ and $f(3)$ such as :
$$\begin{cases} f(-1)=A \\ f(3)=B \end{cases}\quad\text{with}\quad A>B$$
Solving the system :
$\quad \begin{cases}
A=-1(-2)((-1)^2-a+b) \\
B=3(3-1)(3^2+2a+b)
\end{cases}\quad$ leads to :
$$\begin{cases}
a=-2-\frac18 A+\frac{1}{24}B \\
b=-3+\frac38 A+\frac{1}{24}B
\end{cases}$$
Of course they are a lot of possibilities. We can chose round numbers , for example 
$$B=24\quad\text{and}\quad A=32$$
which leads to 
$$a=-5\quad\text{and}\quad b=10$$
$$f(x)=x(x-1)(x^2-5x+10)$$
We have to check the sign of $f''$.
$f'=4x^3-18x^2+30x-10$
$f''=12x^2-36x+30$
$f'''=24x-36$
Thus the minimum of $f''$ is at $\quad x=36/24=3/2\quad$ and $\quad f''(3/2)=3$.
So, $f''\geq 3$ for any value of $x.\quad$ As requested $f''>0$.
A very simple example of function satisfying the conditions is :
$$f(x)=x(x-1)(x^2-5x+10)$$ 
IN ADDITION ;
How to obtain as many solutions as you want ?
One have to chose any couple of values of $A$ and $B$ with conditions :
$$B<A\quad\text{corresponding to}\quad f(3)<f(-1)$$
$$B>72+3A-16\sqrt{3A-6}\quad\text{corresponding to}\quad f''>0$$
This means that the point $(A,B)$ can be any point in the red erea (next figure).

The blue curve $B>72+3A-16\sqrt{3A-6}$ is the limit corresponding to $f''=0$.
After choosing a point P$(A,B)$ on the red area, compute $\begin{cases}
a=-2-\frac18 A+\frac{1}{24}B \\
b=-3+\frac38 A+\frac{1}{24}B
\end{cases}$ 
The corresponding fonction is $f(x)=x(x-1)(x^2+ax+b)$.
For example the point $(32,24)$ (black cross on the above figure) leads to $f(x)=x(x-1)(x^2-5x+10)$.
The particular points P$_1$ and P$_2$ are limit cases 
P$_1 \quad:\quad A=B=60-8\sqrt{30}\quad a=-7+\frac43\sqrt{30}\quad,\quad b=22-\frac83\sqrt{30}.$
P$_2 \quad:\quad A=B=60+8\sqrt{30}\quad a=-7-\frac43\sqrt{30}\quad,\quad b=22+\frac83\sqrt{30}.$
A summary is shown on the next figure :

A: The question asks to find a function which satisfies the following $3$ conditions:
$$f\left(0\right) = f\left(1\right) = 0 \tag{1}\label{eq1}$$
$$f''\left(x\right) > 0 \; \forall \; x \in \mathbb{R} \tag{2}\label{eq2}$$
$$f\left(-1\right) > f\left(3\right) \tag{3}\label{eq3}$$
I will use an exponential, but with an undetermined base for now as it's uncertain what might work best. Also, I have the exponent be $-x$ to help accommodate \eqref{eq3}. In addition, I will add a linear expression in $x$ to handle the various other conditions. As such, consider a fairly general function as defined below
$$f\left(x\right) = a^{-x} + bx + c \tag{4}\label{eq4}$$
where $b, c \in \mathbb{R}$ are constants, and $a \gt 0$, but with $a \neq 1$. Note I don't really need any coefficient for $a^{-x}$ as I could divide out any non-zero coefficient without it changing anything as the only specific values are both $0$. The first part of \eqref{eq1} requires that
$$1 + c = 0 \Rightarrow c = -1 \tag{5}\label{eq5}$$
Thus, using this, the second part of \eqref{eq1} requires that
$$a^{-1} + b - 1 = 0 \Rightarrow a^{-1} + b = 1 \tag{6}\label{eq6}$$
The condition in \eqref{eq2} becomes
$$f''\left(x\right) = \left(\log a\right)^2 a^{-x} \gt 0 \; \forall \; x \in \mathbb{R} \tag{7}\label{eq7}$$
This is always true. Next, the inequality in \eqref{eq3} becomes
$$a - b + c \gt a^{-3} + 3b + c \tag{8}\label{eq8}$$
Moving all of the terms on the right to the left gives
$$a - a^{-3} - 4b \gt 0 \tag{9}\label{eq9}$$
From \eqref{eq6}, we get that
$$b = 1 - a^{-1} \tag{10}\label{eq10}$$
Substitute this into \eqref{eq9} to get
$$a - a^{-3} - 4 + 4a^{-1} \gt 0 \tag{11}\label{eq11}$$
Note there is a certain minimum value of $a$ as when $a$ becomes very large, \eqref{eq11} becomes true. I haven't bothered to determine what this minimum value is, as it's not important, but note that the Euler's number $e$ (i.e., the base of the natural logarithm) doesn't work, but $a = 3$ does as it makes the left side of \eqref{eq11} become $\frac{8}{27}$. To have the cofficients all be relatively small numbers, plus to make the arithmetic a bit easier, I will instead choose $a = 10$, so the left side of \eqref{eq11} now becomes $6.399$. From \eqref{eq10}, this gives that $b = 0.9$. Finally, from \eqref{eq5}, we already have that $c = -1$. Putting this altogether, we have the function
$$f\left(x\right) = 10^{-x} + 0.9x - 1 \tag{14}\label{eq14}$$
You can quite easily confirm this equation works with all $3$ conditions.  Also, keep in mind this is just one possible solution based on the technique I've used here, not to mention what you may be able to derive using other techniques. For example, a somewhat unnecessarily more complicated equation which I derived earlier is
$$f\left(x\right) = 10^{-x} + dx^2 + \left(0.9 - d\right)x - 1 \tag{15}\label{eq15}$$
for any $0 \le d \lt \frac{6.399}{4}$. Using $d = 0$ gives \eqref{eq14}. I also used the specific example of $d = 1$ to get
$$f\left(x\right) = 10^{-x} + x^2 - 0.1x - 1 \tag{16}\label{eq16}$$
Finally, note that the function in \eqref{eq14}, or at least one basically the same, was originally put in a fairly short answer by Siong Thye Goh which I saw soon after this question was posted. I'm not sure why this answer is no longer there, but I just wanted to acknowledge seeing it initially before I determined my answer, including my reasoning about it and what other sorts of related functions you can also use.
