# Finding the stationary points of a Function

I have the following function $f: \mathbb{R}^2 \to \mathbb{R}$ with

$f(x,y)=\cos(x)+\cos(y)+\cos(x+y)$

I need to find the stationary points, and find out if it's a maxima or minima.

The partial derivatives are:

$$\frac{df}{dx}(x,y)= -\sin(x+y)-\sin(x)$$ $$\frac{df}{dx}(x,y)=-\sin(x+y)-\sin(y)$$ $$\frac{d^2f}{dx^2}(x,y)=-\cos(x+y)-\cos(x)$$ $$\frac{d^2f}{dy^2}(x,y)=-\cos(x+y)-\cos(y)$$ $$\frac{d}{dx}\frac{df}{dy}=\frac{d}{dy}\frac{df}{dx}=-\cos(x+y)$$

I can find the maxima or minima with the hessian matrix as far as I know, but for that I also need the stationary points...
However the hessian Matrix would be: $$\begin{pmatrix} -\cos(x+y)-\cos(x) & -\cos(x+y) \\ -\cos(x+y) & -\cos(x+y)-\cos(y) \\ \end{pmatrix}$$

My problem is that I don't know how to find the stationary points with such a function.. Help would be really appreciated..

Stationary points are the points where the gradient of $f$ is zero: $$\vec{0} = \vec{\nabla} f = \left[ \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right]$$ so you have 2 equations in 2 unknowns. Can you solve it?
• for $x=2\pi k$ and $y=2\pi l$ where $l,k \in\mathbb{Z}$ You have stationary points with Hessian $\begin{pmatrix}-2&-1\\-1&-2\end{pmatrix}$ with eigenvalues $-1$ and $-3$. – Peter Melech Jul 3 '17 at 10:43
• Of course. I just solved $-sin(x)=-sin(y)=sin(x+y)=0$ and I am momentarily not sure if there are other points where the gradient vanishes, but I´m still thinking about it.@PhysX – Peter Melech Jul 3 '17 at 10:55
• other stationary points are $x=\frac{\pi}{2}+k2\pi$ and $y=\frac{\pi}{2}+l2\pi$ where $k,l\in\mathbb{Z}$ with Hessian $\begin{pmatrix}1&1\\1&1\end{pmatrix}$ that has eigenvalues $0$ and $2$.@PhysX – Peter Melech Jul 3 '17 at 11:36
We have this formula $$\sin\alpha+\sin\beta=2\sin \frac {\alpha +\beta }{2}\,\cos \frac {\alpha -\beta }{2}$$ So we have to solve $$-2\sin\frac{x+y+x}{2}\cos\frac{x+y-x}{2}=0;\;-2\sin\frac{x+y+y}{2}\cos\frac{x+y-y}{2}=0$$ that is $$\sin\frac{2x+y}{2}\cos\frac{y}{2}=0;\;\sin\frac{x+2y}{2}\cos\frac{x}{2}=0$$