Find maximum of $\sin{x}+\sin{y}-\sin{(x+y)}+\sqrt{3}\left(\cos{x}+\cos{y}+\cos{(x+y)}\right)$ The trick is that we can't use derivatives.
If we look at $\cos{x}+\cos{y}+\cos{(x+y)}$, the function cos attains its maximum of $1$ at $0$ radians, so $x=y=0$ and $x+y=0$ and the maximum of $\cos{x}+\cos{y}+\cos{(x+y)}=1+1+1=3$.
What about part of the function with $\sin$? If we use the same logic: $\sin$ attains its maximum of $1$ at $\pi/2$ radians, so $x=y=\pi/2$, so $x+y=\pi$, we get the maximum of $\sin{x}+\sin{y}-\sin{(x+y)}=1+1-0=2$, but I guess it's not true, cause Wolfram says the maximum is $0$.
Any hint would help a lot!! thank you!
 A: $$
\sin{x}+\sin{y}-\sin{(x+y)}+\sqrt{3}[\cos{x}+\cos{y}+\cos{(x+y)}]
\\=\sin x+\sin y -\sin(x+y)+\tan \frac\pi3[\cos x+\cos y+\cos(x+y)]\\
=\frac1{\cos\dfrac\pi3}[\sin(x+\frac\pi3)+\sin(y+\frac\pi3)+\sin(\frac\pi3-x-y)]\\
=\frac1{\cos\dfrac\pi3}[\sin(x+\frac\pi3)+\sin(y+\frac\pi3)+\sin[ \pi-(\frac{\pi}3+x)-(\frac\pi3+y)]\\
$$
The expression in the square bracket is the sum of sines of 3 angles in a triangle. Its maximum is obtained when all are equal. This can be seen if we consider the sum of 2 angles in a triangle $\alpha,\beta,\gamma$. For 2 angles $\alpha,\beta$ and a fixed $\gamma$ the sum is: $\sin \alpha+\sin\beta=2\sin\dfrac{\alpha+\beta}2 \cos\dfrac{\alpha-\beta}2$. It is maximized when $\alpha=\beta$. Then the sum of each with a $\gamma$ will be maximized when they are equal as well and we conclude that all the 3 must be equal. It follows that:
$$
x+\dfrac\pi3=y+\dfrac\pi3= \pi-(\frac{\pi}3+x)+(\frac\pi3+y)
$$
and therefore $x=y=0$ and the maximum value of the expression is: $3\tan\dfrac\pi3=3\sqrt3$
A: Let $x+60^{\circ}=\alpha$, $y+60^{\circ}=\beta$ and $60^{\circ}-x-y=\gamma$.
Thus, $\alpha+\beta+\gamma=180^{\circ}$ and $$\sin{x}+\sin{y}-\sin{(x+y)}+\sqrt{3}\left(\cos{x}+\cos{y}+\cos{(x+y)}\right)=$$
$$=2(\sin\alpha+\sin\beta+\sin(\alpha+\beta))=2(\sin\alpha+\sin\beta+\sin\gamma).$$
Since we need to find a maximal value of the last expression, we can assume $\sin\alpha\geq0$, $\sin\beta\geq0$, $\sin\gamma\geq0$ and from here we can assume $\alpha\geq0$, $\beta\geq0$ and $\gamma\geq0$.
Id est, by Jensen we obtain:
$$2(\sin\alpha+\sin\beta+\sin\gamma)\leq6\sin\frac{\alpha+\beta+\gamma}{3}=3\sqrt3.$$
The equality occurs for $\alpha=\beta=\gamma=60^{\circ},$ which says that we got a maximal value.
A: The command of Mathematica
Maximize[{Sin[x] + Sin[y] - Sin[x + y] + 
Sqrt[3]*(Cos[x] + Cos[y] + Cos[x + y]), x >= -Pi && x <= Pi, 
y >= -Pi && y <= Pi}, {x, y}]

results in {3 Sqrt[3], {x -> 0, y -> 0}}. This is confirmed by NMaximize with DifferentialEvolution method.
