Find or prove the existence of the maximum or minimum of a four-variable function. I am an engineer and I am developing a research, I need to prove that this function has a maximum (or minimum) global. I do not remember how you do it, if you can help me, I thank you.
The function is $f:\mathbb{R^4}\longrightarrow \mathbb{R}$
$$f(x,y,z,w) = xy+\frac12(z-y)(x-w) $$
 A: If you fix $x$, $y$ and $z$, note that the function is linear with respect to $w$ (and non-constant). So it is not bounded.
I'm assuming that the domain of $f$ is $\Bbb R^4$.
A: Your function is a quadratic form, i.e., a homogeneous polynomial of degree $2$ in its variables. As such it is an animal occurring in linear algebra. You can write $f$ as
$$f(x,y,z,w)={1\over2}(xy+xz+xw-zw)={1\over4}\>{\bf x}'A\,{\bf x}\ ,$$
whereby ${\bf x}$ is $(x,y,z,w)$ written as a column vector, and $A$ is the matrix
$$A=\left[\matrix{0&1&1&1\cr 1&0&0&0\cr 1&0&0&-1\cr 1&0&-1&0\cr}\right]\ .$$
In order to analyze the behavior of $f$ we have to determine the eigenvalues of the matrix $A$. They are
$$\lambda_1\doteq1.481,\quad \lambda_2=1,\quad\lambda_3\doteq-0.311,\quad\lambda_4\doteq-2.170\ .$$
Linear algebra then tell us that we can introduce in ${\mathbb R}^4$ orthonormal coordinates $\bar x_i$ $(1\leq i\leq 4)$ such that in these new coordinates the function $f$ appears as
$$\bar f(\bar x_1,\bar x_2,\bar x_3,\bar x_4)={1\over4}\bigl(\lambda_1\bar x_1^2+\lambda_2\bar x_2^2+\lambda_3\bar x_3^2+\lambda_4\bar x_4^2\bigr)\ .$$
Since the $\lambda_i$ are $\ne0$ and have different signs the function $f$ has a (nondegenerate) saddle point at ${\bf 0}$.
