I'm trying to minimize and maximize the following function: $$f(x_1,x_2)=x_1^2+x_2^2-\cos(18x_1)-\cos(18x_2).$$
The problem is that I have to find all the critical points but I don't know how to solve without using the computer the equations of the gradient vector.