Find $x$ and $y$ such that $15\sin(x+y)+7\sin x+7\sin y$ is maximized Question is: Find $x$ and $y$ such that
$$15\sin(x+y)+7\sin x+7\sin y$$
is maximized.
What I tried was
$$f(x,y)=15\sin(x+y)+7\sin x+7\sin y=15(\sin x\cos y+\cos x\sin y)+7(\sin x +\sin y)$$
$$\frac{\partial f}{\partial x}=15\cos(x+y)+7\cos x=0$$
$$\frac{\partial f}{\partial y}=15\cos(x+y)+7\cos y=0$$
$$\cos x=\cos y$$
$$y=-x$$
$$\cos x=-{15\over 7}\quad ??$$
 A: Hint:
Observe that
$$\frac{\partial f}{\partial x}=0=\frac{\partial f}{\partial y}\qquad\implies\qquad\cos x=\cos y\qquad\iff\qquad x=2n\pi\pm y\;\;\text{for some }n\in\mathbb{Z}$$
If $x=2n\pi+y$ we have
\begin{align*}
\frac{\partial f}{\partial x}=0&\quad\implies  &15\cos(2n\pi+2y)+7\cos(2n\pi+y)&=0\\
&\quad\iff&15\cos (2y)+7\cos y&=0\\
&\quad\iff&15\left(2\cos^2 y-1\right)+7\cos y&=0\\
&\quad\iff&30\cos^2 y+7\cos y-15&=0\\
&\quad\iff&\cos y&\in\left\{\frac35,-\frac56\right\}\\
\end{align*}
A: Since $f$ is periodic, we don't need to consider the other regions.
Hence, we can consider $x = \pm y$ without the $2n\pi$.

For the case $x=y$, we obtain:
$$\begin{array}{rcrcl}
\dfrac{\partial f}{\partial x} &=& 15\cos(x+y)+7\cos x &=& 0 \\
&& 15\cos(2x)+7\cos x &=& 0 \\
&& 15(2\cos^2x-1)+7\cos x &=& 0 \\
&& 30\cos^2x + 7\cos x - 15 &=& 0 \\
&& (6\cos x+5)(5\cos x - 3) &=& 0 \\
\end{array}$$
Hence, $\cos x=-\dfrac56$ or $\dfrac35$.
$$\begin{array}{rcl}
15\sin(x+y)+7\sin x+7\sin y
&=& 15\sin2x+14\sin x \\
&=& 30\sin x \cos x + 14\sin x \\
\end{array}$$
From this, we can obtain $4$ values.

For the case $x=-y$, we obtain $\cos x = -\dfrac{15}7$.
From this, we can obtain $2$ values.

Using the second partial derivative test:
$$H(x,y) = \begin{pmatrix}f_{xx}(x,y) &f_{xy}(x,y)\\f_{yx}(x,y) &f_{yy}(x,y)\end{pmatrix} = \begin{pmatrix}-15\sin(x+y)-7\sin x & -15\sin(x+y)\\-15\sin(x+y) & -15\sin(x+y)-7\sin y\end{pmatrix}$$
Then,
$$D(x,y) = \det(H(x,y)) = 105\sin(x+y)(\sin x + \sin y) + 7 \sin x \sin y$$
Find values from the $6$ values found, such that $D < 0$ and $f_{xx} < 0$.
For the case $x=-y$, $D$ must be negative, so they can be rejected.
A: I think, the answer is $25.6$.
Indeed, by C-S
$$15\sin(x+y)+7(\sin{x}+\sin{y})=15(\sin{x}\cos{y}+\cos{x}+\sin{y})+7(\sin{x}+\sin{y})=$$
$$=(15\cos{y}+7)\sin{x}+15\sin{y}\cos{x}+7\sin{y}\leq$$
$$\leq\sqrt{(\sin^2x+\cos^2x)\left(\left(15\cos{y}+7\right)^2+\left(15\sin{y}\right)^2\right)}+7\sin{y}=$$
$$=\sqrt{274+210\cos{y}}+7\sin{y}\leq\sqrt{274+210\cos{y}}+7|\sin{y}|\leq$$
$$=20\sqrt{0.685+0.525\cos{y}}+5.6\sqrt{1.5625\sin^2y}\leq$$
$$\leq\sqrt{(20+5.6)\left(20(0.685+0.525\cos{y})+5.6\cdot1.5625\sin^2y\right)}=$$
$$=25.6\sqrt{1-\frac{7}{512}(3-4\cos{y})^2}\leq25.6.$$
The equality occurs for $x=y=\arccos\frac{3}{5}$.
Done!
