I have got a question and I would appreciate if one could help! I want to maximize a function that after some algebraic manipulation results in the sum of weighted cosine with different phases.
Assume $\theta_i$ and $b_i$ are known values. I want to calculate $\phi_i$ values so that the following function is maximized: $$\sum_{i=1}^n b_i\cos(\phi_i + \theta_i)$$
Is there any standard way to solve the problem?
any hint/help is appreciated
Just set $ \phi_i = - \theta_i $ if $ b_i \ge 0 $ or $ \phi_i = \pi - \theta_i $ otherwise.
That will make sure every term is maximized.