Critical points : $ z = \cos^2x + \cos^2y$ for $ y-x = \frac{\pi}{4}$ Find and classify the critic points (maximum, minimum or neither) of the function $$z=z(x,y) = \cos^2x + \cos^2y $$
if $y-x = \large\frac{\pi}{4}$
I've find $x = -\large\frac{\pi}{8} + \large\frac{k \pi}{2}$ and $y = \large\frac{\pi}{8} + \large\frac{k \pi}{2}$ ($k \in \Bbb{Z}$), but I sm having troubles to classify the points.
Thanks for your help!

use
$$\cos^2{x}+\cos^2{y}=\dfrac{1}{2}(\cos{(2x)}+\cos{(2y)})+1=\cos{(x+y)}\cos{(x-y)}+1=\dfrac{\sqrt{2}}{2}\cos{(x+y)}+1$$
since
$$y=x+\dfrac{\pi}{4}$$
so
$$\cos^2{x}+\cos^2{y}=\dfrac{\sqrt{2}}{2}\cos{(2x+\dfrac{\pi}{4})}+1\in[1-\dfrac{\sqrt{2}}{2},1+\dfrac{\sqrt{2}}{2}]$$
if only if $2x+\dfrac{\pi}{4}=2k\pi$ and $2x+\dfrac{\pi}{4}=(2k-1)\pi$
