<s>[INST] A polynomial that satisfies $x^pf(1-x) + (1-x)^pf(x) = 1$ The context of this question is the construction of the Daubechies wavelet.
$f$ is a polynomial of degree $p-1$ which satisfies the equation:
$$
x^pf(1-x) + (1-x)^pf(x) = 1 \tag{1}
$$
Since
$$
f(x) = \frac{1}{(1-x)^p} - \frac{x^p}{(1-x)^p} f(1-x)
$$
and
$$
\frac{1}{(1-x)^p} = \sum_{k=0}^{\infty} \begin{pmatrix} p-1+k \\ k \end{pmatrix} x^k
$$
it is argued that
$$
f(x) = \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix} x^k + O(x^p) = \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix} x^k
$$
where higher order terms are zero because $f$ is degree $p-1$.

My problem is that I can't seem to verify that $(1)$ holds with this $f$. I've tried expanding the $(1-x)^p$ and $(1-x)^k$ terms. This turns into a mess. I've tried doing induction on $p$. Again, I get nowhere. I've tried other approaches with no success. I feel like I'm missing something simple!
Here is an example of one of my attempts:
\begin{align*}
x^pf(1-x) + (1-x)^pf(x) &= x^p \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix} (1-x)^k + (1-x)^p \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix} x^k \\
&= \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix}\left( x^p(1-x)^k + x^k(1-x)^p \right) \\
&= \sum_{k=0}^{p-1} \begin{pmatrix} p-1+k \\ k \end{pmatrix}\left( x^{p-k}[x(1-x)]^k + [x(1-x)]^k(1-x)^{p-k} \right)
\end{align*}
I get to this point, and I can't help but thinking of using the Binomial Theorem, but I cannot seem to manipulate the factorial terms in nice way.
 [/INST] define $g(x) =x^pf(1-x)$. so
$g(x)+g(1-x)=1$. make $x=1/2+y$, and we have
$g(x+1/2)+g(1/2-x)=1$
define $P(x)=g(x+1/2)$, and we have
$P(x)+P(-x)=1$, being $P(x)$ a polynomial, it must have the form $P(x)=1/2+\sum_{n=0}^{p-1} a_n*x^{2n+1}$
then $f(x) =P(1/2-x)/(1-x)^p$.
</s>