# Largest possible value of trigonometric functions

Find the largest possible value of

$$\sin(a_1)\cos(a_2) + \sin(a_2)\cos(a_3) + \cdots + \sin(a_{2014})\cos(a_1)$$

Since the range of the $\sin$ and $\cos$ function is between $1$ and $-1$, shouldn't the answer be $2014$?

• You cannot have $\sin (a_1)=\cos (a_1)=1$ so the maximum is not 2014. Aug 8, 2018 at 8:24
• Fairly obviously it won't exceed $2014$ but it does not necessarily achieve it either. Aug 8, 2018 at 8:24

Let $a_{2015}=a_1.$

Thus, by AM-GM $$\sum_{k=1}^{2014}\sin{a_k}\cos{a_{k+1}} \leq\sum_{k=1}^{2014}|\sin{a_k}||\cos{a_{k+1}}| \le$$ $$\leq\sum_{k=1}^{2014}\frac{\sin^2a_k+\cos^2a_{k+1}}{2}=\sum_{k=1}^{2014}\frac{\sin^2a_k+\cos^2a_k}{2}=\frac{2014}{2}=1007.$$

The equality occurs for $a_i=45^{\circ},$ which says that $1007$ is a maximal value.

• You mention AM-GM, which makes me expect to see a big sum turn into a big product at some point. But it never happens. Something clever is clearly going on in the third inequality -- but what? Could you expand this just a bit more? Aug 8, 2018 at 13:19
• @Daniel Wagner I used $ab\leq\frac{a^2+b^2}{2}.$ Aug 8, 2018 at 13:32
• Ah! Very simple -- I kept trying to figure out where the calculation of a 2014th root went. Thanks for the clarification. Aug 8, 2018 at 13:35
• You are welcome! Aug 8, 2018 at 13:37

From

$$f_n(a) = \sum_{k=1}^n \sin a_k \cos a_{k+1}$$

with $a_{n+1} = a_1$

the stationary points are located at the solutions for

$$\frac{\partial }{\partial a_k}f_n(a) = -\sin a_{k-1}\sin a_k + \cos a_k \cos a_{k+1} = 0$$

and then

$$\tan a_n\tan a_{n-1}\cdots\tan a_{2} = \cot a_1$$

or

$$\tan a_n\tan a_{n-1}\cdots\tan a_{2}\tan a_1 = 1$$

or

$$\prod_k\sin a_k = \prod_k\cos a_k$$

which is obtained for $a_k = \frac{\pi}{4}$ when

$$f_n(a) = \frac n2$$

• Nice answer. The calculus is easier than it looks at first. Is it obvious that $a_k=\frac{\pi}{4}$ is the absolute maximum? The $\tan a_n\tan a_{n-1}\cdots\tan a_{2}\tan a_1 = 1$ may have many solutions but I guess they are not all absolute maximum... Aug 8, 2018 at 13:49
• @Taladris There are many relative extrema. For instance for $n = 3$ we have: $\left\{-\frac{3}{2},\frac{3}{2},-\sqrt{2},\sqrt{2}\right\}$ but with some additional considerations like symmetry... Aug 8, 2018 at 14:44