Relation between Fourier components of a positive function Here's a problem that has recently come up in my physics research:
Let f be a function on [0, 2 $\pi$], which yields positive real numbers.
Let the integral of $\int_0^{2\pi}f(x)= 1$. (Just for the sake of normalization).
Let the integral of  $\int_0^{2\pi}f(x)\sin(x)= r$ (some real number between -1 and 1.)
Question:  Max($\int_0^{2\pi}f(x)\cos(x))=$?  The maximum is to be taken across all functions satisfying the above criteria.
 A: Let's put this problem back into physics territory from whence it came. Think of $f(t)$ as density of unit circle at the point with polar angle $t$. Then the constraints are


*

*Density is nonnegative

*Total mass $m$ is $1$

*The center of mass has $y$-coordinate equal to $r$ (it's $\frac{1}{m}\int_0^{2\pi}f(t)\sin t\,dt$ since $\sin t$ is the $y$-coordinate of the point with polar angle $t$).


And you want to maximize the $x$-coordinate of the center of mass. Now the solution is obvious: 

The best you can do is put all the mass into the point $(\sqrt{1-r^2},r)$, i.e., let  $f$ be the $\delta$-function at point $t_0$ with $(\cos t_0,\sin t_0)=(\sqrt{1-r^2},r)$. If the $\delta$-function is not allowed, approximate it by tall skinny rectangles centered at $t_0$, for which $\int_0^{2\pi}f(t)\cos t\,dt $ will approach the (unattainable) supremum $\sqrt{1-r^2}$.
Formal  proof
Let $t_0$ be as above. For all $t\in [0,2\pi]$ we have 
$$\cos t \cos t_0+\sin t\sin t_0 = \cos (t-t_0)\le 1$$
Multiply by $f(t)$ and integrate: 
$$\int_{0}^{2\pi} f(t) (\cos t \cos t_0+\sin t\sin t_0)\,dt  \le 1$$
hence
$$
\int_{0}^{2\pi} f(t) \cos t\,dt \le \frac{1}{\cos t_0}\left( 1 - \sin t_0  \int_{0}^{2\pi} f(t)  \sin t\,dt\right) =\frac{1-r^2}{\sqrt{1-r^2}}=\sqrt{1-r^2}
$$
