Given the function $f(x,y):=xy+x-y$. Let $D:=\{(x,y)\in\mathbb{R}^2:x^2+y^2\leq25\wedge x \geq 0\}$. Find the absolute maximum and minimum of $f$ on $D$.
My working is as follows:
$\begin{array} & f_x(x,y)=y+1=0 & \qquad \qquad f_y(x,y)=x-1=0 \\ \Rightarrow y=-1 & \qquad \qquad \Rightarrow x=1 \end{array}$
$D(x,y)=\begin{vmatrix} f_{xx}(x,y) & f_{xy}(x,y) \\ f_{xy}(x,y) & f_{yy}(x,y) \end{vmatrix} = \begin{vmatrix} 0 & 1 \\ 1 & 0 \end{vmatrix} = -1$
$D(x,y) = D(1,-1) < 0 \Rightarrow (1,-1)$ is a saddle point.
Also, just for interest, $f(1,-1)=1$
To find the maximum and minimum of $f$ subject to $x^2+y^2=25$ I will use a Lagrange multiplier.
$\nabla f(x,y) = \lambda \nabla g(x,y)$ where $g(x,y)=x^2+y^2-25$
$\langle y+1, x-1 \rangle = \lambda \langle 2x, 2y \rangle$
$\left\{\begin{array}{llll} y+1=2\lambda x & \Rightarrow & y=2\lambda x -1 & (1) \\ x-1=2\lambda y & \Rightarrow & x=2\lambda y +1 & (2) \\ x^2+y^2=25 & & & (3) \end{array}\right.$
Putting (1) into (2) and (2) into (1) gives
$$x=\frac{1}{1+2\lambda} \qquad \text{and} \qquad y=-\frac{1}{1+2\lambda}\tag{4}$$ Where $\lambda \neq \pm \frac12$
Putting (4) into (3) gives
$$\lambda = \frac{-5\pm \sqrt2}{10} \approx -0.64 \quad \text{or} \quad -0.36$$
Subsequently,
$$x \approx \pm 3.54 \quad \text{and} \quad y \approx \mp 3.54$$
Note that $x=-y$. So,
$$f(3.54,-3.54) \approx -5.43 \quad \text{and} \quad f(-3.54,3.54) \approx -19.57$$
By this calculation, (-3.54, 3.54, -19.57) would be a point of absolute minimum on the circle $x^2+y^2=25$. But $x\geq 0$.
Hmm. Let me try evaluating $f(0,5)$. $$f(0,5)=-5 \nless f(3.54,-3.54) \approx -5.43$$ Nope. What should I do now to find the minimum in a procedurally correct way?
I also cannot find the absolute maximum. $(1,-1,1)$ is not the absolute maximum because I have found that $(3.54, 3.54, 12.5)$ exists on $D$. Why did my calculation using Lagrange's multiplier not give me this point?