top of page
Music Apps

Zakharov Function

Updated: Aug 5, 2021

Mathematical Definition

Input Domain

The function is usually evaluated on the hypercube xi ∈ [-5, 10], for all i = 1, …, d.

Global Minima

f(x*)=0, at x* =(0,…,0).


  • The function is continuous.

  • The function is convex.

  • The function can be defined on n-dimensional space.

  • The function is unimodal.

  • The function is differentiable.

  • The function is non-separable.

Python Implementation

% Please forward any comments or bug reports in chat
Copyright 2021. INDUSMIC PRIVATE LIMITED.THERE IS NO WARRANTY, EXPRESS OR IMPLIED. WE DO NOT ASSUME ANY LIABILITY FOR THE USE OF THIS PROGRAM. If software is modified to produce derivative works, such modified software should be clearly marked. Additionally, user can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.
% for any support connect with us on
# Author: Dhanishtha Sharma 

import math
import numpy as np
from numpy import *
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
%matplotlib notebook
plt.rcParams['figure.figsize'] = (6,4)
def f(x1,x2):
a= 0.5*x1+x2
b= x1*x1 +x2*x2 +pow(a,2) +pow(a,4)
return b

x1= np.linspace(-5,10)
x2= np.linspace(-5,10)
X1,X2= meshgrid(x1,x2)
ax.plot_surface(X1,X2,f(X1,X2), cmap='jet')


[1] Jamil, Momin, and Xin-She Yang. "A literature survey of benchmark functions for global optimization problems." International Journal of Mathematical Modelling and Numerical Optimization 4.2 (2013): 150-194.

624 views0 comments


bottom of page