Himmelblau Function
Mathematical Definition
\[f(x, y) = (x^{2} + y - 11)^{2} + (x + y^{2} - 7)^{2}\]Plots
The contour of the function:
Description and Features
- The function is continuous.
- The function is not convex.
- The function is defined on the 2-dimensional space.
- The function is multimodal.
Input Domain
The function can be defined on any input domain but it is usually evaluated on $x_i \in [-6, 6]$ for $i = 1, 2$.
Global Minima
The function has four local minima at:
- $f(\textbf{x}^{\ast}) = 0$ at $\textbf{x}^{\ast} = (3, 2)$
- $f(\textbf{x}^{\ast}) = 0$ at $\textbf{x}^{\ast} = (-2.805118, 3.283186)$
- $f(\textbf{x}^{\ast}) = 0$ at $\textbf{x}^{\ast} = (-3.779310, -3.283186)$
- $f(\textbf{x}^{\ast}) = 0$ at $\textbf{x}^{\ast} = (3.584458, -1.848126)$
Implementation
Python
For Python, the function is implemented in the benchmarkfcns package, which can be installed from command line with pip install benchmarkfcns
.
MATLAB
An implementation of the Himmelblau Function with MATLAB is provided below.
The function can be represented in Latex as follows:
References:
- https://en.wikipedia.org/wiki/Himmelblau%27s_function