Sum of weighted cosine functions

667 Views Asked by At

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

2

There are 2 best solutions below

1
On BEST ANSWER

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.

1
On

If $b_i$ is positive: $$ \max\left\{ \sum_{i=1}^n b_i\cos(\phi_i+\theta_i)\right\}=\sum_{i=1}^n b_i \max\left\{\cos(\phi_i+\theta_i)\right\}=\sum_{i=1}^n b_i, $$ as the $\cos$ function cannot exceed 1. This maximum is reached for $$ \phi_i=2k\pi-\theta_i, \quad k\in \mathbb{Z}. $$ If $b_i$ is negative, with a similar argument: $$ \phi_i=\pi+2k\pi-\theta_i, \quad k\in \mathbb{Z}. $$