Let $P(x)\in \mathbb{R}[x]$ be of degree $n$ and for any $x \in \left(0,1\right]$, we have $x\cdot P^2(x) \le 1$. Calculate $\max P(0)$.
Let $P(x)$ be a polynomial with real coefficient and with degree $n$ such that for any $x \in \left(0,1\right]$, we have $$x\cdot P^2(x) \le 1$$ Find the maximum of $P(0)$.
Note: $P^2(x) = (P(x))^2$. Any idea how to start?
I suppose we can write $P(x) = xQ(x)+c$ and plug that into inequality and try to say something about $c$. But what then?
Source: KoMaL A.654
Let $x=\sin^2(\theta)$. Then, as
$$x=\frac{1-\cos(2\theta)}{2},$$
we can write $x^k$ in terms of $\cos(2\theta),\cos(4\theta),\cdots,\cos(2k\theta)$, so we may write
$$P(x)=\sum_{k=0}^n a_k\cos(2k\theta).$$
We need
$$|P(x)\sin(\theta)|\leq 1$$
for all $\theta$, and we see that $P(0)=\sum_{k=0}^n a_k$. We claim the maximum value of this quantity is reached with $a_k=2$ everywhere except $a_0=1$. First, we see that this indeed works:
\begin{align}P(x)\sin(\theta) &= \sum_{k=-n}^n \cos(2k\theta)\sin(\theta)\\ &=\frac{1}{2}\sum_{k=-n}^n \big(\sin((2k+1)\theta)-\sin((2k-1)\theta)\big)\\ &=\frac{1}{2}\big[\sin((2n+1)\theta)-\sin((-2n-1)\theta)\big]\\ &=\sin((2n+1)\theta),\end{align}
which obviously has magnitude $\leq 1$. On the other hand, consider the polynomial
$$Q(x)=(x+1)P\left(\frac{x+1}{2}\right)^2-1$$
of degree $2n+1$. For $-1\leq x\leq 1$, we have
$$0\leq \frac{Q(x)+1}{2}\leq 1 \implies |Q(x)|\leq 1,$$
so by the Markov brothers' inequality we have
$$Q'(-1)\leq \max_{-1\leq x\leq 1}|Q'(x)|\leq (2n+1)^2\max_{-1\leq x\leq 1}|Q(x)|\leq (2n+1)^2.$$
Finally, we see
$$Q'(x)=(x+1)\frac{1}{2}\left[2P\left(\frac{x+1}{2}\right)P'\left(\frac{x+1}{2}\right)\right]+P\left(\frac{x+1}{2}\right)^2.$$
$$Q'(-1)=P(0)^2,$$
so
$$P(0)^2\leq (2n+1)^2 \implies P(0)\leq 2n+1,$$
finishing the proof.