Can you prove or disprove the following?
The periodic function $f:[0,2\pi]\to \mathbb{R}$ \begin{align*} f(x):=\cos(x)\sum_{k=0}^\infty \bigg(\prod_{l=1}^{k}\frac{2l}{2l+1}\bigg)\sin^{2k+1}(x) \end{align*} is continuous and attains therefore its maximum on the interval $[0,2\pi]$. Just to make notation clear: The empty product $\prod_{l=1}^0$ is set to 1.
For $x\ne\frac{\pi}{2}$, $f$ is continuous because the sum converges. This follows since the geometric series $\sum_{k=0}^\infty \sin^k(x)$ converges. We have to show continuity for $x=\frac{\pi}{2}$.
EDIT 2:
We claim that it is possible to show that \begin{align*} \cos(x)\sum_{k=0}^\infty \bigg(\prod_{l=1}^{k}\frac{2l}{2l+1}\bigg) \sin^{2k+1}(x)\leq \cos(x)\sum_{k=0}^\infty \frac{\sin^{2k+1}(x)}{\sqrt{2k+1}}=:g(x). \end{align*} Hence, it is left to prove that $g(x)$ is contiuous in $\frac{\pi}{2}$.
It is known that the function \begin{align*} \cos(x)\sum_{k=0}^\infty \sin^k(x)=\begin{cases} \frac{\cos(x)}{1-\sin(x)} & \text{for }\quad x\ne \frac{\pi}{2}\\ 0 & \text{for }\quad x= \frac{\pi}{2} \end{cases} \end{align*} is not continous.
Notice, in EDIT 1, there was a mistake. It should be but the square root as it is now, not the k-root.