Maximize functional integral with constraints We have a value $S$ given by
$$ S = \int_0^T \cos((\Omega + \delta \omega(t)) t) \, dt \, .$$
and we want to choose $\delta \omega(t)$ to maximize $S$, with the constraint $\left \lvert \delta \omega(t) \right \vert < C \ll \Omega$ where $C$ is a constant.
Intuitively, we should slow the oscillation down when $\cos \approx 1$ and speed it up when $\cos \approx -1$, so that the integral acquires more positive contribution than negative contribution.
But how does one solve this problem in detail?
Is there a way to maximize a functional with constraints?

You could use the identity $\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$ and perform a Taylor expansion as $|\delta\omega|\ll\Omega$. This works only if $T$ is small with regard to $\Omega^{-1}$. More specifically:
\begin{align}
S&=\int_0^T\cos((\Omega+\delta\omega)t)\,dt\\
&=\int_0^T\cos(\Omega t)\cos(\delta\omega t)\,dt-\int_0^T\sin(\Omega t)\sin(\delta\omega t)\,dt\\
&\sim\int_0^T\cos(\Omega t)\left(1-\frac{(\delta\omega t)^2}2\right)\,dt-\int_0^T\sin(\Omega t)\delta\omega t\,dt
\end{align}
Some terms don't depend on $\delta\omega$ so really the functional simplifies to:
$$S\sim-\frac12\int_0^T\cos(\Omega t)(\delta\omega t)^2\,dt-\int_0^T\sin(\Omega t)\delta\omega t\,dt$$
Maybe this helps, I'm not sure. But at least it seems more tractable than the equation in the question.
If $T$ is large compared to $\Omega^{-1}$ then likely you use a different approach and represent $\delta\omega$ as a Fourier series so it is tractable using linear independence of the basis and the $\cos(\Omega t)$ and $\sin(\Omega t)$ weights.
If $T$ is close to $\Omega$ then you need to think more about it!
