Find the critical points of the function $f(x_1, x_2)=x_1x_2$ under the constraint $2x_1+x_2=b$.
Using the method of Lagrange multipliers I got the following:
\begin{equation*}L(x_1,x_2,\lambda )=x_1x_2-\lambda \cdot \left (2x_1+x_2-b\right )\end{equation*}
\begin{align*}&L_{x_1}(x_1,x_2,\lambda)=0 \Rightarrow x_2-2\lambda=0 \\ & L_{x_2}(x_1,x_2,\lambda)=0 \Rightarrow x_1-\lambda=0 \\ & L_{\lambda}(x_1,x_2,\lambda)=0 \Rightarrow -\left (2x_1+x_2-b\right )=0\end{align*}
Solving this system we get the critical point $\left (\frac{b}{4}, \frac{b}{2}\right )$.
To check what extrema (if there exists) it is, we do the following: $$f_{x_1} =x_2 , \ f_{x_2}=x_1 , \ f_{x_1x_1}=0 . \ f_{x_1x_2}=1 , \ f_{x_2x_2}=0$$
Then: \begin{equation*}f_{x_1x_2}\left (\frac{b}{4}, \frac{b}{2}\right )=1>0 \ \text{ and } \ f_{x_1x_1}\left (\frac{b}{4}, \frac{b}{2}\right )f_{x_2x_2}\left (\frac{b}{4}, \frac{b}{2}\right )-\left (f_{x_1x_2}\left (\frac{b}{4}, \frac{b}{2}\right )\right )^2=0\cdot 0-1=-1<0\end{equation*}
Therefore, $\left (\frac{b}{4}, \frac{b}{2}\right )$ is a saddle point. Is this correct? Because at Wolfram there are some maxima.
$$$$
Then I want to check if there are extrema if we have an other constraint, $\{(x_1, x_2)\in \mathbb{R}^2 \mid x_1\geq 0, x_2\geq 0\}$.
A critical point is \begin{equation*}\nabla f=\begin{pmatrix}0 \\ 0\end{pmatrix}\Rightarrow \begin{pmatrix}x_2 \\ x_1\end{pmatrix}=\begin{pmatrix}0 \\ 0\end{pmatrix} \Rightarrow x_1=0 \ \text{ und } \ x_2=0\end{equation*}
But this point is again a saddle point, right?
Then I wan to check if there are extrema if we have an other constraint, $\{(x_1, x_2)\in \mathbb{R}^2 \mid x_1\geq 0, x_2\geq 0\}$.
A critival point is \begin{equation*}\nabla f=\begin{pmatrix}0 \\ 0\end{pmatrix}\Rightarrow \begin{pmatrix}x_2 \\ x_1\end{pmatrix}=\begin{pmatrix}0 \\ 0\end{pmatrix} \Rightarrow x_1=0 \ \text{ and } \ x_2=0\end{equation*}
But this point is again a saddle point, right?
$$\begin{array}{ll} \text{maximize} & x y\\ \text{subject to} & 2x + y = b\end{array}$$
From the equality constraint, we have $y = b - 2 x$. Let
$$g (x) := x (b - 2 x)$$
The derivative of $g$ vanishes at $\frac b4$. Hence, the maximizer is $(\bar x, \bar y) := \left(\frac b4, \frac b2\right)$ and the maximum is $\frac{b^2}{8}$. For example, if $b = 4$, we have