Does this polynomial exist? I'm looking for a polynomial $P(x)$ with the following properties:


*

*$P(0) = 0$.

*$P\left(\frac13\right) = 1$

*$P\left(\frac23\right) = 0$

*$P'\left(\frac13\right) = 0$

*$P'\left(\frac23\right) = 0$


From 1 and 3 we know that $P(x) = x\left(x - \frac23\right)Q(x)$. From 4 and 5 we know that $P'(x) = \alpha\left(x - \frac13\right)\left(x - \frac23\right)$.
$$
\begin{align}
P(x) & = \alpha\int\left(x - \frac13\right)\left(x - \frac23\right)\text{d}x \\
& = \alpha\left(\frac13x^3 - \frac12x^2 + \frac29x + \text{C}\right)
\end{align}
$$
Now 1 implies that the constant is $\text{C} = 0$, but 3 implies that the constant is $\text{C} = -\frac{2}{81}$. Am I doing something wrong or does this polynomial not exist? 
If it doesn't exist, how close could I get to making a polynomial that satisfies these 5 conditions?
 A: This is the same solution as Ross's, but from a more linear algebra focused perspective.
You have five linearly independent conditions, so a polynomial with five parameters should work.
$P(x) = ax^4 + bx^3 + cx^2 + dx + e$
Now your five conditions can be written as such:


*

*$e = 0$

*$a(\frac{1}{3})^4 + b(\frac{1}{3})^3 + c(\frac{1}{3})^2 + d(\frac{1}{3}) + e = 1$

*$a(\frac{2}{3})^4 + b(\frac{2}{3})^3 + c(\frac{2}{3})^2 + d(\frac{2}{3}) + e = 0$

*$4a(\frac{1}{3})^3 + 3b(\frac{1}{3})^2 + 2c(\frac{1}{3}) + d = 0$

*$4a(\frac{2}{3})^3 + 3b(\frac{2}{3})^2 + 2c(\frac{2}{3}) + d = 0$


We can group these five equations together in matrix-vector form as 
$\left( \begin{array}{ccccc}
0 & 0 & 0 & 0 & 1 \\
\frac{1}{81} & \frac{1}{27} & \frac{1}{9} & \frac{1}{3} & 1 \\
\frac{16}{81} & \frac{8}{27} & \frac{4}{9} & \frac{2}{3} & 1 \\
\frac{4}{27} & \frac{3}{9} & \frac{2}{3} & 1 & 0 \\
\frac{32}{27} & \frac{12}{9} & \frac{4}{3} & 1 & 0 \end{array} \right) \cdot \left( \begin{array}{c} a \\ b \\ c \\ d \\ e \end{array} \right) = \left( \begin{array}{c} 0 \\ 1 \\ 0 \\ 0 \\ 0 \end{array} \right) $
Use a computerized linear algebra solver to find
$\left( \begin{array}{c} a \\ b \\ c \\ d \\ e \end{array} \right) = \left( \begin{array}{c} 81 \\ -108 \\ 36 \\ 0 \\ 0 \end{array} \right)$
So your polynomial is $P(x) = 81x^4 - 108x^3 + 36x^2$. This is the same one Ross Millikan found.
The advantage of this method is that it is more flexible. You could start with $P(x) = ax^{50} + bx^{42} + cx^9 + dx^2 + e$ if you wanted a find a degree 50 polynomial that would also work. You could even start with a function that wasn't polynomial at all. The disadvantage is that if you have more than 4 parameters or so then solving the system will be too cumbersome to do by hand, and you'll have to rely on a computer.
A: Certainly higher orders could.  Since you have five conditions, you could expect a quartic to  work.  The condition that $P(\frac 23)=P'(\frac 23)=0$ gives a factor $(x-\frac 23)^2$, so we expect $P(x)=x(x-\frac 23)^2(ax+b)$  Now apply the conditions at $x=\frac 13$ to get $a$ and $b$.  We get $P(\frac 13)=\frac {a+3b}{81}=1, P'(\frac 13)=-\frac b9$, so $b=0, a=81$ and $P(x)=81x^2(x-\frac 23)^2$
A: Hint: $P'(a)=0$ implies $\Big(a,P(a)\Big)$ is either among the extrema, or an inflection point. My advice for you would be to draw a simple graphic. It is clear that we area dealing with something that is at least a cubic. Also, the addition of any other root or maxima or inflection points does not contradict the existence of the ones we already know about, so it is clear that an infinity of such polynomials exist for any degree greater than three. But the cubic is uniquely determined. Why ? Because $\dfrac23$ is a double root. So $P(x)=ax\bigg(x-\dfrac23\bigg)^2$. Now, what is the value of a ?
