Maximum of a trigonometric Polynomial 
Given 
  $$x+y+z=\pi$$
  $$3\sin(x)+4\sin(y)+18 \sin(z)=A$$
  Question：find maximum of $A$.

I spend so many time on this question.
answer is $ 35\sqrt{7} /4$, but why?

Assuming that $x,y,z>0$, you can write this as:
$$3\sin(x)+4\sin(y)+18 \sin(\pi - x - y)=A$$
Now find when the derivatives:
$$\frac{\partial A}{\partial x}, \frac{\partial A}{\partial y}$$
are equal to zero. You'll get:
$$3 \cos(x) + 18 \cos(x + y)= 0,\ 4 \cos(y) + 18 \cos(x + y) = 0$$
Which leads to:
$$y=\arccos\left(\frac{3 \cos x}{4}\right)$$
Plugging back in to the $\cos(x+y)$ term, and using $\cos(\arctan x)=1/\sqrt{1+x^2}$, you'll get a quadratic in $t = \cos x$:
$$3 t + \frac{27 t^2}{2} - 18 \sqrt{1 - t^2} \sqrt{1 - 9 t^2/16} = 0$$
Or:
$$t^2 (229 + 36 t) = 144 \ \to \ t=\cos x = 3/4$$
Finally, plug in the values $(x = \arccos 3/4, y = \arccos 9/16)$ into the original function. The trick here is to note that:
$$\arccos\alpha \pm \arccos\beta = \arccos\left(\alpha\beta \mp \sqrt{(1-\alpha^2)(1-\beta^2)} 
\right)$$
$$\sin(\arccos x) = \sqrt{1-x^2}$$
So that:
$$18\sin\left(\arccos 3/4 + \arccos 9/16\right) = \frac{27 \sqrt{7}}{4}$$
And:
$$A_{max} = \frac{3 \sqrt{7}}{4} + \frac{5 \sqrt{7}}{4} + \frac{27 \sqrt{7}}{4} = \frac{35 \sqrt{7}}{4}$$
