I have to fund the extremas of $f$ subject to the contraints, that are given:
$$fx, y)=x-y, x^2-y^2=2$$
I have done the following:
We use the theorem of Lagrange multipliers.
The constraint is $g(x,y)=x^2-y^2-2=0$.
We have to find $x$, $y$ and $\lambda$ such that $$\nabla f(x,y)=\lambda \nabla g(x, y) \tag 1$$ and $$g(x,y)=0 \tag 2$$
$$\nabla f(x,y)=(1, -2) \ \ , \ \ \nabla g(x, y)=(2x, -2y)$$
$$(1) \Rightarrow (1, -1)=\lambda (2x, -2y) \Rightarrow x=y$$
$$(2) \Rightarrow x^2-y^2=2 \Rightarrow x^2-x^2=2 \Rightarrow 0=2$$
What have I done wrong??
As you have already noticed, if $(x, y) \in g^{(-1)}\{ 0 \}$ such that $f$ has an extremum at $(x, y)$, then, since $\lambda = 0$ is easily seen to lead to a contradiction, we have $x = y.$ However, since $(x, y) \in g^{(-1)}\{ 0 \},$ we have $x^{2} - y^{2} = 2,$ which implies that $x \neq y.$
Therefore, $f$ restricted on $g^{(-1)}\{ 0 \}$ has no extremum.